wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes The final Attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "The final Attribute" Watch "The final Attribute" New topic
Author

The final Attribute

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I saw this statement: If a type is declared final="restriction", it can be extended but not restricted. If the final attribute equals "#all", the type cannot used as a base type at all.

Therefore, I suppose that if a type is declared final="extension", it can be restricted but not extended. However, some code (see below) looks like extending while the type is declared final="extension". I am confused. Please help. Thank you.

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
In your example, it is the USAddress type that cannot be extended (but restricted). The XML schema fragment does not say anything about the Address type, from which the USAddress is extended.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I see. Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The final Attribute
 
Similar Threads
override an attribute from parent element?
Doubt on XML Schema validity
Inhertiting complex type in XML Schema
Inhertiting complex type in XML Schema
xsd question