This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.