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 Taras Tielkes <ta...@info.nl> on 2001/10/29 16:31:50 UTC

Forcing my own schemaLocation and schema caching

Hi,

Two questions:

1)

I use Xerces-J to validate some xml documents against XSD Schemas.
It seems setting the external-schemaLocation property will override the
equivalent attribute in the source XML document.
In other words, specifying a schema location programmatically will override
any schema instance location specified in the document itself.

This is what I want. But is this behaviour guaranteed? The online docs are
not very specific.
Is there a way, in this scenation, to somehow construct an invalid document
that will not be validated? For instance, using a namespace and a schema
instance location while my program was expecting a document without a
namespace (and only set the noNamespaceSchemaLocation property).


2) 

Is there a way to cache an instance of the Schema in memory? Currently I
have to specify a schema location for every document I want to validate.
Ideally, I'd put all the parsed schemas in a big in-memory hashtable.

I'm using Xerces 1.4.3.

Thanks in advance,

// tt

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