Hi all,
Did some tests to no avail. To restate, I want to read an XML document
for which I have no DTD. I don't want to validate against the DTD, but
I do want to report errors on non-standard built in entity references
(like é).
So,
If I have no DTD in the XML all is ok, references are reported
if I have a DTD in the XML and validate, its all ok. (when DTD available)
if i have DTD and don't validate/load external DTD, there are no
reports on entity references.
I can add an EntityResolver, but that can only redirect to an exisitng
DTD. When redirecting to an empty DTD I get messages on undefined
elements (it 'finds' a DTD but elements in the XML are not defined in
there.)
I tried adding a LexicalHandler and not validate (otherwise, see
above), but start-/endEntity is not called in that case.
So one option would be to have an 'open' DTD definition with something like
<!ELEMENT Root ANY>
Which seems also not possible as all elements must be defined in the DTD.
Anything I overlooked or other ideas?
Otherwise giving up on this...
Michel Hendriksen
On Fri, Jan 4, 2013 at 4:58 PM, Andrew Welch
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> wrote:
On 4 January 2013 14:57, Michel Hendriksen
<michel(_dot_)hendriksen(_at_)42(_dot_)nl> wrote:
Ok makes sense.
What you are actually saying is that there is no way you can force
this to be an error, unless having a processor that would be willing
to do so?
You could supply your own EntityResolver and catch it there, or a
LexicalHandler, or have a look at 'Lexev' (
http://andrewjwelch.com/lexev/) and handle it in xslt.
--
Andrew Welch
http://andrewjwelch.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--