diff options
author | Don Scorgie <dscorgie@src.gnome.org> | 2006-01-18 20:48:50 +0000 |
---|---|---|
committer | Don Scorgie <dscorgie@src.gnome.org> | 2006-01-18 20:48:50 +0000 |
commit | c50799cd36ef222acefa8f0d24decf2998b25a2a (patch) | |
tree | eb93d52b76755d0565b176ccbbb2673b4aaf7437 | |
parent | 23607ac96e757c2c496b8341e95d15475f940207 (diff) | |
download | yelp-c50799cd36ef222acefa8f0d24decf2998b25a2a.tar.gz |
Make TOC pages XHML stric compliant
* stylesheets/toc2html.xsl:
* src/yelp-toc-pager.c:
Make TOC pages XHML stric compliant
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/yelp-toc-pager.c | 12 | ||||
-rw-r--r-- | stylesheets/toc2html.xsl | 2 |
3 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2006-01-18 Don Scorgie <dscorgie@cvs.gnome.org> + + * stylesheets/toc2html.xsl: + * src/yelp-toc-pager.c: + Make TOC pages XHML stric compliant + 2006-01-17 Don Scorgie <dscorgie@cvs.gnome.org> * configure.in: diff --git a/src/yelp-toc-pager.c b/src/yelp-toc-pager.c index 6b193df4..2cd2c78d 100644 --- a/src/yelp-toc-pager.c +++ b/src/yelp-toc-pager.c @@ -1433,6 +1433,7 @@ xslt_yelp_document (xsltTransformContextPtr ctxt, xmlDocPtr old_doc; xmlNodePtr old_insert; xmlNodePtr cur; + xmlDtdPtr dtd; if (!ctxt || !node || !inst || !comp) return; @@ -1464,10 +1465,19 @@ xslt_yelp_document (xsltTransformContextPtr ctxt, goto done; } - style->omitXmlDeclaration = TRUE; + style->omitXmlDeclaration = FALSE; new_doc = xmlNewDoc (BAD_CAST "1.0"); + dtd = xmlCreateIntSubset (new_doc, + BAD_CAST "html", + BAD_CAST "-//W3C//DTD XHTML 1.0 " + "Strict//EN", + BAD_CAST "http://www.w3.org/TR/" + "xhtml1/DTD/xhtml1-strict.dtd"); + new_doc->intSubset = dtd; + new_doc->extSubset = dtd; new_doc->charset = XML_CHAR_ENCODING_UTF8; + new_doc->encoding = g_strdup ("utf-8"); new_doc->dict = ctxt->dict; xmlDictReference (new_doc->dict); diff --git a/stylesheets/toc2html.xsl b/stylesheets/toc2html.xsl index f6c55a82..1723f0fb 100644 --- a/stylesheets/toc2html.xsl +++ b/stylesheets/toc2html.xsl @@ -35,7 +35,7 @@ <title> <xsl:value-of select="title[1]"/> </title> - <style><xsl:text> + <style type="text/css"><xsl:text> body { margin: 0px; padding: 0px; |