Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-1749

DOM serialization omits attribute namespace declarations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Duplicate
    • 2.5Dx
    • None
    • Serialization
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • None
    • Operating System: Windows XP
      Platform: PC
    • 25466

    Description

      When serializing a DOM using the identity transform, Xalan omits all attribute
      namespace declarations resulting in invalid XML. See the attached code for an
      example.

      XalanJ 2.5.2 produces:

      <?xml version="1.0" encoding="UTF-8"?>
      <element ns:attr="value"/>

      Whereas the correct output should be:

      <?xml version="1.0" encoding="UTF-8"?>
      <element xmlns:ns="http://www.namespaceuri.com/" ns:attr="value"/>

      As produced by SAXON et al.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--NSTest.java
          0.8 kB
          Mark Hobson
        2. ASF.LICENSE.NOT.GRANTED--NSTest2.java
          1 kB
          Mark Hobson

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mihobson@hotmail.com Mark Hobson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: