Re: what schema to include?

Hi Evyatar,

> Yes, but there are still at least 2 cases when I don't have the URL:
>
> 1) suppose a.xsd and b.xsd are not files. Suppose I supply them as
> InputSource in my custom Entity Resolver (They are in my database as
> strings). When my Entity Resolver is requested to resolve c.xsd, how
> should it know which one?
>
> 2) if in a.xsd and in b.xsd I have <xsd:include
> schemaLocation="c.xsd"/> - where is the URL ?

If you mean to refer to different documents from the two files, why
not use different identifiers for those documents e.g. refer to c.xsd
from a.xsd and to d.xsd from b.xsd?

Or perhaps when you initialise your custom EntityResolver, you could
set a property that indicates which file you're reading from? If your
custom EntityResolver is part of a ContentHandler, you could use the
Locator to work out what file's being used.

Anyway, I don't think that these are really questions about XML
Schema. I assume you're using Xerces-J? Perhaps you should try asking
about how to use it on xerces-j-user@xml.apache.org.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Thursday, 24 October 2002 10:55:08 UTC