wood burning stoves 2.0*
The moose likes Web Services and the fly likes Is this statement in RM book still valid or dated ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Is this statement in RM book still valid or dated ..." Watch "Is this statement in RM book still valid or dated ..." New topic
Author

Is this statement in RM book still valid or dated ...

Rajeev Trikha
Ranch Hand

Joined: Jan 29, 2010
Posts: 85
"Most object-oriented languages do not support the full scope of inheritance defined by the XML schema specification. For this reason, you should use type inheritance in schemas with care."


Rajeev Trikha (SCJP 6)
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
XML schema allows two types of inheritance; extension and restriction.
Extension is easy to accomplish in, for instance Java, or some other OO language: Just add new fields to the subtype.
Restriction is slightly more complicated, since you cannot remove fields from a superclass in a subclass.
It is possible to override any getters and setters for a field to be removed and make them do nothing, but the field is still there.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this statement in RM book still valid or dated ...