logo separator

[mkgmap-dev] Splitter: Possible bug: not escaping '>' with '> '

From Ivan Kostoski ivan.kostoski at gmail.com on Thu Oct 22 13:07:34 BST 2009

On Thu, Oct 22, 2009 at 1:16 PM, Steve Ratcliffe <steve at 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 <http://www.w3.org/TR/REC-xml/#dt-comment>, a processing
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 " &amp; " and " &lt; " respectively. The right angle bracket (>)* *may
be represented using the string " &gt; ", and *MUST*, for
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 <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,

> It would break mkgmap if it was invalid.
> > IK>  <tag k='name' v='Zakynthos&lt;>  Kyllini'/>
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091022/9b23ed5e/attachment.html 

More information about the mkgmap-dev mailing list