This is the mail archive of the
mailing list .
valid xhtml and chunking
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: valid xhtml and chunking
- From: Colin Paul Adams <colin at colina dot demon dot co dot uk>
- Date: Sun, 17 Jun 2001 17:36:17 +0100
I installed the 1.40 xsl stylesheets today, and I was interested to
see if the xhtml output would validate against an xhtml dtd.
I had some problems with this (I am using saxon 6.2.2 if this is relevant).
Firstly, I needed to be able to specify the xml output method, and the
public and system doctype keywords. The html/chunker.xsl file did not
seem very conducive to this (I resorted to editing the file), as I
could not find an appropriate parameter to specify in the stylesheet
driver (have I missed something?).
the xhtml/chunk.xsl file did not provide a means to specify the
doctype (I believe I probably supplied this file in it's original
form, so mea culpa), so i edited this.
Having got so far, I was able to get nearly valid xhtml. Throwing
resulting chunks at random at the W3C validator, I observe that it
will not validate against the strict dtd (bgcolor for instance - I
assume this is for backwards compatibility?).
Against the Transitional DTD, the only problem I found was that the
validator complains about missing the alt attribute from img tags. I
have come up against this problem myself when writing stylesheets, and
got round it by coding alt=" " on every img tag.
Lastly, using saxon, the xml declaration gets written to stdout for
the document as a whole, and so does not end up in index.xhtml. The
chunks all get a xml declaration.
I notice that the presence of an xml declaration screws up
presentation of the pages in opera 5 (and probably in other browsers
that also claim to support xhtml - huh!). So a parameter to specify
whether or not to omit the xml declaration would also be useful.
Norman, if after pointing out anything I have missed, then if you
like, I will provide the neccesary code to allow generation of fully
validating xhtml code.
Colin Paul Adams