Re: Is there any way to get TIDY to recursively tidy up a tree of fil es?

It is, indeed, not trivial...
As a first approach, I would try the following:

The freshly tidied HTML file would have to be processed once more by a perl 
script, which in a first step would have to turn the class definitions into 
unique definitions (I believe that tidy names classes like "c1", "c2" etc, 
thus "c1" may be a different definition for one document than for another), 
adjust the class attributes throughout the document accordingly, write the 
modified style definitions into the wanted external CSS document and 
replace the <STYLE></STYLE> with the appropriate <LINK REL="...">.

This should work, but the resulting CSS Document will be fairly large and 
quite ugly.

Second idea then would be to reduce redundancy by checking first whether a 
class definition already exists before adding it to the CSS document...


A well, Mr. Rzepa, a paid two weeks vacation in London does sound 
tempting... maybe my employer would even let me go... ;-)



sebastian

PS: did I make any sense at all?


At 09:04 13.07.2000 +0100, Rzepa, Henry wrote:
> >At 20:14 12.07.2000 -0700, RickR@biztro.com wrote:
> >>
> >
> >... well, he wrote nothing... ;-) but his question was: Is there any way 
> to get TIDY to recursively tidy up a tree of files?
>
>We adopted a rather different approach, using a robot rather than a 
>directory tree.
>This involved using htdig (www.htdig.org) to create a  URL list, and then 
>passed this
>list to htdig using  JTidy as an external parser. It allows us to call 
>other parsers for
>non HTML files transcluded in the HTML via <a>, <embed>, <img>, <applet>
>etc.
>
>Can I repeat a question I posed to the list (with no response; perhaps 
>none exists).
>If one does use Tidy recursively,enforcing the cleaning up of tags to 
>use  CSS,
>how might one go about recursively uniquifying the resulting multiple 
>stylesheets into
>a single one applicable to the entire document tree?  Its non trivial,
>and I was wondering if anyone knew of a product, opensource or commercial
>that might undertake this?  Is there perhaps another list this question 
>might be
>posed to?
>--
>
>Henry Rzepa. +44 (0)20 7594 5774 (Office) +44 (0)20 7594 5804 (Fax)
>Dept. Chemistry, Imperial College, London, SW7  2AY, UK.
>http://www.ch.ic.ac.uk/rzepa/

==============================================
Cyperfection - agentur fuer neue medien GmbH

Sebastian Lange
<mailto:lange@cyperfection.de>
+49-621-587104-22

Karl-Kraemer-Str. 4
D-67061 Ludwigshafen
fon: +49-(0)621-587104-0
fax: +49-(0)621-587104-90
http://www.cyperfection.de/

Anfahrt - http://www.cyperfection.de/Anfahrt/
==============================================

Received on Thursday, 13 July 2000 04:42:24 UTC