| Author |
Simple Type Inheritance
|
Weerawit Maneepongsawat
Ranch Hand
Joined: Apr 11, 2002
Posts: 203
|
|
Can simple type inherite by extension ? and how pls provide some example. Thank you
|
Weerawit<br />SCJP 1.4, SCWCD 1.2, SCWCD 1.4, SCBCD 1.3, SCBCD 5.0, SCMAD 1.0, SCJA 1.0, SCDJWS, SCJD, SCEA, SCDJWS 1.5
|
 |
Richard Monson-Haefel
author
Ranch Hand
Joined: Oct 31, 2003
Posts: 92
|
|
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>
|
-- <br />Richard Monson-Haefel<br /><a href="http://www.Monson-Haefel.com" target="_blank" rel="nofollow">http://www.Monson-Haefel.com</a>
|
 |
Weerawit Maneepongsawat
Ranch Hand
Joined: Apr 11, 2002
Posts: 203
|
|
Thank you, So we can inherite simply type only restriction...
|
 |
 |
|
|
subject: Simple Type Inheritance
|
|
|