Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-615

Xalan resolves a namespace prefix when it should report an error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: CurrentCVS
    • Fix Version/s: CurrentCVS
    • Component/s: XalanC
    • Labels:
      None
    • Environment:
      all

      Description

      for an input document : <doc><str/></doc>
      and the stylesheet:
      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

      <xsl:template match="doc">
      <bar xmlns:foo="foo-namespace">
      <xsl:apply-templates/>
      </bar>
      </xsl:template>

      <xsl:template match="str">
      <xsl:element name="foo:boo"/>
      </xsl:template>
      </xsl:stylesheet>

      According to the spec XSLT1.0, 7.1.2 :"If the namespace attribute is not present then the QName is expanded into an expanded-name using the namespace declarations in effect for the xsl:element element, including any default namespace declaration." So Xalan shouldn't be able to resolve the "foo" prefix in <xsl:element name="foo:boo"/>

        Attachments

        1. patch.diff
          3 kB
          Dmitry Hayes

          Activity

            People

            • Assignee:
              dmitryh Dmitry Hayes
              Reporter:
              dmitryh Dmitry Hayes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: