You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Blake Meike <bl...@world.std.com> on 2003/05/03 19:23:56 UTC

XSD Grammar documentation

Hi,
   I posted a similar message on x-j-user last week and got no response, 
so I'm escalating.

   Is there documentation about on XSGrammar, what it is and how it 
works?  I'm reading the code, but it would be a huge help to me to have 
a high-level doc the described the underlying architecture...

Thanks,
   Blake Meike


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: XSD Grammar documentation

Posted by Blake Meike <bl...@world.std.com>.
Hi Neeraj,  Thanks for the help.

> This object is created when XMLSchema is parsed and this interface 
> provides
> access to the XML Schema components. These are Schema component model 
> APIs
> [1]

Yes, of course.  My question is "what is the architecture of this 
object?"  As I mentioned, in my original question, I am currently 
reading the code and javadoc for these objects.  They are very much 
street-level, though; it would be quite helpful to have an overview 
that described, at a higher level, how the pieces fit together.

>> In particular, can I use it to to
>> validate changes made in the DOM?
>
> I dont understand it. What is your requirement ? Are you talking about
> re-validating DOM [2] in the memory ?
>
> [2] http://xml.apache.org/xerces2-j/faq-dom.html#faq-7

Yes, that is one goal.  Understanding what is going on is another.

As I mentioned, I did read the available FAQ.  I found [2] somewhat 
helpful.  It, however, gives a recipe for re-validating an in-memory 
DOM.  It doesn't describe what the XSModel is or how it is involved in 
the re-validation.  It actually doesn't address using an 
already-in-memory XSModel to perform the revalidation at all (it is 
partially addressed in [3] below).  In fact, since the re-validation 
described in [2] is driven by a method on Document, it suggests that at 
least some of the validation machinery is actually in the DOM objects.

What I'm looking for is a document that describes, at a high level, the 
architecture/structure of the XSModel.  It would be a tremendous help 
to a student of the implementation.

Blake Meike

[3] http://xml.apache.org/xerces2-j/faq-grammars.html#faq-3


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: XSD Grammar documentation

Posted by Neeraj Bajaj <ne...@sun.com>.
Blake Meike wrote:

>
> > in turn allows you to retrieve
> > further information about XML Schema like Element declaration,
> > attribute
> > decalarations, targetNamespace etc.  Note that these (PSVI) interfaces
> > are
> > deprecated.
>
> This is the part about which I'd like more information.  What is the
> XSMode, and how does it work?

This object is created when XMLSchema is parsed and this interface provides
access to the XML Schema components. These are Schema component model APIs
[1]

> In particular, can I use it to to
> validate changes made in the DOM?
>

I dont understand it. What is your requirement ? Are you talking about
re-validating DOM [2] in the memory ?

Neeraj

[1] http://xml.apache.org/xerces2-j/faq-xs.html#faq-3
[2] http://xml.apache.org/xerces2-j/faq-dom.html#faq-7


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: XSD Grammar documentation

Posted by Blake Meike <bl...@world.std.com>.
On Monday, May 5, 2003, at 04:07 AM, Neeraj Bajaj wrote:

> Have you gone through this.
> http://xml.apache.org/xerces2-j/faq-grammars.html

Of course. :)

>>    Is there documentation about on XSGrammar, what it is and how it
>> works?
>
> javadoc comments do contain some information but it seems its not 
> enough.
> When you are using pre-parsing API to parse a grammar, you get the 
> return
> type as Grammar. If the return Grammar object is of type W3C XML 
> Schema you
> can convert that object to XSGrammar. It has only one function which 
> allows
> grammar to be converted to XSModel which

Yes, this is a re-iteration of the explanation in the FAQ.

> in turn allows you to retrieve
> further information about XML Schema like Element declaration, 
> attribute
> decalarations, targetNamespace etc.  Note that these (PSVI) interfaces 
> are
> deprecated.

This is the part about which I'd like more information.  What is the 
XSMode, and how does it work?  In particular, can I use it to to 
validate changes made in the DOM?

Blake Meike


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: XSD Grammar documentation

Posted by Neeraj Bajaj <ne...@sun.com>.
Blake Meike wrote:

> Hi,
>    I posted a similar message on x-j-user last week and got no response,
> so I'm escalating.
>

Have you gone through this.
http://xml.apache.org/xerces2-j/faq-grammars.html


>
>    Is there documentation about on XSGrammar, what it is and how it
> works?

javadoc comments do contain some information but it seems its not enough.
When you are using pre-parsing API to parse a grammar, you get the return
type as Grammar. If the return Grammar object is of type W3C XML Schema you
can convert that object to XSGrammar. It has only one function which allows
grammar to be converted to XSModel which in turn allows you to retrieve
further information about XML Schema like Element declaration, attribute
decalarations, targetNamespace etc.  Note that these (PSVI) interfaces are
deprecated.


Neeraj


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org