Re: Problem with parse tree output

On 02.02.01 at 04:29, Cliff Hudson <chronos@lightmail.com> wrote:

>At first I thought I was mistaken, but I went back and looked again, and
>it seems the parse tree is placing element attributes BEFORE the opening
>element tag.  Tag content still shows up inside the tag, however.

Yup. This is what the SGML parser we use outputs. I've seen no great need
to change it, but I agree it would make more sense to arrange it
differently. The question is mainly _how_, but there is also a question of
whether the overhead is worth it.

Right now we do minimal parsing of this output -- merely pick out what
little we need -- but rearranging the attributes would require an
intelligent parse of this and the generation of a complex datastructure of
some sort to hold the info. This would eat an undetermined amount of CPU
cycles and memory compared to today, but would also provide benefits in
other areas of the code. Exactly what the tradeoff becomes isn't clear to
me without looking more closely at the problem (anyone?). It may be that
the net effect will be improved resource use _and_ cleaner code enabling
more features, but it could also go the other way.

I'll keep it in mind when next I do some work on the Validator if Gerald
hasn't gotten to it first. Thanks for the feedback on this.

Received on Monday, 5 February 2001 05:12:47 UTC