|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Copying into additional attributes from a differen
The Invisible Stylesheeter writes:
>The transformation process is as follows:
>1. Copy all nodes and attributes of B's descendants
> {in this case, C and D}
>...
>2. Look for the NAME attribute in children of E/F and copy the
>corresponding values of class and method names into attributes and add
>it to the above tree: The result will be:
> <AA>
> <C id="1" name="CC" class="foo" method="test">
> <D id="2" name="DD" class="foo1" method="test1" />
> </C>
> </AA>
>I used the <xsl:copy-of> to do step 1...How can I do step 2?
Since step 2 turns this into the expand-structure-as-I-copy-it
scenario, you have to go back and re-do step 1 with xsl:copy, then
jump in with xsl:attribute at the appropriate places to add in the
extra attributes. I believe that the FAQ has some examples of
copying everything while adding extra stuff. Attributes are subject
to rules about when they can be added: after (so to speak) namespace
nodes but before text, comments, PIs, and child elements.
.................David Marston
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








