[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to copy parts of an var into another ?
in XSL 1.0 the nodes created in a variable are not accessable in this way. Look into the node-set() extension element. Josh On Fri, 18 Jun 2004 11:18:24 +0200, Jan Kohnert <j.kohnert@xxxxxxxxxxx> wrote: > > 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! > > --+------------------------------------------------------------------ > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ > or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx> > --+-- > >
|
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
|