This should be really straight forward but I seem to be missing something.
I need to be able to specify the schema location for various namespaces when
creating a DOM (and later validating it in memory using normalizeDocument).
Essentially I need the equivalent of xsi:schemaLocation in the following
snippet:

<p:policy 
        xmlns:p="http://www.ephox.com/examples/policy";
xsi:schemaLocation="http://www.ephox.com/examples/policy
http://boardroom/tesoro/policy.xsd";>


Due to the requirements for our appliation (applet to be precise), we're
doing all kinds of things we shouldn't be and using a whole heap of Xerces
internal APIs throughout our application.  So when parsing the DOM I need to
get an instance of org.apache.xerces.dom.DocumentImpl.   On the plus side,
it means we can use pretty much any known means to set the schema location.
:)

Now, from http://xml.apache.org/xerces2-j/properties.html, it looks like
"http://apache.org/xml/properties/schema/external-schemaLocation"; is the
property we want to set, but DOMBuilderImpl doesn't recognise that property.
If instead we use "schema-location" we can set what seems to be the
no-namespace schema location, but it doesn't work if namespaces are used and
just produces an error if you try to use the xsi:schemaLocation style
syntax.

We have previously been able to just use xsi:schemaLocation in the document
being parsed and that's worked perfectly, however requiring this to be added
to every document passed into our app is unacceptable - at least to my boss
:).

So what obvious setting am I missing, or have I gone and outsmarted myself
by using APIs I shouldn't be using?

Thanks in advance,

Adrian Sutton, Software Engineer
Ephox Corporation
www.ephox.com 

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

Reply via email to