Menu

#532 target attributes invalidate XHTML strict

packaging problem
closed
XSL (1066)
5
2004-10-22
2004-06-18
No

$ tee < in.dbx
<?xml version="1.0"?>
<!DOCTYPE refentry
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<refentry>
<refnamediv>
<refname>foo</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsection>
<title>bar</title>
<simpara><ulink

url="http://www.ibiblio.org/gferg/ldp/man/man1/ed.1.html"/></simpara>
</refsection>
</refentry>
$ tee < driver.xslt
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:import
href="/home/tobi/bulk/run/docbook_sf_net/xslt/1_65_1/xhtml/docbook.xsl"/>

<xsl:output
method="xml"
encoding="US-ASCII"
indent="no"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"

doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
/>

<xsl:param name="html.stylesheet">man.css</xsl:param>
<xsl:param name="make.valid.html" select="1"/>
<xsl:param name="html.cleanup" select="1"/>

</xsl:stylesheet>
$ xmllint --format out.html
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=US-ASCII" />
<title>foo</title>
<link rel="stylesheet" href="man.css"
type="text/css" />
<meta name="generator" content="DocBook XSL
Stylesheets V1.65.1" />
</head>
<body>
<div class="refentry" lang="en" xml:lang="en">
<a id="id2393886"></a>
<div class="titlepage">
<div></div>
<div></div>
</div>
<div class="refnamediv">
<h2>Name</h2>
<p>foo &#8212; </p>
</div>
<div class="refsection" lang="en" xml:lang="en">
<a id="id2497606"></a>
<h2>bar</h2>
<p>
<a
href="http://www.ibiblio.org/gferg/ldp/man/man1/ed.1.html"
target="_top">http://www.ibiblio.org/gferg/ldp/man/man1/ed.1.html</a>
</p>
</div>
</div>
</body>
</html>
$ xmllint --valid --noout out.html
out.html:5: element a: validity error : No declaration
for attribute target of element a
<p><a
href="http://www.ibiblio.org/gferg/ldp/man/man1/ed.1.html"
target="_top"

^
$

Note:

AFAICS the empty

<div class="titlepage">
<div></div>
<div></div>
</div>

should not be there. (I also get this with a real
refentry, where
refpurpose has content)

The main issue is:

The output is invalid, I neither want nor need
target="_top". I think
that at least with the parameters I set, no target
attributes should be generated,
per default.

Something else (not really part of this bug report):

With this in the input doc:

<refentryinfo>
<title>foo Manual</title>
<copyright>
<year>2004</year>
</copyright>
<author>
<firstname>Tobias</firstname>
<surname>Reif</surname>
</author>
<releaseinfo>draft 2004-06</releaseinfo>
</refentryinfo>

neither releaseinfo nor the copyright year appear in
the output
(neither in the man page nor in the (X)HTML version)

Discussion

  • Jirka Kosek

    Jirka Kosek - 2004-10-22
    • assigned_to: nobody --> kosek
     
  • Jirka Kosek

    Jirka Kosek - 2004-10-22

    Logged In: YES
    user_id=189932

    You can get rid of target attribute by setting parameter ulink.
    target to empty string.

    Empty divs are not generated starting (I think) from 1.66.1.

    Appearance of elements in *info can be customized by using
    titlepage templates. See http://www.sagehill.net/docbookxsl/
    HtmlCustomEx.html#HTMLTitlePage for more info.

     
  • Jirka Kosek

    Jirka Kosek - 2004-10-22
    • status: open --> closed