How do I set the preparser to choose to look first in the GrammarPool and only then to look for the namespace via the import? (feature, property)? The thing is that in my program the parser will not be able to access neither a local or external URL - I have a special loader that reads files etc. and I dont want to override the parser to access in the same way - I will make sure when preparsing a schema all the necessary namespaces will already be in the current GrammarPool

Thanks by the way for replying!

From: "Jeff Greif" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: Re: Preparse with existing Grammar Pool
Date: Thu, 23 Jun 2005 05:53:59 -0700

As a matter of specification, to be valid itself, a schema must import all
the namespaces it references.  In the <import> element it need not specify
where to find the imported schema, and if it does specify it, the
specification may be ignored by a validator that can access the grammar
another way.

As a matter of implementation of the validator, the validator may find an
imported schema in a variety of ways.  One of these is to use a grammar for
the namespace that it already holds, e.g. in a Xerces grammar pool.

Thus, in (pre)parsing a schema with an import, a parser with a grammar pool
does not necessarily need to open a URL and read a serialized schema in
order to build the importing grammar.  If a Xerces parser is configured to
use a grammar pool that contains the imported schema's grammar, the imported
grammar should be used by default, and not need to be parsed again.

Jeff
----- Original Message -----
From: "Guy Sharon" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 23, 2005 4:08 AM
Subject: Preparse with existing Grammar Pool


| Hi,
|
| I am interested in extending my grammar pool during the execution of my
| program. So in the beginning I want to preparse a schema for grammar and
| later receive another schema to have its grammar be added to the pool.
| However, the additional schemas all reference elements that were defined
in
| the first schema.
|
| Is it possible to preparse the additional schemas without each importing
the
| first schema but rather validate via the existing GrammarPool?



---------------------------------------------------------------------
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]

Reply via email to