Thanks for the reply, Comments below...
> -----Original Message----- > From: Gareth Reakes [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 17, 2005 12:58 AM > To: xerces-c-dev@xml.apache.org > Subject: Re: Advanced novice question about PSVI > > 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? There is a general mapping between schema types and application classes. Think of it as a way to save an application as a graph provided you know what the node definitions are ahead of time. > > > 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. Well I see this in the PSVI classes and I have started development on it, but here is really where my questions are: How do you get all the sub elements of complexContent or other composite types? > > > 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. > Of course, as stated above your correct. > > > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]