DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27924>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27924 Entity Reference nodes with no children should always be serialized Summary: Entity Reference nodes with no children should always be serialized Product: Xerces2-J Version: 2.6.2 Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: Other Component: DOM AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] DOM L/S PR clarification to LSSerializer states that "Entity Reference nodes with no children (no corresponding Entity node or the corresponding Entity nodes have no children) are always serialized." [1] Currently, EntityReference nodes are serialized as an entity reference of the form "&entityName;" in the output only if the parameter 'entities' is set to true. In the event that an Entity Reference node has no children and 'entities' is false, we break from the method without having serialized anything. Proposed patch serializes the EntityReference node in the form "&entityName;" if 'entities' parameter is true or if the EntityReference has no children (checked by seeing if node.getFirstChild returns null - I think this should accurately cover the 'childless' scenario, or else we could check that node.getChildNodes().length()==0) Also, minor PR change to LSSerializer.write: When writing to a LSOutput, it may be required to look for encoding information by looking at Document.inputEncoding (was Document.actualEncoding) [1] [1] http://www.w3.org/2004/02/PR-DOM-Level-3-LS-20040227/load-save.html#LS- LSSerializer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
