Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: empty xs:extension of a simple type

From: "Andrew Welch" <andrew.j.welch@-----.--->
To: "Michael Kay" <mike@--------.--->
Date: 10/8/2008 4:26:00 PM
2008/10/8 Michael Kay <mike@s...>:
>>
>> I'm looking at a machine generate schema which contains this:
>>
>> <xs:complexType name="foo">
>>   <xs:simpleContent>
>>     <xs:extension base="xs:string">
>>     </xs:extension>
>>   </xs:simpleContent>
>> </xs:complexType>
>>
>> That's just the same as type="xs:string" isn't it?
>>
>
> Not quite. It's a complex type rather than a simple type. It validates the
> same content as xs:string, but it can be extended and restricted (and
> unioned and listed...) in different ways from xs:string. It's likely to
> behave differently when you do Java data binding, and it's certainly
> different when you do type-aware XQuery and XSLT.

Different in a good way or different in a bad way? :)

Depending on the answer to that, I'm wondering if instead of using
type="xs:string" it would be worthwhile to have type="myString" with:

<xs:complexType name="myString">
 <xs:simpleContent>
   <xs:extension base="xs:string"/>
 </xs:simpleContent>
</xs:complexType>




-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

From rowan@s... Mon Oct 13 07:18:27 2008
Received: from farnsworth.w3.org ([1


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