[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: missing @anchor mangling for docbook output
From: |
Per Bothner |
Subject: |
Re: missing @anchor mangling for docbook output |
Date: |
Thu, 28 Oct 2010 15:21:04 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Thunderbird/3.1.4 |
On 10/28/2010 02:46 PM, Patrice Dumas wrote:
On Tue, Oct 26, 2010 at 08:38:14AM -0700, Per Bothner wrote:
When generating --docbook output, the name in an @anchor
does not get mangled, but the link does.
What should be the right output? Should they both be
mangled or none?
It looks like the DocBook stylesheets don't care.
However, the @anchor translates into an 'id' attribute,
and these are according the XML specification supposed to
bc NCName values.
[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] |
[#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] |
[#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] |
[#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 |
[#x0300-#x036F] | [#x203F-#x2040]
For an NCName, subtract ":" as an allowed character.
See also http://www.w3.org/TR/xml-id/
http://www.w3.org/TR/xml11/#NT-NameChar
We should probably use the same mangling for HTML and XML output.
--
--Per Bothner
address@hidden http://per.bothner.com/