[XML-SIG] xml silly question

Lars Marius Garshol larsga@garshol.priv.no
09 Nov 2000 14:18:25 +0100

(Sorry that I could not reply before; I have been having DNS problems.)

* Alexandre Fayolle
| Is it valid xml to have an attribute with an empty string as a value ?

To be valid an XML document must have a DTD to which it conforms. So
the correct answer to your question is that it depends on the type of
the attribute. For some, like CDATA, an empty string will be valid,
but for others, like ID, IDREF and NMTOKEN, it will not be.

However, regardless of what the DTD says, attributes with empty string
values will always be well-formed.

--Lars M.