OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: "anchor" template outputs invalid XHTML: empty "a" tag


I recently reported a bug in publican because it uses the XSL XHTML stylesheets
and overrides the "anchor" template in a way that doesn't always work:

It turns out the override is there because the current output of the XSL
XHTML stylesheet for the anchor template is invalid XHTML: the "a" tag
cannot be empty apparently.

So they changed the initial template:
<a id="{$id}" />
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>

But the latter fails at least in 2 cases in the current usage of the
"anchor" template in the HTML stylesheet when it's called somewhere that
is not at the start of a new tag:
- in html/callout.xsl for match="co" mode="co"
- in html/verbatim.xsl for match="programlisting|screen|synopsis"

You'll get errors like:
xsl:attribute: Cannot add attributes to an element if children have been already added to the element.

It would be nice to see this fixed in a way or another so that publican
doesn't have to override the template just to have valid XHTML output.

Raphaël Hertzog -+- http://www.ouaza.com

Freexian : des développeurs Debian au service des entreprises

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]