OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Subtyping in XML

[ Lists Home | Date Index | Thread Index ]

Well, I read the entire thread and links for once.

Still, some nagging questions concerning "bad" extension. To my mind, there
are three types of extension, some less bad than others in their effects on
processors:

1) extension of the value space
2) extension of the "content" space
	2a) addition of elements restricted in occurrence
	2b) addition of new or unrestricted elements
	2c) addition of attributes

I've ranked these from bad to less bad, with reasons as follows. My
recollection of what's allowed or disallowed by XML Schema is somewhat hazy
(and oddities abound, besides), so I'm not going to restrict my speculation
in that regards:

1) Adding new value members to the value space of a type can't be any good
under any circumstances.  It's possible to think up some use for such a
feature, but it would no doubt be better implemented using one of the other
mechanisms.

2) "Content space" refers to all specified child elements and attributes in
a type definition (there's probably a term for this already, but I've a
peasouper of mental fog today). The big fork in the road here is whether the
model group of elements is sequenced or not. 

2a) If it's unsequenced, then addition (via extension) of new elements that
were restricted in occurrence in the supertype would likely break the bank.
For sequenced content, it seems less of a worry, taking Paul's XSLT example
as a worse case. Frankly, if you're not blocking extension of sequenced
content, you have to accept what you're given. Does that take too much
discipline? I'm the wrong person to ask, but a schema editor might support
an autoblocking configuration for complextype extension.

2b) This seems the least cause for concern.  The one gotcha is that
unanticipated content may need to be preserved by a processor for later
regurgitation to other processes in the chain.  If a process knows
(assumes?) that it is a terminating one,  then exceptions should be thrown
for content not processed.  If such extra content was used further upstream,
then it seems reasonable to have it filtered out prior to hitting the
terminal process.

Okay, so it's tricky :-)

2c) What's a little extra attribute between friends?  Okay, okay: same as
2b, methinks.

Now, within the whole constellation of XML technologies, anything can be
made to look bad given the properly constructed examples.  I would hope,
though, that the inverse order of badness given above can be preserved.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS