RE: [xsl] variable in xsl

Subject: RE: [xsl] variable in xsl
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 3 Sep 2003 14:55:53 +0100
> <xsl:variable name="mylang" select="'de'"/>
> <xsl:variable name="mycurr" select="'euro'"/>
> 
> document('../prototype/lang/*[name()=$mylang]/xml/*[name()=$my
> curr]/structure.xml')
> 
> I hope this helps.

Ken, you missed that it's a URI (string) not a path expression. You need
to build it using concat():

document(concat('../prototype/lang/', $mylang, '/xml/', ...etc))

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread