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 " |&amp;| " and " |&lt;| " respectively. The right angle bracket (>)* *may be represented using the string " |&gt;| ", and /MUST/, for compatibility <http://www.w3.org/TR/REC-xml/#dt-compat>, 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>.
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&lt;>  Kyllini'/>

..Steve
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to