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

Re: Patch to add rudimentary custom entity capability

From: Gregor N. Purdy <gregor@focusresearch.com>
Date: Fri, 1 Dec 2000 14:08:09 -0500 (EST)
Message-ID: <3A2802C5.3D63117C@focusresearch.com>
To: Dominic Jackson <dominic@wirestation.co.uk>
Cc: html-tidy@w3.org
Dominic --

[[cc-ed back to html-tidy@w3.org in case anyone else had a similar
question.
  I don't follow the list, so contacting me directly is the right way to
  follow up on this patch if anyone else has questions or comments.]]

> I'm afraid I have no idea how this patch works (and would appreciate some
> help on this), but think that it may be useful to me as I have come across a
> similar problem with custom tags (re: "Problem with custom HTML TAGS using
> HTML TIDY", a message I sent to the list previously).

The patch I submitted implements rudimentary support for custom
*entities*,
not for custom *elements*. This is accomplished by hooking into the code
path that executes to add the standard list of HTML entities to a lookup
table. Existing initialization code inserts entries into this table
based
on a list of known tags that is compiled into tidy. I just wrote enough
code to allow you to add your own list of entity names in the
configuration
file. The code takes the list of custom entities and passes them each to
a function that inserts them in the same table as the standard ones.

So, if you have an XML file that uses entities like &larrhk; or &dollar;
or whatever, you can tell tidy that these entities are OK by adding a
line
like this to your config file:

    new-entities: larrhk dollar
 
> The problem that I was having was that although I'd included my tags as
> in-line or block-level (in the config.txt file) to get tidy to recognise
> them, tidy would perform some additional processing above what I would have
> wanted that in the block-level case was to add unwanted formatting <p> and
> <br> tags to the document. - in the in-line case tidy would split <font>,
> <b>, <u> etc.. tags around my custom tags.
> 
> What I'd ideally like is to be able to turn this additional formatting off
> for the custom tags.

I haven't played with this aspect of tidy enough to provide any guidance
with this (sorry)...


Regards,

-- Gregor
Received on Friday, 1 December 2000 16:56:58 GMT

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