xsl-list
[Top] [All Lists]

Re: [xsl] Without DTD Mapping

2008-08-26 05:18:03
David Carlisle wrote:
LexEv currently will still try and fail to resolve the entity... but
that would be a useful feature to add...

If there is an external dtd that hasn't been read then an application
can (if it wants) trap the undefined entity and do something with it (as
the document as a whole is still well formed) but if (as in this case)
there is no DOCTYPE but there is an entity reference then the document
is not well formed and while it would no doubt be technically possible
to trap the entity references I believe it would not be conformant with
the XML recommendation


http://www.w3.org/TR/REC-xml/#dt-fatal


IMHO Andrews code falls into that  area which is entering the
'xml processor', i.e. it is trapping a potential error in the same
way that a parser is (when parsing with a DTD to resolve the entities).

Worth pointing out that the document is strictly non-conformant,
though a worthwhile transform option since it comes up so often.

Andrew, what would you do when trapping entity events
from an instance that has a DTD? Do the sax events precede
the parsers resolution using the DTD or follow it?




regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>