This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: variable as attribute value of fo:block


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@ksc.ch]
> Sent: 19 September 2002 14:16
> To: XSL-List@lists.mulberrytech.com
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]