[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: DOCBOOK-APPS: Re: XHTML Strict
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 / Steve.Nunez@bluewave.com was heard to say: | So with that long preamble, I'd like to ask what the state of xhtml strict | is? Strict is a requirement of this project, and if it's not available in | DocBook I'd certainly consider putting in the effort required to get it | there. I suggest instead that you simply run the output of the stylesheets through tidy. The principle difficulty is that DocBook is very flexible where XHTML Strict is, well, very strict. Consider this simple example: <para>Here is a table of prime numbers: <informaltable>...</informaltable> The largest prime number is listed first, for your convenience.</para> Now, it's easy to transform that into <p>Here is a table of prime numbers: <table>...</table> The largest prime number is listed first, for your convenience.</p> But that's not valid strict XHTML. In order to make that valid, you'd have to transform it to: <p>Here is a table of prime numbers:</p> <table>...</table> <p>The largest prime number is listed first, for your convenience.</p> That's much more difficult to achieve in the general case. And if that's not bad enough, the similar example: <p>Here is a table of prime numbers: <table>...</table> </p> Can't be translated into this: <p>Here is a table of prime numbers:</p> <table>...</table> <p></p> Instead it has to be: <p>Here is a table of prime numbers:</p> <table>...</table> Multiply this problem by all the possible combinations in DocBook and achieving XHTML strict in a single pass becomes so difficult that it doesn't seem worth the effort. The HTML cleanup code tries to correct these errors. I'd be happy to try to improve that cleanup code if people provide examples where it's not complete. I guess I'm left with three observations: 1. tidy solves this problem very nicely. 2. If DocBook is your source format, what is the motivation for XHTML strict? It's important for your HTML to be consistent, of course, if you're using CSS, but the markup you get from DocBook should be consistent even if it isn't strict. 3. The prohibition against block elements inside paragraphs in HTML is a real pain in the *ss. I also think it prevents authors from writing what they really meant (in the example above, that the table is part of the thought expressed in the paragraph). Be seeing you, norm - -- Norman Walsh <ndw@nwalsh.com> | DNA neither cares nor knows. DNA http://www.oasis-open.org/docbook/ | just is. And we dance to its Chair, DocBook Technical Committee | music.--Richard Dawkins -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/> iD8DBQE+c4pjOyltUcwYWjsRAgAFAKCFVaxGil9Bwg4fLBHh4CpQhdWG9QCfTCLK iRBqWcpZvtIXq+pvyeKmxlc= =lkYC -----END PGP SIGNATURE-----
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]