You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jeff Greif <jg...@alumni.princeton.edu> on 2007/10/18 19:01:25 UTC
Caching XSModel instead of SchemaGrammar?
Xerces-J has the very useful feature of GrammarPools, caching
SchemaGrammars (and other Grammars) for use in parsing. However, in
recent versions, SchemaGrammar has been marked as an internal class
subject to removal. The DOM Level 3 Load and Save XSModel class seems
to be in some ways similar, but I've seen no way to cache a set of them
and provide them to a validating parser. Have I missed something? Is
there some documentation somewhere of a way to do this?
Jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: Caching XSModel instead of SchemaGrammar?
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Thanks much, Michael. XSGrammar should do the trick.
Jeff
On 10/18/07, Michael Glavassevich <mr...@ca.ibm.com> wrote:
> Hi Jeff,
>
> Jeff Greif <je...@gmail.com> wrote on 10/18/2007 01:01:25 PM:
>
> > Xerces-J has the very useful feature of GrammarPools, caching
> > SchemaGrammars (and other Grammars) for use in parsing. However, in
> > recent versions, SchemaGrammar has been marked as an internal class
> > subject to removal.
>
> All of the implementation interfaces / classes have that notice. It's a
> warning to users that their code may not work with future versions of
> Xerces if they choose to use them directly.
>
> SchemaGrammar is an instance of XSGrammar [1]. Is there a particular why
> you're not just coding to that interface?
>
> > The DOM Level 3 Load and Save XSModel class seems
> > to be in some ways similar, but I've seen no way to cache a set of them
> > and provide them to a validating parser. Have I missed something? Is
> > there some documentation somewhere of a way to do this?
>
> You haven't missed anything. There's no way to extract the grammar objects
> from the XSModel (to pass to a grammar pool).
>
> > Jeff
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
>
> Thanks.
>
> [1]
> http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/grammars/XSGrammar.html
>
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: Caching XSModel instead of SchemaGrammar?
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Jeff,
Jeff Greif <je...@gmail.com> wrote on 10/18/2007 01:01:25 PM:
> Xerces-J has the very useful feature of GrammarPools, caching
> SchemaGrammars (and other Grammars) for use in parsing. However, in
> recent versions, SchemaGrammar has been marked as an internal class
> subject to removal.
All of the implementation interfaces / classes have that notice. It's a
warning to users that their code may not work with future versions of
Xerces if they choose to use them directly.
SchemaGrammar is an instance of XSGrammar [1]. Is there a particular why
you're not just coding to that interface?
> The DOM Level 3 Load and Save XSModel class seems
> to be in some ways similar, but I've seen no way to cache a set of them
> and provide them to a validating parser. Have I missed something? Is
> there some documentation somewhere of a way to do this?
You haven't missed anything. There's no way to extract the grammar objects
from the XSModel (to pass to a grammar pool).
> Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
Thanks.
[1]
http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/grammars/XSGrammar.html
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org