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
[email protected]   http://per.bothner.com/

Reply via email to