What about using the Python bindings and actual Mapnik objects to create the XML file?<br><br>It should be able to save an XML file, and that way you can abstract out all of the XML text from your program too...<br><br><br>
Beau<br><br><div class="gmail_quote">On Wed, May 28, 2008 at 3:05 AM, Steve Hill <<a href="mailto:steve@nexusuk.org">steve@nexusuk.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, 27 May 2008, Andy Allan wrote:<br>
<br>
> Now, if someone is volunteering to make a concise definition format<br>
> that can be pre-processed into the mapnik XML format (or mapnik python<br>
> code, or even just read by a modified mapnik directly, or whatever)<br>
> then I'd absolutely love to SEE THE WORKING CODE. That osm.xml is an<br>
> unwieldy beast isn't in question, nor are the myriad of possibilities<br>
> to improve it - what is lacking is working alternative.<br>
<br>
</div>For OpenPisteMap I create the XML using some PHP code:<br>
<a href="https://public.subversion.nexusuk.org/trac/browser/openpistemap/trunk/scripts/mktemplate.php" target="_blank">https://public.subversion.nexusuk.org/trac/browser/openpistemap/trunk/scripts/mktemplate.php</a><br>
<br>
I've not converted the entire XML file yet, and I don't pretend it is a<br>
universal solution, but I find it easier to work with than the raw MapNik<br>
XML file.<br>
<br>
It would be nice to have some kind of cascading language so that styles<br>
can be defined for each object at the top level and then modified for each<br>
zoom level, but I suspect no one has the time to do it (I certainly<br>
don't).<br>
<br>
- Steve<br>
<a href="mailto:xmpp%3Asteve@nexusuk.org">xmpp:steve@nexusuk.org</a> <a href="mailto:sip%3Asteve@nexusuk.org">sip:steve@nexusuk.org</a> <a href="http://www.nexusuk.org/" target="_blank">http://www.nexusuk.org/</a><br>
<br>
Servatis a periculum, servatis a maleficum - Whisper, Evanescence<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
talk mailing list<br>
<a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk" target="_blank">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk</a><br>
</div></div></blockquote></div><br>