Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8114834

LSSerializerImpl always serializes an entity reference node to" &entityName;" even if "entities" property is false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: xml
    • Labels:

      Description

      In LSSerializer javadoc, it's written:
      If the parameter "entities" is set to true, EntityReference nodes are serialized as an entity reference of the form " &entityName;" in the output. Child nodes (the expansion) of the entity reference are ignored. If the parameter "entities" is set to false, only the children of the entity reference are serialized.
       
      But LSSerializerImpl always output " &entityName;" , I tested DOMSerializerImpl, it serialized node
           [element] tt
             [entity reference] ele
               [element] aa
                 [element] bb
                   [text] text
      to " <tt><aa><bb>text</bb></aa></tt>" when lsSerializer.getDomConfig().setParameter("entities", Boolean.FALSE);
       
      So I think LSSerializerImpl is incorrect.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fyuan Frank Yuan (Inactive)
              Reporter:
              fyuan Frank Yuan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: