[EMAIL PROTECTED] wrote:
>
> Hi Edwin,
>
> Here's what we did in Xerces1: since publicIds are (or at least were) very
> DTD-specific, we don't use that field of an EntityResolver in this context.
> We passed the namespace of the imported schema in the systemId field, and
> only used the schemaLocation field ourselves if this other method didn't
> provide us with a schema. The thought behind this, I conjecture, was that
> the application-writer, who supplies both the schemas and the
> EntityResolver, should be able to keep a mapping between his namespaces and
> his files (or has some method of doing so; else why provide the entity
> resolver?) A schema hint is really only useful to a default
> implementation--like ours.
Thanks for the reply. Since I didn't get an immediate reply, I tested
this myself. Maybe I misunderstand, but what I found does not seem to
exactly match your description. I tried Xerces 1.4.3. It appears that
there are 4 ways to specify a schema:
1) In instance doc:
1a) xsi:schemaLocation="namespace-name schemaURI..." pairs
1b) xsi:noNamespaceSchemaLocation="schemaURI"
2) Via an external property that overrides the xsi attributes
2a) http://apache.org/xml/properties/schema/external-schemaLocation
2b) corresponding noNamespace version
It looks like the EntityResolver gets passed the "schemaURI" part as the
systemID and the namespace-name is not used. The publicID is "" as you
state above.
-Edwin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]