|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Calculations involving measurements with units
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








