
On Thu, Oct 22, 2009 at 1:16 PM, Steve Ratcliffe <steve@parabola.me.uk>wrote:
On 22/10/09 10:27, Chris Miller wrote:
Yep that sounds like a bug all right. I haven't looked at the code yet but it's interesting that< is OK but> isn't... Thanks for the report, I've put it on my todo list.
No, the '>' is a valid character inside the attribute value. Only '&', '<' and the enclosing quote character need to be escaped.
Please allow me to disagree, at least on definition... Quote from http://www.w3.org/TR/REC-xml/ --- The ampersand character (&) and the left angle bracket (<) *MUST NOT* appear in their literal form, except when used as markup delimiters, or within a comment <http://www.w3.org/TR/REC-xml/#dt-comment>, a processing instruction<http://www.w3.org/TR/REC-xml/#dt-pi>, or a CDATA section <http://www.w3.org/TR/REC-xml/#dt-cdsection>. If they are needed elsewhere, they *MUST* be escaped<http://www.w3.org/TR/REC-xml/#dt-escape>using either numeric character references <http://www.w3.org/TR/REC-xml/#dt-charref> or the strings " & " and " < " respectively. The right angle bracket (>)* *may be represented using the string " > ", and *MUST*, for compatibility<http://www.w3.org/TR/REC-xml/#dt-compat>, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section <http://www.w3.org/TR/REC-xml/#dt-cdsection>. --- So in any XML document (i.e. OSM data), it MUST be escaped to be valid XML. As I mentioned, it does not break mkgmap so it is not a big issue... In the meantime, I have worked around it by better tracking quotes. I just reported what I think it is a possible bug... Thank you, Ivan
It would break mkgmap if it was invalid.
IK> <tag k='name' v='Zakynthos<> Kyllini'/>
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev