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

Re: (Possible) menu code rewrite

Craig Dickson wrote:
> What use does the menu system have for regexp search-and-replace? I know
> it needs to choose from among a set of alternative labels based on
> language, but that's trivial in XSLT, so you must be thinking of
> something else.

The menu methods files make extensive use of substitutions.
Perhaps you should look at them? For example:

        "#ifdef " cppesc($section) "\n" \
        "#define " cppesc(parent($section)) "\n" \
        "       show:" esc(escfirst(title(),$hotkey,"_"),":") "..::" esc($section,":") "\n" \

So here we have a cppesc() function which needs to be supported, and that does
a fairly complex s/// type thing (has to look up the hexidecimal ascii code of
certian characters), and a several other escaping functions that change the
first '_' to '\_' and change all ':' to "\:'. Not to mention the variable
substitutions of course. 

It's nice to see that you XSTL-boosters have investigated the requirements
in such depth. :-P I'm glad that this is all irreliveant to Chris's
implementation at least, since he's doing the work, and gets to make his own
tool choices; which seem eminently sane so far.

see shy jo, hammer, nail

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: