Updated Managing complex map files using XML entities (markdown)
parent
6b15f5911a
commit
09f40a0ba0
1 changed files with 9 additions and 10 deletions
|
@ -9,14 +9,14 @@
|
|||
Mapnik XML files can become quite complex. This tutorial introduces some
|
||||
techniques to keep large map files more maintainable. Specifically it
|
||||
demonstrates how to avoid duplicate data in the XML file, like:
|
||||
- color values
|
||||
- database connection parameters
|
||||
- icon directories
|
||||
|
||||
* color values
|
||||
* database connection parameters
|
||||
* icon directories
|
||||
|
||||
It also shows how to split a single, monolithic map file into reusable
|
||||
components using external entities and XInclude.
|
||||
|
||||
|
||||
## Mapnik XML support
|
||||
|
||||
Mapnik currently supports three different XML parsers:
|
||||
|
@ -30,7 +30,6 @@ features they support. The most comprehensive parser is the libxml2 parser and
|
|||
it is the only one that supports XML entities. As of Mapnik 0.6.0 libxml2 is the default
|
||||
when building the Mapnik source with SCons, and available in the Windows binaries as of 0.6.1.
|
||||
|
||||
|
||||
## Compiling mapnik with libxml2 support
|
||||
|
||||
If not default in your Mapnik version (< 0.6.0) the libxml2 parser is enabled by setting the XMLPARSER option at
|
||||
|
@ -55,11 +54,11 @@ For example, if you have installed the latest libxml2 on mac os x via Macports,
|
|||
All XML parsers have some built-in entities to escape otherwise illegal
|
||||
characters:
|
||||
|
||||
* >
|
||||
* <
|
||||
* &
|
||||
* "
|
||||
* '
|
||||
* `>`
|
||||
* `<`
|
||||
* `&`
|
||||
* `"`
|
||||
* `'`
|
||||
|
||||
The XML document type definition (DTD) provides a way to declare new, user
|
||||
defined entities:
|
||||
|
|
Loading…
Reference in a new issue