I found the sample

samples/xni/XMLGrammarBuilder.java

very useful for building up a known grammar pool. It also improves performance by preparsing all your schemas and making them available to your parsers.

Pete

Martin Marinschek wrote:

Hi all,

I would like to do the following:

1) Validate an XML File
2) Using several schema files, one main-schema file including /
importing several others
   (via import/include tags)
3) I cannot change the syntax of this schema files
4) I want to do all this in memory, where I directly load the files as
a stream from a database

I have that running when I do the validation based on files, no problem.

As soon as I try to specify the schema files as streams (e.g. via the
saxParser.setProperty(JAXP_SCHEMA_SOURCE,schemaInputStreams()
property) the problems start to creep in.

The problem is especially that the location cannot be provided in any
ways to the parser - and searching on the file-system will not help as
there is nothing there to be found ;)

How do I get this functionality working? I thought about having
something like the EntityResolver, only one step further down the
food-chain, where I would provide the streams for the schema-locations
and the parser would not go searching on the file-system...

Is there any such possibility in Xerces?

regards,

Martin

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