[XSL-LIST Mailing List Archive Home]
[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: "bryan rasmussen" <rasmussen.bryan@xxxxxxxxx>
Date: Tue, 17 Oct 2006 03:59:09 +0200
I think people have forgotten the explicit reference Roger made to
schematron, since schematron is a validation technology that can be
implemented in XSL-T it follows that the expression
would give you the same capabilities as XML Schema datatype checking
in any actually useful scenario.
That said, this would only apply to ISO Schematron with the binding
language set to xpath 2.0
On 10/17/06, Costello, Roger L. <costello@xxxxxxxxx> wrote:
Consider this XML document again:
Suppose that we want a mechanism to check that the value of the
Altitude element is an integer.
The mechanism should accept all of these as valid values:
The mechanism should reject all of these as invalid values:
One mechanism is to create an XML Schema and declare Altitude as such:
<element name="Altitude" type="integer"/>
The above valid values would be accepted by a schema validator. The
invalid values would be rejected by a schema validator.
Now consider this XSLT template:
ACCEPTED: Altitude has a valid value
REJECTED: Altitude has an invalid value
The above valid values would be accepted by the XSLT template. The
invalid values would be rejected by the XSLT template.
QUESTION: can you think of a value for the Altitude element that the
XSLT template would accept, but a schema validator would reject? Can
you think of a value for the Altitude element that the XSLT template
would reject, but a schema validator would accept?
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