[ http://issues.apache.org/jira/browse/XALANJ-2103?page=all ]
Brian Minchau updated XALANJ-2103:
----------------------------------
Attachment: HTML2html.patch.txt
Attaching patch to "fix" this issue. Section 16.2 of the XSLT 1.0
recommendation,
at http://www.w3.org/TR/xslt#section-HTML-Output-Method says this:
<<
If the doctype-public or doctype-system attributes are specified, then the html
output method should output a document type declaration immediately before the
first element. The name following <!DOCTYPE should be HTML or html.
>>
Note that for HTML it doesn't seem to matter which case should be used here,
and indeed it doesn't say that it should match the case of the first element
name either. So in friendliness to XHTML, I've attached a patch that changes
the hardcoded line in the serializer code from:
writer.write("<!DOCTYPE HTML");
to:
writer.write("<!DOCTYPE html");
Seems like the fix to me. Please verify the patch.
> Case of doctype definiton wrong
> -------------------------------
>
> Key: XALANJ-2103
> URL: http://issues.apache.org/jira/browse/XALANJ-2103
> Project: XalanJ2
> Type: Bug
> Components: transformation
> Versions: 2.6
> Reporter: Fraser Crichton
> Attachments: HTML2html.patch.txt
>
> I noticed this when I validated an XHTML document I'd created from a XALAN
> transformation. When I have the following output method in my XSLT -
> <xsl:output
> method="html"
> doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
> doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
> encoding="UTF-8"
> indent="yes"
> media-type="text/html"
> standalone="yes"
> />
> The following doctype definition is produced -
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> It should be this (notice the lowercase html) -
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> That means the document fails validation on the W3C site.
--
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]