Re: don't get variables

Subject: Re: don't get variables
From: Phil Lanch <phil@xxxxxxxxxxxxxxx>
Date: Thu, 11 Nov 1999 17:53:00 +0000
Alexandra Morgan wrote:
> 
> I don't understand how one is supposed to access the value of variables. Why does this not put A in the result:
> 
>   <xsl:template match="/">
>     <xsl:variable name="test" select="A"/>
>     <xsl:value-of select="$test" />
>   </xsl:template>

The problem isn't with accessing the variable's value:
it's with initializing it.

select="A" is looking for  <A> _elements_
(and not finding any)

to get the _string_ 'A', you need to say:

<xsl:variable name="test" select="'A'"/>

-- 

cheers

phil


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


Current Thread