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

Canonical lexical representation of a value for a type derived by restriction

From: George Cristian Bina <george@oxygenxml.com>
Date: Tue, 21 Aug 2007 17:41:57 +0300
Message-ID: <46CAF9B5.3090200@oxygenxml.com>
To: xmlschema-dev@w3.org
Canonical lexical representation of a value for a type derived by  restriction

Hi,

I have difficulties to find in the XML Schema specification how the 
canonical lexical representation for a value from a type derived by 
restriction is computed.
Let's consider an example. We have a type derived from duration that 
restricts duration to allow only values that match some pattern:

<xs:simpleType name="ShortPositiveDuration">
   <xs:restriction base="xs:duration">
     <xs:pattern value="PT.*"/>
   </xs:restriction>
</xs:simpleType>

What will be the canonical lexical representation for the following value?
PT10H30M50.123S

Xerces for instance computes that taking into account the base type and 
it gets P0Y0M0DT10H30M50.123S as canonical lexical representation for 
the above value.
Is that right?
Or is the canonical lexical representation the same as the value 
PT10H30M50.123S in case of a restriction as above?

Thanks,
George
---------------------------------------------------------------------
George Cristian Bina - http://aboutxml.blogspot.com/
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Received on Tuesday, 21 August 2007 14:43:40 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

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-2007 All Rights Reserved.