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

XSLTC transformer swallows empty namespace declaration which is needed to undeclare default namespace

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: xml
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b130

      Backports

        Description

        Consider the following xsl:

        ---------------------XSL---------------------
        <?xml version="1.0" encoding="UTF-8"?>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
                        <xsl:template match="/">
                                       <root xmlns="ns1">
                                                       <xsl:call-template name="transform"/>
                                       </root>
                        </xsl:template>
                        <xsl:template name="transform">
                        <test xmlns=""/>
                        </xsl:template>
        </xsl:stylesheet>
        ---------------------End of XSL---------------------


        Transform an XML snippet like this (just a dummy):
        <?xml version="1.0" encoding="UTF-8"?><aaa></aaa>

        The result with the current XSLTC is:
        <?xml version="1.0" encoding="UTF-8"?><root xmlns="ns1"><test/></root>

        This would not undeclare the default namespace “ns1”, coming from the element “root”, in the element “test”.
        It should be:
        <?xml version="1.0" encoding="UTF-8"?><root xmlns="ns1"><test xmlns=""/></root>

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                clanger Christoph Langer
                Reporter:
                clanger Christoph Langer
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: