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

Re: making a number from a decimal in XPath 2.0

Subject: Re: making a number from a decimal in XPath 2.0
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 16 May 2005 12:42:38 -0400
xpst0003
Hey Dimitre,

At 04:16 AM 5/16/2005, you wrote:
Better:

($arg + $extent - 1) idiv $extent

Oh, nice! I hadn't seen idiv ... excellent. I'll use that, or a variant.


For my own edification, however...

At 07:44 PM 5/15/2005, you wrote:
> How do I make ceiling($arg div $extent) into an integer?

Use:
   xs:integer(ceiling($arg div $extent))

Cool. But when I have


<xsl:value-of
select="string-join((for $i in (1 to xs:integer(ceiling($length div $line-length))) return 'e'),'')"/>


I get

Error at xsl:value-of on line 129 of file:/C:/Data/ACH/ACH2005/XSL/box-measurer.
xsl:
XPST0003: XPath syntax error at char 74 on line 129 in {...gth div $line-lengt
h))) ret...}:
Cannot find a matching 1-argument function named {http://w3.org/2001/XMLSche
ma}integer()
Failed to compile stylesheet. 1 error detected.


As you can see from the above, I have the 'xs' namespace declared as

xmlns:xs="http://w3.org/2001/XMLSchema"

This must be something basic. Still running Saxon 8.4 (the free version). (And evidently, one thing that I'll have to learn is when casting happens by itself, and when not.)

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

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.