W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2008

Re: tidy C interface question about XHTML Strict

From: Arnaud Desitter <arnaud02@users.sourceforge.net>
Date: Tue, 4 Nov 2008 09:34:04 +0000
Message-ID: <a240ddd00811040134g6d1f12f9wacae51a99e6ebad5@mail.gmail.com>
To: html-tidy@w3.org

2008/11/3 Eugeny N Dzhurinsky <bofh@redwerk.com>:
> On Mon, Nov 03, 2008 at 09:15:32PM +0000, Arnaud Desitter wrote:
>> Hi,
>>
>> If I remember well, "doctype: strict"
>> (http://tidy.sourceforge.net/docs/quickref.html#doctype) sets
>> the DTD to strict but does not remove the attributes not conforming.
>
> Okay, but how can I tell tidy to make the passed document as xhtml strict?
>
>> Could you provide an HTML example along with the tidy command line you
>> are using?
>
> Looks like I missed first time - the command-line version does not produce
> valid XHTML strict as well. I used http://www.yandex.ru as a source, and
> converted it to XHTML with:
>
> tidy -asxhtml -utf8 -q index.html > index.xhtml
>
> So looks like tidy can't produce XHTML 1.0 Strict documents?

Essentially, no. Tidy can give an educated guess og which DTD the
document is written against and can convert to XHTML.
Conceivably, a pass that drops attributes non conformant to the
emitted DTD could be added. It would still not guarantee conformance.

Regards,

>
>> output = {0}; should be replaced by "tidyBufInit( &output );"
>
> Thank you!
>
> --
> Eugene Dzhurinsky
>
Received on Tuesday, 4 November 2008 09:59:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:59 GMT