Mattias Gaertner schrieb:
> 
> I don't know if the one letter is a problem, but 
> 
>       token_xml.SetValue('keys/' + {'t' +} inttostr(x)  +  '/values' ,
> 'some_value' );
> 
> the inttostr(x) does not create a valid xml name.
> 
> The fpc xmlwriter allows it and writes it (bug), but the xmlreader does not
> like it.

Okay, no I have it. The xmlreader is right. According to the XML specs,
an element name is defined as
  (Letter | '_' | ':') (NameChar)*

and NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar
| Extender


So the xmlwriter writes an illegal XML document in this case.

How should we handle this? Should xmlcfg add a special prefix (perhaps
together with a special attribute for reaching uniqueness), ignore such
a case, or throw an exception?


- Sebastian

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

Reply via email to