[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: References to elements in predicates
rowan@xxxxxxxxxxxxxxxxxxxxx wrote:
<xsl:template match="item[string-length(ref)>0]"> <xsl:variable name="ref" select="ref"/> <xsl:copy-of select="//items/item[name=$ref]"/> </xsl:template> But why do I need the variable? What do I have to write in the predicate to
You should however define a key e.g. <xsl:key name="k1" match="item" use="name"/> and then do <xsl:copy-of select="key('k1', ref)"/> -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
|
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
|