Josà AbÃlio Oliveira Matos <[EMAIL PROTECTED]> writes: < On Wed, Oct 20, 2004 at 05:24:41PM +0000, Andreas Vox wrote: < > We have to decide if namemangling is a setting of < > a) a class < More than a class, it is a property from the backend. Docbook, in this < case. This affects the validation of all docbook documents, be it article, < book, set, chapter or whatever. < > b) a document < No way.
Ok, but then it definitely will not be stored in .layout files. < < > c) a converter < All the tools I know work only for valid documents. Is there any of the < used tools who doesn't care about the the document validation? I don't think < so. saxon wasn't quite as picky as Openjade. < If this was a converter option the best option would be another flavour. Like OutputParams::XML? That's what I thought, just independent of the flavours. Since there would be combinations: SGML/allowedNameChars, XML/allowedNameChars, SGML/-, XML/- An std::string member in OutputParams and a new 'extra flag' called "allowedNameChars=" for converters -- ehm, I see there is possibility for misunderstanding: I'm talking about the copy converter which is already used to produce XML. < Don't forget that we need to pass that option to lyx. ??? I thought the 'extra flag' would be enough. < > I would prefer "allowedNameChars" with the values: < > "" only letters, digits, '-' and '.' < > "all" no mangling accurs < > "$+#!_*" only letters, digits, '-', '.' and the given chars are accepted. < > Similarily for other char combinations. < What is the logic behind? "all" is a special token which turns off namemangling, since letters are always allowed, there's no conflict. Empty setting or any other setting turns on mangling with the given characters as exception. I understood that '-' and '.' already are allowed by the standard? < What about the upper part of the ascii table. I think that in a sane way < there only three or four option. No need to complicate what doesn't need to. I've a pragmatic way to that problem: if the user can't figure out how to type in a char so that it appears in the allowedNameChars string, then that char can not be activated :-) (note that usually they wouldn't be able to type it into the label dialog, either) Does Lex::lex give unicode chars? Does std::string store them? Should we bother? (another white area on my mental map of LyX) < > Oh BTW, Chris, if you read this: < > what happens if the user activates '&' for names? < You know the result. I don't *know* it. But of course I have a vivid imagination ;-) Do we need to protect the user in a way that '&' is mangled even if it was included in the allowedNameChars? Any other chars? < > Should we ask others before we change the .layout or .lyx format ?? < Who said that we need to do that? I remember remotely some idea about a "CNAME= ..." option in the .layout files ... Now that a) and b) are gone, that won't be a problem. \relax :-) /Andreas