[Thuban-commits] r2826 - in trunk/thuban: . Resources/XML Thuban/Model test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jan 31 16:41:56 CET 2008
Author: bernhard
Date: 2008-01-31 16:41:56 +0100 (Thu, 31 Jan 2008)
New Revision: 2826
Added:
trunk/thuban/Resources/XML/thuban-1.2.1.dtd
Removed:
trunk/thuban/Resources/XML/thuban-1.2.0.dtd
Modified:
trunk/thuban/ChangeLog
trunk/thuban/Thuban/Model/load.py
trunk/thuban/Thuban/Model/save.py
trunk/thuban/test/test_load.py
trunk/thuban/test/test_save.py
Log:
File format dtd is now thuban-1.2.1.dtd. Fixed tests for this.
* Resources/XML: Renaming thuban-1.2.0.dtd to thuban-1.2.1.dtd
as Thuban 1.2.0 actually used 1.1-dev.dtd.
* Resources/XML/thuban-1.2.1.dtd: Enabled keyword expansion again
so that the header is clean now, bumped copyright to 2008.
* Thuban/Model/save.py: Using thuban-1.2.1.dtd now.
* Thuban/Model/load.py: Added thuban-1.2.1.dtd instead of
thuban-1.2.0.dtd as recognised file formats.
* test/test_save.py, test/test_load.py: Using thuban-1.2.1.dtd now.
Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/ChangeLog 2008-01-31 15:41:56 UTC (rev 2826)
@@ -1,5 +1,25 @@
2008-01-31 Bernhard Reiter <bernhard at intevation.de>
+ File format dtd is now thuban-1.2.1.dtd. Fixed tests for this.
+
+ * Resources/XML: Renaming thuban-1.2.0.dtd to thuban-1.2.1.dtd
+ as Thuban 1.2.0 actually used 1.1-dev.dtd.
+
+ * Resources/XML/thuban-1.2.1.dtd: Enabled keyword expansion again
+ so that the header is clean now, bumped copyright to 2008.
+
+ * Thuban/Model/save.py: Using thuban-1.2.1.dtd now.
+
+ * Thuban/Model/load.py: Added thuban-1.2.1.dtd instead of
+ thuban-1.2.0.dtd as recognised file formats.
+
+ * test/test_save.py, test/test_load.py: Using thuban-1.2.1.dtd now.
+
+
+2008-01-31 Bernhard Reiter <bernhard at intevation.de>
+
+ Adding new Czech translation by new translator Jachym Cepicky.
+
* Thuban/UI/about.py: Adding entry for Czech translation. Adding
Didrik Pinte to the French translation. Adding Bernhard Reiter to
the German translation.
Deleted: trunk/thuban/Resources/XML/thuban-1.2.0.dtd
===================================================================
--- trunk/thuban/Resources/XML/thuban-1.2.0.dtd 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/Resources/XML/thuban-1.2.0.dtd 2008-01-31 15:41:56 UTC (rev 2826)
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- thuban-1.2.0.dtd
-
- Copyright (C) 2001, 2003, 2004, 2005 by Intevation GmbH
- Authors:
- Jan-Oliver Wagner <jan at intevation.de>
- Bernhard Herzog <bh at intevation.de>
-
- This program is free software under the GPL (>=v2)
- Read the file COPYING coming with Thuban for details.
-
- $Revision: 2688 $
- $Source$
- $Id: thuban-1.1.dtd 2688 2006-06-30 12:27:20Z frank $
--->
-
-<!-- a session contains zero or more database connections zero or more
- datasources and and zero or more maps
-
-At some point, the namespace attribute will likely be used by Thuban to
-identify the version of the file format.
--->
-
-<!ENTITY % shapesources "fileshapesource | derivedshapesource | dbshapesource">
-<!ENTITY % tables "filetable | jointable">
-<!ELEMENT session ((dbconnection | %shapesources; | %tables; )*, map*)>
-<!ATTLIST session
- title CDATA #REQUIRED
- xmlns CDATA #IMPLIED
->
-
-
-<!--
- A db connection represents the connection to a database.
-
- Currently only connections to postgis databases are supported and
- thus The dbtype attribute must be "postgis".
--->
-
-<!ELEMENT dbconnection EMPTY>
-<!ATTLIST dbconnection
- id ID #REQUIRED
- dbtype CDATA #REQUIRED
- dbname CDATA #REQUIRED
- host CDATA ""
- port CDATA ""
- user CDATA ""
->
-
-
-<!-- A dbshapesource represents a table with geometry data in a database
-
- The dbconn attribute must be the id of a dbconnection element
- occurring earlier in the document.
--->
-
-<!ELEMENT dbshapesource EMPTY>
-<!ATTLIST dbshapesource
- id ID #REQUIRED
- dbconn IDREF #REQUIRED
- tablename CDATA #REQUIRED
- id_column CDATA #REQUIRED
- geometry_column CDATA #REQUIRED
->
-
-<!--
- A fileshapesource is a source of shapes and perhaps attribute data
- read from a file. The filetype attribute must be one of the
- supported file types. Currently only "shapefile" is supported.
- -->
-
-<!ELEMENT fileshapesource EMPTY>
-<!ATTLIST fileshapesource
- id ID #REQUIRED
- filename CDATA #REQUIRED
- filetype CDATA #REQUIRED
->
-
-<!--
- A derivedshapesource is a source of shapes and attribute data
- derived from another shapesource for the shapes and a table for the
- attribute data.
- -->
-
-<!ELEMENT derivedshapesource EMPTY>
-<!ATTLIST derivedshapesource
- id ID #REQUIRED
- shapesource IDREF #REQUIRED
- table IDREF #REQUIRED
->
-
-
-<!-- a filetable points to the actual file that
- contains the tabular data.
-
- The filetype Attribute may be onve of "DBF" or "CSV"
--->
-<!ELEMENT filetable EMPTY>
-<!ATTLIST filetable
- id ID #REQUIRED
- title CDATA #REQUIRED
- filename CDATA #REQUIRED
- filetype CDATA #REQUIRED>
-
-<!--
- A jointable is a table with the result of something equivalent to
- this SQL Statement:
-
- SELECT * FROM left JOIN right WHERE left.leftcolumn = right.rightcolumn;
-
- The attributes left and right must be the ids of two tables defined
- previously in the XML-Document file. leftcolumn and rightcolumn are
- the column names to join on.
-
- The jointype attribute should be either "INNER" or "LEFT OUTER".
--->
-<!ELEMENT jointable EMPTY>
-<!ATTLIST jointable
- id ID #REQUIRED
- title CDATA #REQUIRED
- left IDREF #REQUIRED
- leftcolumn CDATA #REQUIRED
- right IDREF #REQUIRED
- rightcolumn CDATA #REQUIRED
- jointype CDATA #REQUIRED
->
-
-<!-- A Map
-
- A map consists of a number of layers
- the projection refers to the projection
- used to display the map. If the projection
- is missing, geographic coordinates in decimal
- degrees are assumed.
--->
-<!ELEMENT map (projection?, (layer | rasterlayer)*, labellayer?)>
-<!ATTLIST map title CDATA #REQUIRED>
-
-<!-- a layer represents a set of geographic objects.
- pointers to the actual data are stored.
- The shapestore attributes contains the id of the data store
- shown in the layer.
- the projection refers to the projection
- in which the data are stored. If the projection
- is missing, geographic coordinates in decimal
- degrees are assumed. Visibility is assumed true
- unless otherwise specified.
--->
-<!ELEMENT layer (projection?, classification?)>
-<!ATTLIST layer title CDATA #REQUIRED>
-<!ATTLIST layer shapestore IDREF #REQUIRED>
-<!ATTLIST layer visible (true|false) "true">
-<!-- the fill and stroke attributes can be either "None" or "#RRGGBB"
- RGB hex values
-
- All of fill, stroke, stroke_width and size may be omitted and default
- to "None", "#000000", "1" and "5" respectively.
- -->
-<!ATTLIST layer fill CDATA "None">
-<!ATTLIST layer stroke CDATA "#000000">
-<!ATTLIST layer stroke_width CDATA "1">
-<!ATTLIST layer size CDATA "5">
-
-
-<!-- a rasterlayer represents an image that has some geographic data
- associated with it. The filename points to the image used.
-
- The opacity is the opacity as a decimal floating point number in the
- range 0.0 ... 1.0
--->
-<!ELEMENT rasterlayer (projection?, classification?)>
-<!ATTLIST rasterlayer
- title CDATA #REQUIRED
- filename CDATA #REQUIRED
- opacity CDATA #IMPLIED
- visible (true|false) "true">
-
-
-<!-- Classification data -->
-<!ELEMENT classification (clnull?, clpoint*, clrange*, clpattern*, clcont*)>
-<!ATTLIST classification field CDATA>
-<!ATTLIST classification field_type CDATA>
-
-<!ELEMENT clnull (cldata*)>
-<!ELEMENT clpoint (cldata*)>
-<!ELEMENT clrange (cldata*)>
-<!ELEMENT clpattern (cldata*)>
-<!ELEMENT clcont (cldata*)>
-
-<!ATTLIST clnull label CDATA #IMPLIED>
-
-<!ATTLIST clpoint value CDATA #REQUIRED>
-<!ATTLIST clpoint label CDATA #IMPLIED>
-
-<!ATTLIST clrange min CDATA #IMPLIED>
-<!ATTLIST clrange max CDATA #IMPLIED>
-<!ATTLIST clrange range CDATA #IMPLIED>
-<!ATTLIST clrange label CDATA #IMPLIED>
-
-<!ATTLIST clpattern pattern CDATA #REQUIRED>
-<!ATTLIST clpattern label CDATA #IMPLIED>
-
-<!ATTLIST clcont rmin CDATA #REQUIRED>
-<!ATTLIST clcont rmax CDATA #REQUIRED>
-<!ATTLIST clcont dmin CDATA #REQUIRED>
-<!ATTLIST clcont dmax CDATA #REQUIRED>
-
-<!-- Visual appearance of the classification
-
- the fill and stroke attributes can be either "None" or "#RRGGBB"
- RGB hex values
-
- TODO: Actually, 'size' is only sensible for points. But adding it to
- clpoint would not be enough since the 'size' must also be available
- for the clnull. And clnull again is applied for lines and polygons.
- So, at some later point, maybe with introducing symbols, this
- has to be improved.
-
- All of fill, stroke, stroke_width and size may be omitted and default to
- "None", "#000000", "1" and "5" respectively.
- -->
-<!ELEMENT cldata EMPTY>
-<!ATTLIST cldata
- stroke CDATA #IMPLIED
- stroke_width CDATA #IMPLIED
- fill CDATA #IMPLIED
- size CDATA #IMPLIED
->
-
-
-<!-- a projection has a number of parameters
--->
-<!ELEMENT projection (parameter*)>
-<!ATTLIST projection
- name CDATA ""
- epsg CDATA #IMPLIED >
-
-<!-- just a simple parameter consisting of a value
--->
-<!ELEMENT parameter EMPTY>
-<!ATTLIST parameter value CDATA #REQUIRED>
-
-
-<!-- The label layer contains text labels -->
-<!ELEMENT labellayer (label*) >
-
-<!ELEMENT label EMPTY>
-<!ATTLIST label
- x CDATA #REQUIRED
- y CDATA #REQUIRED
- text CDATA #REQUIRED
- halign (left|center|right) #REQUIRED
- valign (top|center|bottom) #REQUIRED>
Copied: trunk/thuban/Resources/XML/thuban-1.2.1.dtd (from rev 2825, trunk/thuban/Resources/XML/thuban-1.2.0.dtd)
===================================================================
--- trunk/thuban/Resources/XML/thuban-1.2.0.dtd 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/Resources/XML/thuban-1.2.1.dtd 2008-01-31 15:41:56 UTC (rev 2826)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ $Id$
+ $HeadURL$
+
+ Copyright (C) 2001, 2003, 2004, 2005, 2008 by Intevation GmbH
+ Authors:
+ Jan-Oliver Wagner <jan at intevation.de>
+ Bernhard Herzog <bh at intevation.de>
+
+ This program is free software under the GPL (>=v2)
+ Read the file COPYING coming with Thuban for details.
+
+-->
+
+<!-- a session contains zero or more database connections zero or more
+ datasources and and zero or more maps
+
+At some point, the namespace attribute will likely be used by Thuban to
+identify the version of the file format.
+-->
+
+<!ENTITY % shapesources "fileshapesource | derivedshapesource | dbshapesource">
+<!ENTITY % tables "filetable | jointable">
+<!ELEMENT session ((dbconnection | %shapesources; | %tables; )*, map*)>
+<!ATTLIST session
+ title CDATA #REQUIRED
+ xmlns CDATA #IMPLIED
+>
+
+
+<!--
+ A db connection represents the connection to a database.
+
+ Currently only connections to postgis databases are supported and
+ thus The dbtype attribute must be "postgis".
+-->
+
+<!ELEMENT dbconnection EMPTY>
+<!ATTLIST dbconnection
+ id ID #REQUIRED
+ dbtype CDATA #REQUIRED
+ dbname CDATA #REQUIRED
+ host CDATA ""
+ port CDATA ""
+ user CDATA ""
+>
+
+
+<!-- A dbshapesource represents a table with geometry data in a database
+
+ The dbconn attribute must be the id of a dbconnection element
+ occurring earlier in the document.
+-->
+
+<!ELEMENT dbshapesource EMPTY>
+<!ATTLIST dbshapesource
+ id ID #REQUIRED
+ dbconn IDREF #REQUIRED
+ tablename CDATA #REQUIRED
+ id_column CDATA #REQUIRED
+ geometry_column CDATA #REQUIRED
+>
+
+<!--
+ A fileshapesource is a source of shapes and perhaps attribute data
+ read from a file. The filetype attribute must be one of the
+ supported file types. Currently only "shapefile" is supported.
+ -->
+
+<!ELEMENT fileshapesource EMPTY>
+<!ATTLIST fileshapesource
+ id ID #REQUIRED
+ filename CDATA #REQUIRED
+ filetype CDATA #REQUIRED
+>
+
+<!--
+ A derivedshapesource is a source of shapes and attribute data
+ derived from another shapesource for the shapes and a table for the
+ attribute data.
+ -->
+
+<!ELEMENT derivedshapesource EMPTY>
+<!ATTLIST derivedshapesource
+ id ID #REQUIRED
+ shapesource IDREF #REQUIRED
+ table IDREF #REQUIRED
+>
+
+
+<!-- a filetable points to the actual file that
+ contains the tabular data.
+
+ The filetype Attribute may be onve of "DBF" or "CSV"
+-->
+<!ELEMENT filetable EMPTY>
+<!ATTLIST filetable
+ id ID #REQUIRED
+ title CDATA #REQUIRED
+ filename CDATA #REQUIRED
+ filetype CDATA #REQUIRED>
+
+<!--
+ A jointable is a table with the result of something equivalent to
+ this SQL Statement:
+
+ SELECT * FROM left JOIN right WHERE left.leftcolumn = right.rightcolumn;
+
+ The attributes left and right must be the ids of two tables defined
+ previously in the XML-Document file. leftcolumn and rightcolumn are
+ the column names to join on.
+
+ The jointype attribute should be either "INNER" or "LEFT OUTER".
+-->
+<!ELEMENT jointable EMPTY>
+<!ATTLIST jointable
+ id ID #REQUIRED
+ title CDATA #REQUIRED
+ left IDREF #REQUIRED
+ leftcolumn CDATA #REQUIRED
+ right IDREF #REQUIRED
+ rightcolumn CDATA #REQUIRED
+ jointype CDATA #REQUIRED
+>
+
+<!-- A Map
+
+ A map consists of a number of layers
+ the projection refers to the projection
+ used to display the map. If the projection
+ is missing, geographic coordinates in decimal
+ degrees are assumed.
+-->
+<!ELEMENT map (projection?, (layer | rasterlayer)*, labellayer?)>
+<!ATTLIST map title CDATA #REQUIRED>
+
+<!-- a layer represents a set of geographic objects.
+ pointers to the actual data are stored.
+ The shapestore attributes contains the id of the data store
+ shown in the layer.
+ the projection refers to the projection
+ in which the data are stored. If the projection
+ is missing, geographic coordinates in decimal
+ degrees are assumed. Visibility is assumed true
+ unless otherwise specified.
+-->
+<!ELEMENT layer (projection?, classification?)>
+<!ATTLIST layer title CDATA #REQUIRED>
+<!ATTLIST layer shapestore IDREF #REQUIRED>
+<!ATTLIST layer visible (true|false) "true">
+<!-- the fill and stroke attributes can be either "None" or "#RRGGBB"
+ RGB hex values
+
+ All of fill, stroke, stroke_width and size may be omitted and default
+ to "None", "#000000", "1" and "5" respectively.
+ -->
+<!ATTLIST layer fill CDATA "None">
+<!ATTLIST layer stroke CDATA "#000000">
+<!ATTLIST layer stroke_width CDATA "1">
+<!ATTLIST layer size CDATA "5">
+
+
+<!-- a rasterlayer represents an image that has some geographic data
+ associated with it. The filename points to the image used.
+
+ The opacity is the opacity as a decimal floating point number in the
+ range 0.0 ... 1.0
+-->
+<!ELEMENT rasterlayer (projection?, classification?)>
+<!ATTLIST rasterlayer
+ title CDATA #REQUIRED
+ filename CDATA #REQUIRED
+ opacity CDATA #IMPLIED
+ visible (true|false) "true">
+
+
+<!-- Classification data -->
+<!ELEMENT classification (clnull?, clpoint*, clrange*, clpattern*, clcont*)>
+<!ATTLIST classification field CDATA>
+<!ATTLIST classification field_type CDATA>
+
+<!ELEMENT clnull (cldata*)>
+<!ELEMENT clpoint (cldata*)>
+<!ELEMENT clrange (cldata*)>
+<!ELEMENT clpattern (cldata*)>
+<!ELEMENT clcont (cldata*)>
+
+<!ATTLIST clnull label CDATA #IMPLIED>
+
+<!ATTLIST clpoint value CDATA #REQUIRED>
+<!ATTLIST clpoint label CDATA #IMPLIED>
+
+<!ATTLIST clrange min CDATA #IMPLIED>
+<!ATTLIST clrange max CDATA #IMPLIED>
+<!ATTLIST clrange range CDATA #IMPLIED>
+<!ATTLIST clrange label CDATA #IMPLIED>
+
+<!ATTLIST clpattern pattern CDATA #REQUIRED>
+<!ATTLIST clpattern label CDATA #IMPLIED>
+
+<!ATTLIST clcont rmin CDATA #REQUIRED>
+<!ATTLIST clcont rmax CDATA #REQUIRED>
+<!ATTLIST clcont dmin CDATA #REQUIRED>
+<!ATTLIST clcont dmax CDATA #REQUIRED>
+
+<!-- Visual appearance of the classification
+
+ the fill and stroke attributes can be either "None" or "#RRGGBB"
+ RGB hex values
+
+ TODO: Actually, 'size' is only sensible for points. But adding it to
+ clpoint would not be enough since the 'size' must also be available
+ for the clnull. And clnull again is applied for lines and polygons.
+ So, at some later point, maybe with introducing symbols, this
+ has to be improved.
+
+ All of fill, stroke, stroke_width and size may be omitted and default to
+ "None", "#000000", "1" and "5" respectively.
+ -->
+<!ELEMENT cldata EMPTY>
+<!ATTLIST cldata
+ stroke CDATA #IMPLIED
+ stroke_width CDATA #IMPLIED
+ fill CDATA #IMPLIED
+ size CDATA #IMPLIED
+>
+
+
+<!-- a projection has a number of parameters
+-->
+<!ELEMENT projection (parameter*)>
+<!ATTLIST projection
+ name CDATA ""
+ epsg CDATA #IMPLIED >
+
+<!-- just a simple parameter consisting of a value
+-->
+<!ELEMENT parameter EMPTY>
+<!ATTLIST parameter value CDATA #REQUIRED>
+
+
+<!-- The label layer contains text labels -->
+<!ELEMENT labellayer (label*) >
+
+<!ELEMENT label EMPTY>
+<!ATTLIST label
+ x CDATA #REQUIRED
+ y CDATA #REQUIRED
+ text CDATA #REQUIRED
+ halign (left|center|right) #REQUIRED
+ valign (top|center|bottom) #REQUIRED>
Property changes on: trunk/thuban/Resources/XML/thuban-1.2.1.dtd
___________________________________________________________________
Name: svn:keywords
+ LastChangedRevision Id HeadURL
Modified: trunk/thuban/Thuban/Model/load.py
===================================================================
--- trunk/thuban/Thuban/Model/load.py 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/Thuban/Model/load.py 2008-01-31 15:41:56 UTC (rev 2826)
@@ -151,7 +151,7 @@
"http://thuban.intevation.org/dtds/thuban-1.0rc1.dtd",
"http://thuban.intevation.org/dtds/thuban-1.0.0.dtd",
"http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd",
- "http://thuban.intevation.org/dtds/thuban-1.2.0.dtd"):
+ "http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"):
for key, value in dispatchers.items():
dispatchers[(xmlns, key)] = value
Modified: trunk/thuban/Thuban/Model/save.py
===================================================================
--- trunk/thuban/Thuban/Model/save.py 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/Thuban/Model/save.py 2008-01-31 15:41:56 UTC (rev 2826)
@@ -139,7 +139,7 @@
def write(self, file_or_filename):
XMLWriter.write(self, file_or_filename)
- self.write_header("session", "thuban-1.2.dtd")
+ self.write_header("session", "thuban-1.2.1.dtd")
self.write_session(self.session)
self.close()
@@ -166,7 +166,7 @@
attrs["xmlns:" + name] = uri
# default name space
attrs["xmlns"] = \
- "http://thuban.intevation.org/dtds/thuban-1.2.dtd"
+ "http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
self.open_element("session", attrs)
self.write_db_connections(session)
self.write_data_containers(session)
Modified: trunk/thuban/test/test_load.py
===================================================================
--- trunk/thuban/test/test_load.py 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/test/test_load.py 2008-01-31 15:41:56 UTC (rev 2826)
@@ -89,7 +89,7 @@
self.session = None
- dtd = "http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+ dtd = "http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
thubanids = [((dtd, n), (None, "id")) for n in
["fileshapesource", "filetable", "jointable",
"derivedshapesource"]]
@@ -191,8 +191,8 @@
# want to test whether the loading code handles that correctly.
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="Stra\xc3\x9fen & Landmarken">
<fileshapesource filetype="shapefile" id="D1"
filename="../../Data/iceland/political.shp"/>
@@ -287,8 +287,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="Non ASCII column name test">
<fileshapesource filetype="shapefile" id="D1"
filename="TestNonAsciiColumnName.shp"/>
@@ -362,8 +362,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="single map&layer">
<fileshapesource filetype="shapefile" id="D1"
filename="../../Data/iceland/political.shp"/>
@@ -405,8 +405,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="Thuban sample session">
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd" title="Thuban sample session">
<fileshapesource filetype="shapefile" id="D813968480" filename="../../Data/iceland/cultural_landmark-point.shp"/>
<map title="Iceland map">
<layer title="cultural_landmark-point" shapestore="D813968480" visible="true">
@@ -452,8 +452,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="single map&layer">
<fileshapesource filetype="shapefile" id="D138389860"
filename="../../Data/iceland/political.shp"/>
@@ -566,8 +566,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="single map&layer">
<fileshapesource filetype="shapefile" id="D1"
filename="../../Data/iceland/political.shp"/>
@@ -613,8 +613,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="single map&layer">
<fileshapesource filetype="shapefile" id="D2"
filename="../../Data/iceland/roads-line.shp"/>
@@ -694,8 +694,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="single map&layer">
<map title="Test Map">
<rasterlayer visible="false" filename="../../Data/iceland/island.tif"
@@ -730,8 +730,8 @@
class TestJoinedTable(LoadSessionTest):
file_contents = '''<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="A Joined Table session">
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd" title="A Joined Table session">
<fileshapesource filetype="shapefile" id="D137227612"
filename="../../Data/iceland/roads-line.shp"/>
<filetable filetype="DBF" filename="load_joinedtable.dbf" id="D136171140"
@@ -786,8 +786,8 @@
# test whether they're supported correctly.
file_contents = '''<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="Thuban sample session">
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd" title="Thuban sample session">
<fileshapesource filetype="shapefile" id="D145265052"
filename="../../Data/iceland/political.shp"/>
<fileshapesource filetype="shapefile" id="D145412868"
@@ -852,8 +852,8 @@
class TestPostGISLayer(LoadSessionTest):
file_contents = '''<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="unnamed session">
<dbconnection port="%(port)s" host="%(host)s" user="%(user)s"
dbtype="postgis" id="D142684948" dbname="%(dbname)s"/>
@@ -903,8 +903,8 @@
class TestPostGISLayerPassword(LoadSessionTest):
file_contents = '''<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="unnamed session">
<dbconnection port="%(port)s" host="%(host)s" user="%(user)s"
dbtype="postgis" id="D142684948" dbname="%(dbname)s"/>
@@ -998,8 +998,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
title="single map&layer">
<fileshapesource id="D1" filename="../../Data/iceland/political.shp"/>
<map title="Test Map">
@@ -1026,7 +1026,7 @@
# LoadError really was about the missing attribute
self.assertEquals(str(value),
"Element "
- "(u'http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd',"
+ "(u'http://thuban.intevation.org/dtds/thuban-1.2.1.dtd',"
" u'fileshapesource') requires an attribute 'filetype'")
else:
self.fail("Missing filetype attribute doesn't raise LoadError")
@@ -1066,8 +1066,8 @@
file_contents = '''\
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
-<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="AltPath Test session">
+<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
+<session xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd" title="AltPath Test session">
<fileshapesource filetype="shapefile" id="D1108450956" filename="../../Data/iceland/political.shp"/>
<fileshapesource filetype="shapefile" id="D1108900076" filename="../Data/iceland/roads-line.shp"/>
<fileshapesource filetype="shapefile" id="D1108947244" filename="../../Data/iceland/cultural_landmark-point.shp"/>
Modified: trunk/thuban/test/test_save.py
===================================================================
--- trunk/thuban/test/test_save.py 2008-01-31 13:58:23 UTC (rev 2825)
+++ trunk/thuban/test/test_save.py 2008-01-31 15:41:56 UTC (rev 2826)
@@ -66,7 +66,7 @@
class SaveSessionTest(unittest.TestCase, support.FileTestMixin,
xmlsupport.ValidationTest):
- dtd = "http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd"
+ dtd = "http://thuban.intevation.org/dtds/thuban-1.2.1.dtd"
thubanids = [((dtd, n), (None, "id")) for n in
["fileshapesource", "filetable", "jointable",
"derivedshapesource", "dbshapesource", "dbconnection"]]
@@ -112,9 +112,9 @@
file.close()
self.compare_xml(written_contents,
'<?xml version="1.0" encoding="UTF-8"?>\n'
- '<!DOCTYPE session SYSTEM "thuban-1.1.dtd">\n'
+ '<!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">\n'
'<session title="empty session" '
- 'xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">'
+ 'xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">'
'\n</session>\n')
self.validate_data(written_contents)
@@ -142,9 +142,9 @@
written_contents = file.read()
file.close()
expected_template = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="single map&layer"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<fileshapesource id="D1"
filename="../../Data/iceland/political.shp"
filetype="shapefile"/>
@@ -210,9 +210,9 @@
written_contents = file.read()
file.close()
expected_contents = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="single map&layer"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<fileshapesource id="D1"
filename="../../Data/iceland/political.shp"
filetype="shapefile"/>
@@ -282,9 +282,9 @@
written_contents = file.read()
file.close()
expected_contents = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="single map&layer"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<map title="Test Map">
<rasterlayer title="My RasterLayer"
filename="../../Data/iceland/island.tif"
@@ -353,9 +353,9 @@
written_contents = file.read()
file.close()
expected_contents = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="Map with Classifications"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<fileshapesource id="D1"
filename="../../Data/iceland/political.shp"
filetype="shapefile"/>
@@ -425,9 +425,9 @@
written_contents = file.read()
file.close()
expected_contents = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="a DBF Table session"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<filetable id="D1" filename="../../Data/iceland/political.dbf"
filetype="DBF" title="political"/>
</session>'''
@@ -483,9 +483,9 @@
written_contents = file.read()
file.close()
expected_contents = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="A Joined Table session"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<fileshapesource filename="../../Data/iceland/roads-line.shp"
filetype="shapefile" id="D142197204"/>
<filetable filename="save_joinedtable.dbf"
@@ -561,9 +561,9 @@
written = file.read()
file.close()
expected = '''<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
+ <!DOCTYPE session SYSTEM "thuban-1.2.1.dtd">
<session title="A PostGIS Session"
- xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd">
+ xmlns="http://thuban.intevation.org/dtds/thuban-1.2.1.dtd">
<dbconnection id="DB"
dbtype="postgis" dbname="plugh"
host="xyzzy" port="42"
More information about the Thuban-commits
mailing list