Subject: Re: [xsl] Without DTD Mapping From: Dave Pawson <davep@xxxxxxxxxxxxx> Date: Tue, 26 Aug 2008 11:17:33 +0100 |
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?
-- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Without DTD Mapping, David Carlisle | Thread | Re: [xsl] Without DTD Mapping, Andrew Welch |
Re: [xsl] Without DTD Mapping, David Carlisle | Date | Re: [xsl] Without DTD Mapping, Andrew Welch |
Month |