[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Global variables/temporary tree problem

Subject: Re: Global variables/temporary tree problem
From: Richard Rowell <richard@xxxxxxxxxxxxxxxxx>
Date: 13 Sep 2002 12:45:23 -0500
tree fragment global variables
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
Description: This is a digitally signed message part

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.