Chris Karakas <[EMAIL PROTECTED]> writes: > Jose and Andreas, > > it is not that simple! The underscore may very well be allowed in the value of an ID attribute, at least in > SGML! This quite tricky subject is dealt in: > > character "_" not allowed in value of attribute ID > http://www.karakas-online.de/forum/viewtopic.php?t=872 > > I suggest to leave validation to validating parsers, or, if you want to validate, then use an external one,
Unfortunately it's not about validating but about producing parsable DocBook. Since the Dsssl stylesheets from N Walsh and the DocBook XSL stylesheets seem to be standard, we will have to follow this defacto standard. > don't try to reinvent the wheel. SGML can be quite tricky at this - and that was a reason that led to XML, > namely that parsing SGML can be a challenge to program. What about the following transformation scheme: : to .. .. to -.. _ to -- -- to -.-- -. to -.-. - to - . to . other to -.code eg. "sec:what-a-.0_mess--!" to "sec..what-a-.-.0--mess-.---.33" Looks like Morse, eh? But "sec:a_new_idea-1" just becomes "sec..a--new--idea-1" which should be ok. Oh yes, and "52-degree" becomes "x52-degree". Note that citations are not coded as ID so they can stay as they are. Just labels and references. /Andreas P.S. Chris, if you write lines longer than 78 chars it is a PITA to quote you with gmane. And I like gmane because it is possible to make true followups, not just use the same subject.