[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Calculations involving measurements with units

Subject: Calculations involving measurements with units
From: "Paul A. Hoadley" <paulh@xxxxxxxxxxxxxx>
Date: Fri, 2 Jan 2004 17:46:27 +1030
calculations of measurements
Hello,

I am using a parameter called 'page-height', set to, say, '297mm' for
an A4 page.  I have a particular margin I want to set to '$page-height
/ 3.75'---what is the best way to strip the trailing 'mm' prior to the
calculation and append it again to the result?  My first attempt was
to start with a variable:

<xsl:variable name="upper-margin" select="number($page-height) / 3.75"/>

and then open the fo:block with:

<fo:block text-align="center" margin-top="$upper-margin">

The XPath in the xsl:variable element above is apparently invalid.  I
also need to append the 'mm' prior to using the variable in the
fo:block.  What is the best approach here?


-- 
Paul.

mailto:paulh@xxxxxxxxxxxxxx
mailto:phoadley@xxxxxxxxxxxxxxxxxxxxx

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.