W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re: Having a problem with Non-HTML-tag <embed ...>

From: Raffaele Sena <raff@nuvomedia.com>
Date: Tue, 17 Aug 1999 12:14:17 -0700
Message-ID: <004601bee8e4$b39dbfc0$52c0a8c0@nuvomedia.com>
To: "Michael Maretzke" <michael.maretzke@gmx.de>, "Libwww" <www-lib@w3.org>
> In this function ... e.g.:
> PRIVATE void unparsedBeginElement (HText* pDataStruct, const char*
> cpszBuffer, int iLength)
> {
> HTPrint("\n\nFound a unparsed Element -> [%d]*%s*\n", iLength, cpszBuffer);
> }
> ... i only receive the unknown tag in cpszBuffer and its length in iLength.
> But the rest of this tag, its parameter ... How may I access them ?
> Hope u can help me ;)
    unfortunately there is no way without changing libwww.

    I noticed that some time ago, but there isn't an easy fix.

    The way the SGML parser works today is that when it first find a tag it
    if it's valid, before parsing the attributes. If not, it will call the
    with no attributes, and then throw them away.

    I guess it could be changed to in a state where it collects everything up
to the end tag
    and then call the appropriate callback (but then you'll have to parse the
full line).

    A better way could be to collect the attributes without checking them and
passing them
    to the callback in the attributes array, maybe in the form
"ATTRNAME=VALUE" that should
    be easy to parse.

    ...but whatever way, it needs to be implemented.

    In your specific case you may want to add the <EMBED> tag to HTMLPDTD.c
    (just put it in the right place :)

-- Raffaele
Received on Tuesday, 17 August 1999 15:13:28 UTC

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