[xmljs-users] SAX: Entity Resolution/Skipping
Brought to you by:
djoham,
witchhunter
From: Jim C. <ji...@ps...> - 2004-04-01 19:33:59
|
Hi everyone, I've recently did a straight port of the XML for <SCRIPT> 3.0's SAX parser to Flash MX 2004's Actionscript 2.0 (essentially ECMAScript Draft 4) to bootstrap the development of an open- source, standards-compliant DOM that I'm working on. See: http://www.psalterego.com/flash/sax.html In using the SAX parser, I've run into an issue with resolving general entities that aren't specified by the XML recommendation, e.g. Latin-1 XHTML entities like é and such. At present, the XML for <SCRIPT> SAX parser throws an "unknown entity" error and exits. As the SAX parser isn't validating and doesn't implement the SAX2 entityResolver interface, I would like to suggest that a skippedEntity event be added that would be fired (if defined) instead of throwing a fatal unknown entity error to allow the SAX parser to play well with XML files that use entities other than predefined entities given in the XML specification: http://www.w3.org/TR/2004/REC-xml-20040204/#sec-predefined-ent Say, implementing a skippedEntity event like the one in SAX2's contentHandler interface. I could provide a patch against the current code to implement this if there's interest. Thoughts? Regards, Jim |