Dale Worley wrote:
On Mon, 2007-09-17 at 22:18 +0200, Boris Kolpackov wrote:
Hi Dale,
Dale Worley <[EMAIL PROTECTED]> writes:
What do you do if the root element does not specify the namespace, but
the caller of Xerces knows what the namespace must be?
If the root element does not specify a namespace then this element
is not in any namespace. The declaration for such an element will
be searched in a grammar corresponding to a schema without a target
namespace.
OK, how do I instruct Xerces that the grammar/schema without a target
namespace is in the file named foo.xsd?
You can use loadGrammar() with an empty string for the namespace URI, or
use the property
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation".
See here for more information:
http://xerces.apache.org/xerces-c/program-dom.html#DOMBuilderProperties
Dave