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=12114>.
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=12114

Redirect does not output xmlns declaration

           Summary: Redirect does not output xmlns declaration
           Product: XalanJ2
           Version: 2.4Dx
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.lib.Redirect
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Namespace nodes are not output when using redirection. That is, when the
generated root element is redirected, it receives the correct xmlns declaration.
But when another element is redirected to a new file (becoming that file's root
element), then that element does not get its necessary namespace nodes.

Example:
[source]
<root xmlns="foo"><test/></root>

[xsl]
<xsl:template match="test">
  <redirect:write file="newfile.xml">
    <xsl:copy/>
  </redirect:write>
</xsl:template>

[actual newfile.xml]
<?xml ...>
<test/>

[expected newfile.xml]
<?xml ...>
<test xmlns="foo"/>

I set this bug to Major severity because the resulting file is not XML namespace
compliant and the workaround (see below) is not acceptable by everyone.

Look also in the Xalan-J-user mailing list for a thread with title "redirect
does not output xmlns declaration".

Reply via email to