Eric Niebler wrote:
João Abecasis wrote:
    - identifiers should be verified to begin with a letter, possibly
      allowing an underscore as well, although that goes against html
      rules.

I wouldn't allow identifiers that were disallowed by HTML.

Well, it's just another standard, anyway ;-) The reason for suggesting the underscore was that it might make it easier on the implementation. (Quick, what's the section id for [section 100 Bottles of Beer]?)

I'd like to add that anchor names that begin with an underscore seem to work ok under all browsers I tried -- Firefox 1.5 (Linux and Windows), Internet Explorer 6, Elinks 0.10.3 (a text-mode browser) and Opera 8.51 (Linux). FWIW, it is also valid XHTML.

The only place where I could notice it isn't standard is on validators like http://validator.w3.org.

Anyway, it's not that big an issue and there are workarounds for the implementation.

    - the hyphen should be allowed inside identifiers, since it seems to
      be generally allowed.

Agree.

    - QuickBook should keep track of the identifiers it generates to
      avoid reusing identifiers when it sanitizes input. This may be
      particularly important for languages that use characters outside
      the ASCII character set (como o Português ;-) where overlapping
      IDs could appear too easily.

Agree.

Even though these changes would fix Andy's issue, I think it still is important to consider the general case: it is cumbersome to refer to sanitized references. Maybe QuickBook could provide the means to generate the same sanitized reference on the spot. For instance, the mark-up

    [link [A long winded section title]]

could be used to generate,

    <link linkend="a_long_winded_section_title">A long winded section
        title</link>

For nested sections, perhaps

    [link [Section 2][Heading 1] Heading 1 of Section 2]

?

Thoughts?

Oh wow, that would be great! I wonder if there is a way we can extend this to work also with linking to sections in external docs. First, we would need a QuickBook syntax that maps to BoostBook's <libraryname>, which is currently lacking at the moment. Something like [libraryref range]. Then linking to a section in the range documentation could be:

  [link [libraryref range][Intro] Introduction to Boost.Range]

?

Putting aside the possible collision with [section libraryref], this can requires that we work out a way of reversibly translating any title to the id. For instance we could "overload" the underscore for escaping non-ascii characters,

[section name with _]  ==> name_20with_20_5f

Where 0x20 is the ASCII space and 0x5F is the ASCII underscore. This would also work nicely for utf-8 characters,

[section João] ==> Jo_c3_a3o

Comments?


João


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to