Bernie wrote:
> Is it possible to use a schema instead of a dtd? How would I 
> specify to use a schema in this xml?

Well, the technical way of specifying your Schema would be to
add the following attributes to your root element:

  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='urn:loc.gov:books      books.xsd
                      urn:ISBN:0-395-36341-6 isbn.xsd'

I'm doing this from memory but since I personally don't use
XML Schemas it may be wrong.

However, I believe that without this explicit location "hint",
Xerces will attempt to use the URI that you specified in the
namespace binding as a possible location of the the XML Schema
grammar(s) in question. However, URNs (which are a subset of
URIs), don't have a direct mapping to a physical location so
you would need to use an EntityResolver registered with the
parser to intercept these requests and map them to correct
locations.

Again, I'm doing this from memory. Someone closer to the actual
implementation of the XML Schema pieces would know better.

-- 
Andy Clark * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to