DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12075>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12075

Error in handling of default namespaces in output

           Summary: Error in handling of default namespaces in output
           Product: XalanJ2
           Version: 2.4
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


XSLTC seems to have a problem with the way it handles default namespaces.
I am using this XML document to reproduce the bug:

  <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/";>
    <getHello xmlns="http://www.vordel.com";>
      <bob xmlns=""></bob>
    </getHello>
  </soap-env:Body>

The stylesheet I am using is:

  <?xml version="1.0"?> 
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
  <xsl:template match="/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <xsl:copy-of select="/"/>
  </xsl:template>
  </xsl:stylesheet>

The output I get is:

  <?xml version="1.0" encoding="UTF-8"?>
  <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/";>
    <getHello xmlns="http://www.vordel.com";>
      <bob getHello="//www.w3.org" ="&#xA;"/>
    </http://www.vordel.com:getHello>
  </soap-env:Body>

The output I expect is identical to the input.

I also get an error even if I omit the <bob/> element of the input.
The output I get then is:

  <?xml version="1.0" encoding="UTF-8"?>
  <soap-env:Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/";>
    <getHello xmlns="http://www.vordel.com";>
    </http://www.vordel.com:getHello>
  </soap-env:Body>

(The closing tag for <getHello> contains the namespace URI in place of the
prefix.

Reply via email to