[xml] Strange behaviour in ID type attributes
- From: Manel de la Rosa <manel comp racclub net>
- To: xml gnome org
- Subject: [xml] Strange behaviour in ID type attributes
- Date: Thu, 20 Dec 2001 21:55:24 +0100
Hello.
I've defined a DTD, where there's defined an element with some attributes,
one of them being a CDATA one, another a ID one. The DTD encoding is
ISO-8859-1.
When I create a document conforming to this DTD, and put a ISO-8859-1 string
(ie, with accentued characters), as the value of the CDATA attribute
mentioned above, all goes well. The problem is when I do the same with the
ID attribute: if I try to validate the document, setting xmlDoValidityCheckingDefaultValue
to '1', I receive this error message:
"validity error: Syntax of value for attribute my_attr on my_element is not valid
<my_element my_attr="AnÃmals">"
(being the original value in this example "Anímals". Looks like libxml2 doesn't convert
back the internal UTF-8 string for the attribute value to the original ISO-8859-1 one
before printing the error message (?))
I've read the XML spec, and as far as I understand it, there's no constraint
in ID attributes about being ASCII-only, but I could be wrong...
Please, is this behaviour because a bug in libxml2? or am I loosing
something? if is really a bug, are there some plans to fix it?
Thank you.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]