[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] variable as attribute value of fo:block


Subject: RE: [xsl] variable as attribute value of fo:block
From: Stuart Brown <sbrown@xxxxxxxxxxxxx>
Date: Thu, 19 Sep 2002 14:36:33 +0100

Hi Thomas,

When you define a variable, if you use the select attribute (as opposed to
the element content), and want to populate it with a text string, then you
must double-up inverted commas, like this:

<xsl:variable name="padding_vor_gross" select="'1cm'"/>
                                               ^   ^
If you don't do this, then it is trying to populate the variable with a node
called 1cm (which is illegal anyway), not a string of '1cm'.

Try this, and <fo:block padding-before="{$padding_vor_gross}">.

Cheers,

Stuart

> -----Original Message-----
> From: thomas [mailto:thomas.lohbeck@xxxxxx]
> Sent: 19 September 2002 14:16
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] variable as attribute value of fo:block
> 
> 
> I like to have:
> <xsl:variable name="padding_vor_gross" select="1cm"/>
> 
> <fo:block padding-before="$padding_vor_gross">
> or
> <fo:block padding-before="{$padding_vor_gross}">
> or
> <fo:block padding-before="($padding_vor_gross)">
> 
> Can you call a variable only in the <xsl:value-of> argument?
> 
> No Luck so far.
> 
> thank you
> thomas
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

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



Current Thread