Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple Type Inheritance

 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can simple type inherite by extension ? and how pls provide some example.

Thank you
 
Richard Monson-Haefel
author
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes ... well kind of. You can create a new ComplexType that is an extension of a built-in type. The w3c XML Schema Primer (http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/) provides the following example:

<xsd:element name="internationalPrice">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd ecimal">
<xsd:attribute name="currency" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,
So we can inherite simply type only restriction...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic