Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: George Cristian Bina <george@---------.--->
To: xmlschema-dev@--.---
Date: 8/21/2007 8:42:00 PM
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
www.---.com



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent