[mkgmap-dev] Splitter: Possible bug: not escaping '>' with '> '
From Steve Ratcliffe steve at parabola.me.uk on Thu Oct 22 13:48:41 BST 2009
Hi Ivan > 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>. How does that differ from what I said? Any & and < must be escaped. The > character does not need to be escaped. The exception for " ]]>" does not apply to attribute values because, I believe, they are not "content" and this would not apply for the given example in any case. <tag k='name' v='Zakynthos<> Kyllini'/> ..Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091022/ef7ca4e3/attachment.html
- Previous message: [mkgmap-dev] Splitter: Possible bug: not escaping '>' with '> '
- Next message: [mkgmap-dev] Custom waypoint icons and mgkmap style files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list