[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Best Practice - beyond schema
Title: RE: Best Practice - beyond schema As I understand it, this is one of the problems with derivation by restriction. Yes, a change to the base type should carry through to the derived types. If I use extension and add an element to the base type definition, my derived types don't need to be touched - they will now require that extra element in any document CM conforming to their type. I don't need to go and explicitly change all schemas which extend this type. Changes DO carry through. However, with restriction, the entire content has to be copied, then restrictions defined, so if I, for example, add an element to the CM of the base type definition, I need to then go and add that to all my derived type definitions. So changes do NOT carry through - they have to be made explicitly (well, they carry through in the sense that all the derived schemas will have errors, but this doesn't classify as "maintainability" in my book). Restriction is reuse by copy, not reuse by inheritance. Maybe I'm wrong about this, and the entire CT definition doesn't have to be duplicated in the restriction, but I've tried to get clarification of this in the past without much success, and the XSD primer and any experts I've heard talk about it say this is the case. John PS: TANSTAAFL is too long an acronym to parse. It sounds like the name of a South African province. -----Original Message-----
"Anderson, John" <John@B...> writes: > Unfortunately, this mechanism below would not seem to remove mainteneance of
TANSTAAFL -- the whole _point_ of using derivation is so that changes
ht
The information transmitted by this e-mail message is intended solely for the use of the person to whom or entity to which it is addressed. The message may contain information that is privileged and confidential. Disclosure, dissemination, distribution, review, retransmission to, other use of or taking any action in reliance upon this information by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail (including the original message with your reply) and then delete and discard all copies of the message. Although we have taken precautions to minimize the risk of transmitting viruses we nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by viruses.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|