W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: Params of HTML element callbacks

From: Raffaele Sena <raff@nuvomedia.com>
Date: Wed, 9 Jun 1999 07:57:36 -0700
Message-ID: <008801beb288$705704c0$303728ce@aromatic.com>
To: "Vaclav Barta" <vbar@comp.cz>, "wwwlib" <www-lib@w3.org>
> Ah, thanks. Now, if I understand it correctly, parameters
> "present" and "value" in HText_beginElement are arrays. Their
> size varies with element number. If I want to iterate over
> them (I'm trying to build an "HTML butcher", filtering out parts
> of HTML I don't like), I should have a table with number of
> attributes for every element and iterate over "present" array -
> where present[i] is true, value[i] is valid. Right?
    Yes. And you can get the right number of attributes for every tag
    from the HTML/SGML parser. I don't have the sources handy
    but if you check SGML.h there are methods you can call to
    quey the number of attributes for every tag, the right name for the
attributes and such.

    So, the only thing you need is a list of tags and attributes you support
    and you can match them against the values of present and value.

    I'm not sure now, but you may want to check the behaviour of an
    that is present but has no value (i.e. <TABLE BORDER> ). It could be
    that present[HTML_TABLE_BORDER] is TRUE, but value[HTML_TABLE_BORDER] is
    And in this case you want to consider the BORDER attribute as present,
with a default value.

have fun,

Received on Wednesday, 9 June 1999 10:55:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:49 UTC