[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to copy parts of an var into another ?
Hello List, I have a var: <xsl:variable name="foo"> <item name="a item"> <value>1</value> </item> <item name="another item"> <value>2</value> </item> </xsl:variable> at one point in the stylesheet, I want so select one part of the var. That is Necessary because in reality the var is MUCH bigger, and I want to avoid using Xpathes from here to moscow each time... I tried: <xsl:variable name="partoffoo"> <xsl:value-of select="$foo/item[@name = 'a item']"/> </xsl:variable> And tried to get the value by using: <xsl:value-of select="$partoffoo/item/value"/> to get the item of foo that has the name attribute "a item". But it did not work. Important is, that I also want to get every node that is child of the selected <item>. I tried copy and copy-of, but only got the var copied into the output document. Is there a way to solve this problem? Thanks!
|
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
|