Hi,
I have a question whether I can use PSVI for an algorithm I have in mind...
My goal is to take the content model from XSD schema documents and transform it into an ordered graph/tree that can be used to serialize application data in the order corresponding to the content model. If the schema's content model changes then the algorithm automatically rebuilds the graph/tree to for serialization.
Is there any mapping between the application and the schema? How will you decide on how to map to things like recursive definitions and choices?
What I don't understand is how to transform an XSD schema document, with all its verbose structures, into a simple directed acyclic graph (or tree) of element identifiers that mimics the content model. Basically I would build something that looks like an instance document and not an XSD document, or I would build an in memory graph of the same purpose.
You can get hold of the grammar after you cache it (and in other ways). That gives you a set of classes that define the content model.
And if so, somehow, can the PSVI classes then be used to create a simple mirror of the content model?
XML Schema and simple in the same sentence :) You can define very complex content models and the resulting grammar would be hard to map onto application data without prior knowledge.
I have a feeling that I may need to do a two step process here: use XSLT to transform the XSD to a simple model, then build the in memory representation from the simplified model.
Can you expand on what you mean by simple?
Gareth
-- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://www.parthcomp.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]