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

Re: [XSLT 2.0] Checking that an element's value has th

Subject: Re: [XSLT 2.0] Checking that an element's value has the desired datatype?
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 16 Oct 2006 10:09:44 -0700
what value has imagination
On 10/16/06, Costello, Roger L. <costello@xxxxxxxxx> wrote:
Excellent! With this:

matches(flt:Aircraft/flt:Altitude, '[0-9]+')

I can do datatype checking, without using XML Schemas.


This only determines that a value is castable to a subset of values of
the xs:integer type.

The real type of the value may be quite different, for example the xml
schema associated with this xml document may define it to be an
xs:string, and the fact that this instance just happens to be castable
to an xs:integer may be accidental.

We have the same in XSLT 1.0 -- for example an <xsl:sort/> instruction
will sort all sort key values as strings (regardless of the fact that
all they may be interpretable as numbers) unless explicitly directed
otherwise by specifying the attribute

data-type="number".


-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play

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.