You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by ji...@apache.org on 2004/04/23 19:50:54 UTC

[jira] Closed: (XERCESJ-927) Entity Reference nodes with no children should always be serialized

Message:

   The following issue has been closed.

   Resolver: Michael Glavassevich
       Date: Fri, 23 Apr 2004 10:50 AM

Closed as per state in Bugzilla.
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-927

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-927
    Summary: Entity Reference nodes with no children should always be serialized
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: Xerces2-J
 Components: 
             DOM
   Versions:
             2.6.2

   Assignee: Michael Glavassevich
   Reporter: Naela Nissar

    Created: Wed, 24 Mar 2004 10:50 PM
    Updated: Fri, 23 Apr 2004 10:50 AM
Environment: Operating System: Other
Platform: Other

Description:
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


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org