Changes between Version 1 and Version 2 of XMLMapfiles
- Timestamp:
- Sep 25, 2009, 6:42:13 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
XMLMapfiles
v1 v2 11 11 Coming soon ... 12 12 13 == Getting Started: where to get the XML schema and XSL T? ==13 == Getting Started: where to get the XML schema and XSL file? == 14 14 15 Coming soon ... 15 The XML schema and the XSL file are included with the distribution in the '''xmlmapfile''' directory.[[BR]] 16 * mapfile.xsd : The XML schema used to validate a XML mapfile.[[BR]] 17 * mapfile.xsl : The XSL file used by XSLT to convert a XML mapfile into a regular mapfile. 18 19 == What kind of XML files can I create using the schema? == 20 21 You can create 3 XML file types: 22 * A complete XML mapfile: <Map ...></Map> 23 * A XML file for your layers: <LayerSet ...><Layer ...></Layer>...</LayerSet> 24 * A XML file for your symbols: <SymBolSet><Symbol ...></Symbol></SymbolSet> 25 26 There is one exampe of each type in the '''xmlmapfile/tests''' directory. 16 27 17 28 == How to use the XML schema? == 18 29 19 Coming soon ... 30 If you are using a XML editor like XMLSpy or XMLPad, you can easily specify the XML schema used to validate your current XML document. Furthermore, those editors will provide XML completition by listing allowed tags/attributes, automatic validation and more.. 31 32 If you prefer, you can also use a normal text editor. On Linux, there is a few tools to validate a XML file with its schema. On Ubuntu, you can do the following command: 33 {{{ 34 apt-get install xmlstarlet 35 xmlstarlet val -e --xsd mapfile.xsd my-new-mapfile.xml 36 }}} 20 37 21 38 == How to convert an XML mapfile to regular mapfile using the XSLT? == 22 39 23 Coming soon ... 40 If you are using a XML editor, you can easily specify the XSL file to use and transform the document. 41 42 On Ubuntu, you can do the following command: 43 {{{ 44 apt-get install xsltproc 45 xsltproc my-new-mapfile.xml > /tmp/my-regular-mapfile.map 46 }}}