This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: dimension arithmetic in xpath
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: dimension arithmetic in xpath
- From: "Ronald Walraven" <RWalraven at nl dot alpnet dot com>
- Date: Thu, 4 May 2000 21:10:01 +0200
- Reply-To: xsl-list at mulberrytech dot com
Try:
<xsl:attribute name="content-width">
<xsl:value-of select="number(string-before($PageWidth,'mm')) -
number(string-before($PageMarginLeft,'mm')) -
number(string-before($PageMarginRight,'mm'))"/>
</xsl:attribute>
Replace 'mm' with 'pt' if required.
-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Sebastian Rahtz
Sent: donderdag 4 mei 2000 14:04
To: xsl-list@mulberrytech.com
Subject: dimension arithmetic in xpath
I want to have an option in my stylesheets to make figures
automatically scale to the width of the page. frustrated in XSL FO
(see yesterdays email, Nikolai convinced me I misread the spec), I
try to do it in the XSLT part. What I would _like_ to say is
<xsl:attribute name="content-width">
<xsl:value-of select="$pageWidth - $PageMarginLeft -
$PageMarginRight"/>
</xsl:attribute>
ie set the width to the pagewidth minus the margins (these are
variables containing eg 211mm and 60pt). but of course that does not
work (since the things are not numbers).
can anyone see a way I can get this to work?
Sebastian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list