[ 
http://issues.apache.org/jira/browse/XALANJ-2276?page=comments#action_12369369 
] 

Brian Minchau commented on XALANJ-2276:
---------------------------------------

Here is a sample XSL testcase that displays the problem:
<?xml version="1.0"?>
<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0">
<xsl:output method="html" doctype-system="html.dtd"/>
<xsl:template match="/">
  <Spider>Fly</Spider>
</xsl:template>
</xsl:stylesheet>


The output produced is:
<!DOCTYPE html SYSTEM "html.dtd">
<Spider>Fly</Spider>


The output produced should be:
<!DOCTYPE Spider SYSTEM "html.dtd">
<Spider>Fly</Spider>



> <!DOCTYPE html ..   is output for html output, even when the first element is 
> not "html"
> ----------------------------------------------------------------------------------------
>
>          Key: XALANJ-2276
>          URL: http://issues.apache.org/jira/browse/XALANJ-2276
>      Project: XalanJ2
>         Type: Bug
>   Components: Serialization
>     Reporter: Brian Minchau
>  Attachments: patch1.txt
>
> Probably a minor bug, but the code in ToHTMLStream.java has this line:
>   writer.write("<!DOCTYPE html");
> in the method startDocumentInternal.
> This method can be triggered by the fact that we got a startElement() call.
> The DOCTYPE should apply to the first element, which is usually "html", but 
> could be "HTML" "HtMl" "spider" "fly" ... or whatever.
> The code should be made a little more robust to get the name of the first 
> element
> and the name in the DOCTYPE to be the same.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to