bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: html structure revisited


From: Per Bothner
Subject: Re: html structure revisited
Date: Thu, 11 Feb 2021 07:03:17 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

[Sort-of combining the tread "html structure revisited" (September last year,
and earlier) with the "understanding the code" aspect of the
"texinfo in Google Summer of Code" thead.]

See https://lists.gnu.org/archive/html/bug-texinfo/2020-09/msg00019.html
for what I'm aiming for.

The attached patch does part of the job: It creates div nodes, and attaches
the 'id' references to the div nodes (rather than to span nodes).

The big problem I have is understanding the "global" structure (as opposed to
making local changes in the code) in that the logical nested sectioning 
structure
is not reflected.  For that. we'd need to generate a <div class="section">
before processing a section node, and defer the closing </div> until after we'd
processed not only the section node, but also all of its subsections.

Figuring out how to do that correctly is difficult, since one has to understand
both the parse tree structure and the control flow.  For example, is the
sectioning structure reflected in the tree, or does it have to be inferred?

There are other problems with my patch (some unneeded elements; "node" div
before "section" div), but those are "local" changes that I assume will be
relatively easy once we have the proper nesting.

I.e. if someone can show me how to generate elements like
<div class="section" id=="xxyy">...</div> so it wraps the entire section
(title, header links, node contents *and* its sub-sections), then
I can probably figure out the rest.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/

Attachment: div-nodes.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]