This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Variable with node list...
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