File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Simple Type Inheritance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Simple Type Inheritance" Watch "Simple Type Inheritance" New topic

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
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 ( provides the following example:

<xsd:element name="internationalPrice">
<xsd:extension base="xsd ecimal">
<xsd:attribute name="currency" type="xsd:string"/>

-- <br />Richard Monson-Haefel<br /><a href="" target="_blank" rel="nofollow"></a>
Weerawit Maneepongsawat
Ranch Hand

Joined: Apr 11, 2002
Posts: 203
Thank you,
So we can inherite simply type only restriction...
wood burning stoves
subject: Simple Type Inheritance
It's not a secret anymore!