git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: user-manual.html invalid HTML

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 20, 2010, 05:04 UTC
Message-ID
<20100820050401.GC25013@burratino>
In-Reply-To
<87hc5ahzy8.fsf@jidanni.org>
Hi,
Sorry for the long silence.
Jeff King wrote:
> On Fri, Dec 12, 2008 at 04:32:15AM +0800, jidanni@jidanni.org wrote:
[user-manual.html lacks a !DOCTYPE declaration]
Show 10 quoted lines
> 
> The versions I build locally have:
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
>     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> 
> in each HTML file, which is added by asciidoc.  Maybe the package you
> are looking at was built with an older version of asciidoc that doesn't
> do this (I don't actually know the history of this feature, but it seems
> to me that this is something asciidoc should be doing, not git).

It looks like the HTML for user-manual.html (unlike the reference manual and other articles) is not generated by asciidoc after all; instead, the rule in Documentation/Makefile uses xsltproc directly to convert the asciidoc-generated XML to HTML.

Apparently the caller is supposed to set the chunker.output.doctype-public parameter. http://www.sagehill.net/docbookxsl/Chunking.html#OutputDoctype

Maybe something as simple as this would work.
-- 8< --
Subject: Documentation: set a !DOCTYPE for user manual

asciidoc already takes care of including a doctype for most of the HTML documentation, but the user manual which is processed with docbook-xsl directly lacks one (at least with Debian docbook-xsl 1.75.2+dfsg-5). This makes it harder to automatically validate the HTML.

Reported-by: 積丹尼 <jidanni@jidanni.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
diff --git a/Documentation/docbook.xsl b/Documentation/docbook.xsl
index 9a6912c..da8b05b 100644
--- a/Documentation/docbook.xsl
+++ b/Documentation/docbook.xsl
@@ -1,5 +1,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 		version='1.0'>
  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
- <xsl:output method="html" encoding="UTF-8" indent="no" />
+ <xsl:output method="html"
+     encoding="UTF-8" indent="no"
+     doctype-public="-//W3C//DTD HTML 4.01//EN"
+     doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
 </xsl:stylesheet>
Previous: jidanni@jidanni.orgNext: Jeff King
Message 7 of 10 in “X-Debbugs-Cc didn't make it to git@vger.kernel.org”
  1. jidanni@jidanni.orgDec 3, 2008
  2. git-doc CSS dependent, breaks down in text browsersjidanni@jidanni.org, Dec 11, 2008
  3. Jeff KingDec 12, 2008
  4. user-manual.html invalid HTMLjidanni@jidanni.org, Dec 11, 2008
  5. Jeff KingDec 12, 2008
  6. jidanni@jidanni.orgDec 12, 2008
  7. Jonathan NiederAug 20, 2010
  8. Jeff KingAug 21, 2010
  9. Junio C HamanoAug 22, 2010
  10. jidanni@jidanni.orgJan 8, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.