xsl-list
[Top] [All Lists]

Re: Global variables/temporary tree problem

2002-09-13 10:45:23
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[(_at_)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
Description: This is a digitally signed message part

<Prev in Thread] Current Thread [Next in Thread>