Just tested the your suggestion of ExternalSubsetResolver.
Thanks, this works great!


Op 16-okt-2006, om 23:50 heeft Michael Glavassevich het volgende geschreven:

Dick Deneer <[EMAIL PROTECTED]> wrote on 10/16/2006
05:20:47 PM:

As you have probably seen, I created XERCESJ-1204 for this issue.

Thanks.

Maybe you can take the opportunity to create something like a
XMLEntityResolver2, which also has an getExternalSubset method.
In fact EntityResolver2Wrapper has it all.

Something like that already exists though it isn't part of XNI. Take a
look at ExternalSubsetResolver [1]. If your XMLEntityResolver implements this interface the parser will call its getExternalSubset() method if the
document doesn't have an external subset.

This way it also would become possible to use the XMLEntityResolver
when validating against an external (user assigned) DTD if there is
nothing declared in the xml instance. In the getExternalSubset we
could then return the external DTD.
Now when using XMLEntityResolver in the saxParser there is no other
way than actually insert the doctype in the source, because the
properties "http://apache.org/xml/properties/schema/external-
schemaLocation" or "http://apache.org/xml/properties/schema/ external-
noNamespaceSchemaLocation" do not have affect when validating against
a DTD.
In the DomConfiguration this is no problem because
DOMConfiguration.setParameter("schema-location", schema) works for
both XMLSchema and DTD.

[1]
http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/ xerces/impl/ExternalSubsetResolver.html


Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

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





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

Reply via email to