DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6111>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6111 Improper entity callbacks for entities in attrib values Summary: Improper entity callbacks for entities in attrib values Product: Xerces-J Version: 1.4.4 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: SAX AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] It seems with Xerces 1.3.x and 1.4.x that if you turn entity expansion off (http://xml.org/sax/features/external-general-entities), there's some odd behavior with entities in attribute values. Per my reading of SAX, entities in attribute values should still be silently expanded, and in fact Xerces does expand them. It just doesn't do so silently. Instead Xerces generates startEntity/endEntity events for the entities that were expanded in the attribute values. The events occur before the startElement of the element containing the attribute. You don't get the entity events if entity expansion is on. Crimson behaves as expected and when silently expanding entities in attribute values it truly does it silently. This is affecting JDOM where using SAXBuilder to build from: <?xml version="1.0" ?> <!DOCTYPE internalentities [ <!ELEMENT internalentites (#PCDATA)> <!ENTITY simple 'simple entity' > ]> <internalentities>datadatadata <subelement test2="&simple;" /> </internalentities> Works perfectly in Crimson but with Xerces results in: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE internalentities [ <!ELEMENT internalentites (#PCDATA)> <!ENTITY simple "simple entity"> ]> <internalentities>datadatadata &simple;<subelement test2="simple entity" /> </internalentities> Because of the spurious startEntity/endEntity callbacks. -jh- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
