Benson Margulies <[email protected]> wrote on 04/06/2009 10:30:46 AM:

> The data model issue, I think, is the crux here. My belief is that
> XmlSchema users need to ingest, modify, and then emit XML documents
> containing schema, and I think these documents need to be
> recognizable to their original authors when written back out. For
> example, if a user's schema uses xs:include or xs:import to pull in
> a schema from someplace else, ending up with a schema that just
> merges the content inline, with no reference to the original, could
> be a problem. Things like attribute groups have a role to play in
> creating schemas that are readable to humans.  <xs:annotation><xs:
> documentation>blah</xs:documentation></xs:annotation> is another
> thing that would be pretty hard to preserve.

FYI: Annotations aren't a good example. They are part of the component
model and do get preserved in Xerces.

> A programmer working, say, with the CXF Aegis binding, can open a
> book on Xml Schema, and find an API that corresponds to the
> constructs he or she sees there. In the model you are describing,
> that person would need to become familiar with the underlying model.
> I'm not by any means describing this as a fatal flaw, just a
consideration.

Different goals. Xerces' API represents the abstract model described for
PSVI and a consumer of that would expect this component view and should
already be familiar with it given that they are interested in processing
PSVI.

> My decision to allow XmlSchema to depend on 1.5 for my own
> convenience is not a big deal. If we were to come up with a plan for
> a unified approach, I don't see any problem with retreating in version
space.
>
> I don't, then, see using the Xerces rep as the one-and-only rep as
> viable, due to the data model issues. However, it might be that some
> sharing with it could make various things more efficient and
> slimmer. Could one imagine mapping more directly from the XmlSchema
> 'surface' objects to a Xerces model as a more efficient way to
> obtain a Schema object?

Might be technically possible but would probably be a huge effort. Is it
really that important that it's fast? JAXP Schema objects are best utilized
by caching and reusing them. Ditto for the Validator objects created from
them. The cost of creating them in a long running application should
usually be negligible compared to the time spent doing other things
(including using these objects for validation).

> I probably need to do more reading before commenting further.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [email protected]
E-mail: [email protected]

Reply via email to