[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Global variables/temporary tree problem
I think I found the problem. It seems the book I have covers the 1.1 version of the standard, but 1.1 went the way of the Dodo? Xalan implements 1.0 only, and apparently treating "result tree fragments" as "temporary trees" that you could do whatever you wanted with is a 1.1 thing. If anyone cares, I ended up using the document('') hack/feature to look up the values in the stylesheet itself( my style sheet will be in a RDMBs so I can not use an external list file). <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="hud_races_list"> <race>white</race> <race>black</race> </xsl:variable> <xsl:variable name="hud_races" select="document('')//xsl:variable[@name='hud_races_list']/race"/> <xsl:template match="client/race[.=$hud_races]"> <xsl:element name="{name()}"><xsl:value-of select="concat('HUD:', text())"/></xsl:element> </xsl:template> </xsl:stylesheet> On Fri, 2002-09-13 at 10:54, Richard Rowell wrote: > I'm having problems accessing a global variable that contains a result > tree fragment (temporary tree?). If I load the variable by calling > document()/path/path2 then I can use the variable as I expect. If I try > to specify the variable value directly I get an error (from > Xalan2.3.99). > <snipped for brevity> Attachment:
signature.asc
|
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
|