perldoc2xhtml_enhanced's output has improved Perl6::Perldoc::To::Xhtml's
output but unfortunately the XML is still not well-formed. I have
attached a simple patch that fixes the problem (I'd be honoured if you
consider applying it). Explanation below.
The DOCTYPE declaration, if 'PUBLIC' is used, must contain a URI to the
DTD after the Formal Public Identifier. Perl6::Perldoc::To::Xhtml
outputs XML with a DOCTYPE declaration like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
This fails xmllint:
s26test.xhtml:1: parser error : Space required after the Public Identifier
Also, neither Mozilla-based browsers nor Opera consider the file
well-formed. In Opera, adding even an empty URI "" in the DOCTYPE
declaration is enough to consider it well-formed. However, Mozilla-based
browsers are more fussy - they do not consider the file well-formed
unless it *also* contains an xmlns declaration in the root element, e.g.
<html xmlns="
http://www.w3.org/1999/xhtml">
Looking at the XHTML spec (
http://www.w3.org/TR/xhtml1/#docconf) the
Mozilla guys seem to have it right:
"A Strictly Conforming XHTML Document is an XML document that requires
only the facilities described as mandatory in this specification. Such a
document must meet all of the following criteria: [...]
The root element of the document must contain an xmlns declaration for
the XHTML namespace [XMLNS]. The namespace for XHTML is defined to be
http://www.w3.org/1999/xhtml"
Also, perldoc2xhtml_enhanced doesn't seem to get installed as a script,
so I've supplied a trivial patch for Makefile.PL. It will probably be
quicker just adding the script by hand than applying the patch though.
Thanks
Nick
damian@conway.org via RT wrote:
Show quoted text>I've added a 'full_doc' option to to_xhtml() to support this.
>
>It's not the default, so that multiple pod6 sources can be converted and
>concatenated into a single body.
>
>
>