xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamison Adcock" <jadc...@cabcds.org>
Subject Getting the "schemaLocation" from an XML document
Date Tue, 30 Jan 2007 18:23:04 GMT
Hi,
    I'm somewhat familiar with XML documents, XSD schemas, and Xerces,
but I must admit I am relatively new to all three.  I understand that a
schema reference in an XML document is just a hint, and when parsing an
XML document you can use loadGrammar() to tell the DOMBuilder object to
use a specific XSD schema file to validate that document.
    My question is this: is there a way to do some sort of preparsing of
an XML document so I can pull the "schemaLocation" from that document
prior to doing any validation?  I want to do this because I need to map
the "schemaLocation" to the actual local XSD schema file I would like to
use for validation.
    Also, just to make things even more fun, schemas can import other
schemas.  From what I've seen, this doesn't pose any problems for
Xerces, so long as the imported schemas are all in the same directory as
the importing schema.  However, is there a way to turn this feature off
in Xerces and explicitly specify all the schema files I want to use to
validate an XML document?
      This seems like something Xerces would support, and perhaps I'm
missing something.  I've hunted through the API documentation, but I
have not come across anything that looked like what I want.  Any
pointers would be greatly appreciated,
 
thanks,
-Jamison
 
p.s.: Sorry if anyone received this email twice... I had some issues
subscribing & I wasn't sure if this email got to the list.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message