Thanks Mukul. But still there are some points that are not quite clear to
me. For an example can't we build a Schema DOM with the DOM implementation
available for XML? Can you please tell me the exact usage of XSModel? The
only thing I know is that it's an object model for schema. But what really
makes it different from DOM?
>From the two possible implementation strategies that you have mentioned, in
the second way, you've said that it's possible to create a Schema DOM with
XSSerializer utility. Is that the only way that one can build a DOM for a
schema? Are there any serious implementation differences of the DOM for a
schema from that of an XML?
thanks in advance.

On Tue, Feb 23, 2010 at 2:50 PM, Mukul Gandhi <[email protected]> wrote:

> Hi Ishan,
>   Please read my answers inline.
>
> On Tue, Feb 23, 2010 at 12:46 PM, Ishan Jayawardena <[email protected]>
> wrote:
> > Is the purpose of this class to take an XSModel object as an input an
> then
> > create DOM document out of it?
>
> No, that's not the goal of this utility. The DOM object in
> XSSerializer is just an intermediate representation of the input
> Schema, which we serialize to lexical XSD syntax (which we see in a
> text editor for example). Producing the lexical XSD syntax as output,
> is the actual goal of this utility.
>
> But interestingly, looking at a DOM model of XSModel is also a useful
> representation, to look at I guess.
>
> > what does the term "lexical, XSD syntax" means in "XSModel serialization
> utility. *
>
> I've explained this above.
>
> > I'm trying to implement SCD support for Xerces. So do you have any idea
> about
> > how to use the output of the method transformXSModelToDOM() in
> implementing
> > SCD? Can we use both XSModel and the output of transformXSModelToDOM()
> > method to traverse a schema documet? What is the purpose of having two
> > representations?
>
> After having a quick look at SCD spec, I guess implementation of SCD
> would require following implementations:
> 1. Parser & evaluator for SCD syntax (ref,
> http://www.w3.org/TR/xmlschema-ref/#section-scd-syntax).
> 2. Parser & evaluator for Schema Component path syntax (ref,
> http://www.w3.org/TR/xmlschema-ref/#section-path-syntax).
>
> The evaluation of SCD paths, could return references to Schema
> components (from the input schema document).
>
> The SCD path expressions would operate on some in-memory
> representation of input Schema.
>
> Quickly, I could suggest following implementation strategies for
> Xerces SCD implementation:
> 1. The first implementation variant, could take XSModel as input, and
> return say a list of XSModel schema objects, after evaluation of the
> SCD path expression.
> 2. The second variant, could take Schema DOM as input (which you could
> re-use from the XSSerializer utility, that i've written), and return a
> list of Schema DOM nodes, after evaluation of the SCD path expression.
>
> > Also, Is there a similar implementation for SAX as well?
>
> I don't think, this exists at present. But I guess, an implementation
> of this could be possible.
>
> Probably, somebody could add more to this discussion.
>
>
> --
> Regards,
> Mukul Gandhi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to