Re: [xsl] Need to override previously copied attributes etc.

Subject: Re: [xsl] Need to override previously copied attributes etc.
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Fri, 29 Jul 2005 10:15:17 +0200
Hi again,
Tempore 01:24:08, die 07/29/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Taco Fleur (@DataBroker) <taco@xxxxxxxxxxxxx>:

When I run that as is,
Well, in order to test on my system, I used:
<xsl:variable name="fieldCollection" select="document('fieldcollection.xml')/root"/>
You need to change that uri back to the original of course.

I do not get the desired result,
Which processor are you using? My code worked with Saxon and AltovaXSLT.
also I don't know what to do with
-identity-reference- and -identity-reference-name- if anything?

They are lists of attribute's names, attributes that must not be copied.


The 'identity' attribute is already present in your input XML, no need to copy it.
No 'reference' attribute appeared in your desired output, so I thought it should be excluded as well.
After the principal field is found in the variable, the 'name' attribute is copied, but not anymore from referenced fields. Otherwise the ouput would contain: name="bit" instead of name="principalPlace"

It basically just copied everything over from the passed in file, but it did
not look to see if an element should get its attributes/nodes from a
referenced element.
It does with me. Up to an arbitrary level.

THis is a part of the ouput:
<field identity="5AB5F3AD-D9DD-713A-D582F669F41CFAA8" required="true" display="Is Principal Place of Business" name="principalPlace" valid="01" type="boolean">
	<option value="0"/>
	<option value="1"/>
</field>

I hope you can make it work this time.

kind regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Vincit omnia simplicitas
Keep it simple

Current Thread