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&lt; is OK but&gt; 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, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings " &amp; " and " &lt; " respectively. The right angle bracket (>) may be represented using the string " &gt; ", and MUST, for compatibility, be escaped using either " &gt; " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.
---

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&lt;>  Kyllini'/>

..Steve

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev