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

Re: Allowing other tags...

From: Lee Passey <lee@dysfunctionals.org>
Date: Fri, 16 Nov 2001 10:24:44 -0700
Message-ID: <3BF54BDC.6060209@dysfunctionals.org>
To: Hans Deragon <deragon@aqiii.org>
CC: html-tidy@w3.org
I do not know JTidy at all, but the C version contains an option to add 
"new" tags.  The following is from Dave's original documentation:

<blockquote>
You can teach Tidy about new tags by declaring them in the configuration 
file, the syntax is:
new-inline-tags: tag1, tag2, tag3 new-empty-tags: tag1, tag2, tag3 
new-blocklevel-tags: tag1, tag2, tag3 new-pre-tags: tag1, tag2, tag3
The same tag can be defined as empty and as inline or as empty and as block.
These declarations can be combined to define an a new empty inline or 
empty block element, but you are not advised to declare tags as being 
both inline and block!
Note that the new tags can only appear where Tidy expects inline or 
block-level tags respectively. This means you can't (yet) place new tags 
within the document head or other contexts with restricted content 
models. So far the most popular use of this feature is to allow Tidy to 
be applied to Cold Fusion files.
</blockquote>

I would hope a similar options would be available in JTidy.  Note that 
this does not deal with arbitrary unknown tags, but should work if you 
have a defined set of new, non-html-compliant tags.

Hans Deragon wrote:

> Greetings.
>
>
>  I am considering using jtidy as part of a tool I am creating to 
> generate static pages.  Part of my tool requires the addition of tags 
> such as <staticpage> within the html documents.
>
>  Now jtidy obviously complains about this since <staticpage> is not a 
> valid html.  I began to look at your source code and manage to have it 
> ignore any unknown tag under the <body> scope.  I still am looking a 
> way for jtidy to automatically generate the </staticpage> so the 
> document becomes automatically xml compliant.
>
>  Ok, my question.  Would you accept the addition of an option within 
> jtidy which would cause it to ignore additional tags and just process 
> them to become xml compliant?  Off course, this option would be off by 
> default to keep jtidy backward compatible (and it makes sense to have 
> this option off for most usages).  But this feature might be very 
> interesting for other projects simillar to mine where they would want 
> their tags remain unprocessed (except for making them xml compliant).
>
>  I am asking because the code change will require many changes within 
> a few files.  Thus, its not a simple patch.  I cannot therefore fork 
> my own jtidy, watch you guys fixing the main tree and adding features 
> and then manually add my feature to each of your new releases.  This 
> is why I would like my changes to be brought into the main tree.
>
>  And if you have any suggestion on how to implement it, be my guess. 
> Since this is OO, reverse engineering it to understand what is going 
> in is a bit difficult, and my solution might not be the most 
> elegant/optimize.
>
>  BTW, jtidy is great.  I'm glad I have discovered it.  Thanks for the 
> product.
>
>
> Sincerely,
> Hans Deragon
Received on Friday, 16 November 2001 12:33:32 GMT

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