[fpc-devel] MakeSkel problem with operators?
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Feb 20 14:47:23 CET 2012
michael.vancanneyt at wisa.be schrieb:
>> In an attempt to check the yet undocumented FCL units for use with
>> FPDoc and MakeSkel, I got an error in the created skeleton for gmp:
>> <element name="operator <(MPFloat, MPFloat): Boolean">
>>
>> The "<" and ">" chars in operator names should be escaped in the XML
>> files.
>
> Last time this was remarked on, there was discussion whether < and >
> need to
> be escaped inside attribute values. I never got around to checking the XML
> specs.
The specs really are a bit weird:
[10] AttValue ::= '"' ([^<&"] | Reference)* '"'
|? "'" ([^<&'] | Reference)* "'"
This means that "<" is not allowed inside an attribute value, while ">"
seems to be allowed. An "&" has to be escaped because it is used as the
escape character in a CharRef ("&#nn;") or EntityRef (e.g. "<").
> In each case it's easily fixable.
At least a writer has to escape "<", this should be fixed ASAP.
I'd escape both "<" and ">" in writing XML attributes, to prevent any
possible problems. A reader instead should allow for ">" there,
conforming to the specs.
DoDi
More information about the fpc-devel
mailing list