Subject: Re: [xsl] Variable with node list... From: Jörg Heinicke <joerg.heinicke@xxxxxx> Date: Fri, 16 Nov 2001 22:21:10 +0100 |
You store a ResultTreeFragment in the variable, not a nodeset. Because of this you can't do a simple for-each over your variable. Almost all processors have an extension-function node-set(), which transforms a RTF to a nodeset: <xsl:for-each select="msxml:node-set($properties)/property">. For more information about RTF, look at the list-archives: http://sources.redhat.com/ml/xsl-list/. Joerg > vartree.xml > ----------- > <?xml version="1.0" encoding="UTF-8" ?> > <?xml-stylesheet type="text/xsl" href="vartree.xsl"?> > <root></root> > > vartree.xsl > ----------- > <?xml version="1.0" encoding="UTF-8" ?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:template match="root"> > <xsl:variable name="properties"> > <property>one</property> > <property>two</property> > <property>three</property> > </xsl:variable> > <foo> > <xsl:for-each select="$properties/property"> > <bar> > <xsl:value-of select="."/> > </bar> > </xsl:for-each> > </foo> > </xsl:template> > </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Variable with node list.., David Carlisle | Thread | [xsl] the last substring, yan bai |
Re: [xsl] Jeni reminds me....., David Carlisle | Date | Re: [xsl] Problems with formatting, David Carlisle |
Month |