[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mapping node names to filenames/urls
From: |
Per Bothner |
Subject: |
mapping node names to filenames/urls |
Date: |
Thu, 14 Feb 2002 23:50:59 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8+) Gecko/20020208 |
The problem is how to split a texi file into multiple html
files, one per mode, in a single pass.
We have two conflicting goals:
* Avoding funny characters in file names, if possible.
This implies that we cannot use a non-clashing mapping,
since that would create unnecessarily ugly filenames.
* Dealing with nodes with similar but different names
that map to the same filename. These must be made distinct.
* We want to process the texinfo file in a single pass.
Solution: Maintain a table mapping node names to file names.
We call this the file name table. When we see a mode name (in
a menu, xref, or @node header), look for it in the file name
table. If it is found, use the file name in the table for urls.
If not, generate a file name. Try first the simple aesthetic
mapping, where all "funny" characters are mapped to '-'. If there
is no entry yet in the file name table for a node that maps to that
filename, enter the filename in the table, and use it. If there
is a clash, then generate a unique name in some other way.
One way is to use the standard url mangling (i.e. spaces are
mapped to '%20'). Another is to append an integer (i.e. look for
"foo1', then 'Foo2', etc). A third is to use a more complex
mapping - e.g. 'Foo*' gets mapped to 'Foo_star'.
--
--Per Bothner
address@hidden http://www.bothner.com/per/
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/01
- Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/13
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/13
- Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/13
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/14
- Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/14
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/15
- Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/15
- mapping node names to filenames/urls,
Per Bothner <=
- Re: mapping node names to filenames/urls, Eli Zaretskii, 2002/02/15
Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/13
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/14
- Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/14
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/15
- Re: bad relative urls in texinfo-4.0f, Per Bothner, 2002/02/15
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/15
- Re: bad relative urls in texinfo-4.0f, Eli Zaretskii, 2002/02/15