Thanks for clarifying. Now it makes sense.
I should point out that the DocBook XHTML stylesheets have never claimed to be
conformant with Strict XHTML. You'll notice that the DOCTYPE emitted by the
stylesheet is for the transitional DTD.
I don't doubt there is a need for Strict XHTML, but no one has committed to doing that
work. Part of the problem is that the existing DocBook XHTML stylesheets are
automatically generated from the HTML stylesheets using XSLT, and there are
limitations on that approach. That approach was taken to avoid the work of keeping
two separate HTML flavors in sync with regard to bug fixes and new features.
Bob Stayton
Sagehill Enterprises
[email protected]
----- Original Message -----
From: "Raphael Hertzog" <[email protected]>
To: "Bob Stayton" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, April 06, 2010 11:02 PM
Subject: Re: [docbook-apps] "anchor" template outputs invalid XHTML: empty "a"
tag
Hi,
Le mardi 06 avril 2010, Bob Stayton a écrit :
I don't believe that statement is true. If you examine the XHTML
standard DTDs, you find that the content model of element <a> allows
it to be empty. What is the basis for this statement?
It looks like it's not <a> that is invalid but the place where it might be
emitted:
| hmm this change was made several years ago, probably 3 or 4 years ago, way
| before we made publican open source, so it's a bit dim in my memory. On
further
| thinking I believe my original response is incorrect.
|
| If I recall correctly, and this was a long time ago, it was actually because
| the anchors are emitted in places where they are invalid. Anchors only have 8
| or so valid parents in XHTML 1.0 Strict mode, assuming you categorize the
| various H tags as counting as one, and the anchors are emitted all over the
| place.
|
| I think I looked in to everywhere it was called, and it was a big job to
change
| the incorrect ones. Since it's never used anywhere there isn't another tag to
| link to, it was just easier to put the ID in the real tag instead of injecting
| a tag just to put an ID in.
|
| The way we tested this was to build the Deployment Guide in html-single then
| run that through http://validator.w3.org, it generated massive numbers of
| errors in XHTML 1.0 Strict mode and we went about tidying them up.
He still committed a partial fix:
https://fedorahosted.org/publican/changeset/1140
He puts the id attribute on <img> used for the callout instead of
emitting an independant tag.
If you want to convert the deployment guide to see if you can reproduce the
validation problems, you can grab it here:
git clone http://git.fedorahosted.org/git/docs/deployment-guide.git
(https://fedorahosted.org/deploymentguide/)
Cheers,
--
Raphaël Hertzog -+- http://www.ouaza.com
Freexian : des développeurs Debian au service des entreprises
http://www.freexian.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]