- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Thu, 4 Apr 2002 23:55:23 +0100
- To: paul.w.daisey@census.gov
- CC: costello@mitre.org, Simon.Cox@csiro.au, dwc@mitre.org, plj@mitre.org, dhoward@mitre.org, <xmlschema-dev@w3.org>, <gml30.rwg@opengis.org>
Paul, > I thought Jeni Tennison's comments on potential disadvanges of > definition by composition were quite thorough. The "killer" > advantage of design by subclassing was the one I was going to raise, > that it explicitly retains type inheritance identification; E isa D > isa C isa B isa A, in the extension / restriction base="" attribute. > This is an advantage not just in XML, but also in using XML/Schemas > as the quasi-MDA base for object definitions in languages like Java, > for example with a product like Castor, whereby the type inheritance > identification is passed to the generated language classes. I'm not > sure I entirely agree with the conclusion: " information about the > model groups that have been composed to create a content model is > lost(I believe)". I think that it is possible to write xslt to > determine the implicit type inheritance hierarchies in XML/Schema > types defined by composition by comparative inventory of their > contents. But in any case the type inheritance information is > certainly less accessible than in the design by subclassing case. Possibly. I was talking about the fact that there's nothing in the PSVI that keeps tabs on what model groups were used within a particular complex type - the model group references are resolved to their model groups to create the particles in the content model of a complex type. So given a schema (in the abstract sense rather than an XML representation), I don't think that you can tell where a particular model group definition has been referenced. You're right that given an XML representation of a schema, you could use XSLT to work out which complex types and model group definitions share particular model group definitions and construct a hierarchy that way. But in general I don't think that information (about the original XML representation of the schema, given there is such a thing in the first place) will be available within a schema-aware processor. (The same argument applies to attribute groups, which are resolved to attribute uses when a complex type definition schema component is created.) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Thursday, 4 April 2002 17:55:25 UTC