
Hello list, I found a bug in splitter, but don't know how to fix it. The problem is the following: There is a way, that is member of a relation and has special characters in its role-tag. Look here: http://www.openstreetmap.org/browse/way/26683153 The role tag in the osm-data, which I get from the Api is: role='<->' Ok, now I use the splitter and just try to split this file. The role-tag changes: role='<->' and so it's just invalid xml and mkgmap dies with a bad-file-format error. Can anybody explain the problem here with splitter? Why does it change the escaped characters and unescapes them? I use the latest splitter version from svn. Thanks Christoph

Hello list, I fixed the character escaping bug in splitter. I have no access to svn, so please can somebody check my changes and apply them, if they are correct?

Thanks Christoph, I've just checked in a (slightly different) fix. The 'type' attribute value also needed escaping, and there is in fact no need to escape
as > (as per the XML spec). Let me know if you have any further problems.
Cheers Chris CW> This is an OpenPGP/MIME signed message (RFC 2440 and 3156) CW> --------------enigDA3224F982D4EC5C0CC92824 CW> Content-Type: multipart/mixed; CW> boundary="------------080500010107080708040404" CW> This is a multi-part message in MIME format. CW> --------------080500010107080708040404 CW> Content-Type: text/plain; charset=ISO-8859-15 CW> Content-Transfer-Encoding: quoted-printable CW> Hello list, CW> I fixed the character escaping bug in splitter. I have no access to CW> svn, = CW> so please can somebody check my changes and apply them, if they are CW> corre= CW> ct? CW> --------------080500010107080708040404 CW> Content-Type: text/x-diff; CW> name="fix_escaping_bug.diff" CW> Content-Transfer-Encoding: quoted-printable CW> Content-Disposition: inline; CW> filename="fix_escaping_bug.diff" CW> Index: src/uk/me/parabola/splitter/OSMWriter.java CW> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 CW> D=3D=3D= CW> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 CW> D=3D=3D= CW> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D CW> --- src/uk/me/parabola/splitter/OSMWriter.java (Revision 99) CW> +++ src/uk/me/parabola/splitter/OSMWriter.java (Arbeitskopie) CW> @@ -128,7 +128,7 @@ CW> writeInt(m.getRef()); CW> writeString("' role=3D'"); CW> if (m.getRole() !=3D null) { CW> - writeString(m.getRole()); CW> + writeAttribute(m.getRole()); CW> } CW> writeString("'/>\n"); CW> } CW> @@ -158,6 +158,8 @@ CW> writeString("&"); CW> } else if (c =3D=3D '<') { CW> writeString("<"); CW> + } else if (c =3D=3D '>') { CW> + writeString(">"); CW> } else CW> writeChar(c); CW> } CW> --------------080500010107080708040404-- CW> CW> --------------enigDA3224F982D4EC5C0CC92824 CW> Content-Type: application/pgp-signature; name="signature.asc" CW> Content-Description: OpenPGP digital signature CW> Content-Disposition: attachment; filename="signature.asc" CW> -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAksQ7R4ACgkQkASFvss5Ug83OgCdEhbzHPexstGel/hS6XDrtzZn gIsAoJlQIA8owvtDr9RjRS5ETPI5JQpx =7ZtS CW> -----END PGP SIGNATURE----- --------------enigDA3224F982D4EC5C0CC92824--
participants (2)
-
Chris Miller
-
Christoph Wagner