[Home] [By Thread] [By Date] [Recent Entries]
Fatbob:
Input: <data> <one a="1"/> <two b="2"/> </data> XSLT: <xsl:template match="data">
<both a="{one/@a}" b="{two/@b}"/>
</xsl:template>Output: <both a="1" b="2"/> Or more generally: decide on a context from which all the necessary data components for your new element are visible (any context will do but some are easier than others), and make the new element, pulling in whatever data you want from wherever you find it. In fact, it's pretty hard to write XSLT that doesn't do this, in a very general way. If you think in terms of elements and attributes being nodes on a tree, rather than stuff written with tags (as you really must to get anywhere with XSLT), it starts seeming very normal. Cheers, Wendell At 02:11 PM 3/27/2009, you wrote: Thanks for taking the time to write that email. Greatly appreciate it.
|

Cart



