On Mon, 15 Aug 2005 22:04:35 +0200
Sebastian Günther <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner schrieb:
> >>
> >>While you are thinking about it, can you give an opinion on how to fix 
> >>lazarus bug 902:
> >http://www.lazarus.freepascal.org/mantis/view.php?id=902
> > 
> > 
> > Yes, it is the same.
> > 
> > I would expect, that xmlwriter should raise an exception.
> 
> I have a small suggestion, or better, a solution:
> 
> First, yes, the xmlwriter should check names for validity.
> 
> Second: Adding escaping to xmlcfg. Whenever a part of a path violates
> the XML specs, this part gets escaped. I suggest to use the underscore
> character as escaping char. Existing underscores in names gets doubled,
> and invalid characters will be transformed to underscore plus hex code.
> 
> As I don't want to break too many existing xmlcfg files, the use of
> escaping should be indicated by a leading underscore in the name, as I
> think this case is quite seldom. (hardly any currently existing xmlcfg
> files will use an underscore as first character in any name, I think).
> 
> Any comments?

The systems sounds useful.
Just one question: Why should xmlcfg allow, what xml does not?
I mean, I see the gain to allow numbers as identifiers, but OTOH a newbie
could be mislead, that his paths are the xml paths (e.g. '1' vs '_1'). When
the configs are read by other applications the paths are different. 
Maybe we can add a boolean property to TXMLConfig, whether to raise an
exception or to automatically convert illegal paths?
Then again, what should be the default for the property?


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to