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

RE: Allowing other tags...

From: Kipp Howard <khoward@courtlink.com>
Date: Fri, 16 Nov 2001 08:10:51 -0800
Message-ID: <588DDEA4CC3AD411AE5200508BC5D2110A056C@hqmsx01.internal.courtlink.com>
To: html-tidy@w3.org
Hans Deragon [mailto:deragon@aqiii.org] wrote:
> I want to build a template driven system for processing html files.
> New tags are placeholders and instructions for how to manipulate the 
> html files.
> And I want these tags to be in xml format.  I then pass the 
> html files 
> through jtidy
> to make them xml compliant.  Then, using DOM functionnality, I can 
> manipulate
> easily the different html and resolve their dependencies.  I 
> then create 
> a new
> XML structure resulting from the merging of many files, and use this 
> structure
> to generate the final static page (I might pass this final 
> static page 
> again through
> jtidy).
> Its not the most efficient way of doing, but I am not seeking most 
> efficiency CPU
> or memory wise.  I am seeking for the most efficient use of existing 
> code, keeping
> maintenance easy, etc...  Using jtidy, I have no parsing to do!  It 
> provides me
> the DOM document of my HTML pages (hopefully with my tags 
> intact).  Then
> I only have to play with the Nodes, replacing them, deleting 
> them, etc.. 
> to get
> the final structure.

FWIW:  I haven't necessarily done the above but we do add some tags to HTML
files that give us some additional information about the files.  We do this
by adding <div> and <span> tags with very specific attributes so that these
<div> and <span> tags are not confused with existing tags.  This means we do
not have to have any new tags that tidy does not support.  Here is a short

<div title="myConfigInfo">
	<span title="color">red</span>
	<span title="size">medium</span>

Then when we are using the DOM/XSLT, we just select these elements with:

Just thought this might help make your job a bit easier by not having to
modify how tidy works.
Received on Friday, 16 November 2001 11:11:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:51 UTC