/[thuban]/branches/WIP-pyshapelib-bramz/Resources/XML/thuban.dtd
ViewVC logotype

Annotation of /branches/WIP-pyshapelib-bramz/Resources/XML/thuban.dtd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1245 - (hide annotations)
Thu Jun 19 19:29:23 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Resources/XML/thuban.dtd
File size: 3554 byte(s)
Add XML validation to some of the tests. Validation will only be
done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
To make the DTD available to the test cases it's moved into
Resources/XML

* Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
for versions up to and including 0.2. Two slight changes: added an
encoding specification and fixed the comment which refered to
GRASS, not Thuban

* test/xmlsupport.py: New support module for tests involving XML.
Currently there's a mix-in class for XML validation.

* test/test_xmlsupport.py: New. Tests for the xmlsupport module

* test/test_save.py (SaveSessionTest): Derive from ValidationTest
so that we can validate the
(SaveSessionTest.testEmptySession)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testSingleLayer)
(SaveSessionTest.testLayerProjection)
(SaveSessionTest.testRasterLayer)
(SaveSessionTest.testClassifiedLayer): Validate the generated XML

* test/runtests.py (main): Call print_additional_summary instead
of print_garbage_information

* test/support.py (resource_dir): New function to return the
"Resource" subdirectory
(print_additional_summary): New function to combine several
summary functions
(run_tests): Use print_additional_summary instead of calling
print_garbage_information directly

1 bh 1245 <?xml version="1.0" encoding="UTF-8"?>
2     <!-- thuban.dtd
3    
4     Copyright (C) 2001, 2003 by Intevation GmbH
5     Authors:
6     Jan-Oliver Wagner <[email protected]>
7    
8     This program is free software under the GPL (>=v2)
9     Read the file COPYING coming with Thuban for details.
10     -->
11    
12     <!-- a session contains a number of maps and tables
13     -->
14     <!ELEMENT session (map*, table*)>
15     <!ATTLIST session title CDATA #REQUIRED>
16    
17     <!-- a map consists of a number of layers
18     the projection refers to the projection
19     used for discplaing the map. If the projection
20     is missing, geographic coordinates in decimal
21     degrees are assumed.
22     -->
23     <!ELEMENT map (projection?, layer*, rasterlayer*, labellayer?)>
24     <!ATTLIST map title CDATA #REQUIRED>
25    
26     <!-- a layer represents a set of geographic objects.
27     pointers to the actual data are stored.
28     currently only a filename points to the data.
29     the projection refers to the projection
30     in which the data are stored. If the projection
31     is missing, geographic coordinates in decimal
32     degrees are assumed. Visibility is assumed true
33     unless otherwise specified.
34     -->
35     <!ELEMENT layer (projection?, classification?)>
36     <!ATTLIST layer title CDATA #REQUIRED>
37     <!ATTLIST layer filename CDATA #REQUIRED>
38     <!ATTLIST layer visible (true|false) "true">
39    
40     <!-- the fill and stroke attributes can be either "None" or "#RRGGBB"
41     RGB hex values
42    
43     All of fill, stroke and stroke_width may be omitted and default to
44     "None", "#000000" and "1" respectively.
45     -->
46     <!ATTLIST layer fill CDATA "None">
47     <!ATTLIST layer stroke CDATA "#000000">
48     <!ATTLIST layer stroke_width CDATA "1">
49    
50     <!-- a rasterlayer represents an image that has some geographic data
51     associated with it. The filename points to the image used.
52     -->
53     <!ELEMENT rasterlayer (projection?, classification?)>
54     <!ATTLIST rasterlayer title CDATA #REQUIRED>
55     <!ATTLIST rasterlayer filename CDATA #REQUIRED>
56     <!ATTLIST rasterlayer visible (true|false) "true">
57    
58     <!-- Classification data -->
59     <!ELEMENT classification (clnull?, (clpoint | clrange | clcont)*)>
60     <!ATTLIST classification field CDATA #REQUIRED>
61     <!ATTLIST classification field_type CDATA #REQUIRED>
62    
63     <!ELEMENT clnull (cldata*)>
64     <!ELEMENT clpoint (cldata*)>
65     <!ELEMENT clrange (cldata*)>
66     <!ELEMENT clcont (cldata*)>
67    
68     <!ATTLIST clnull label CDATA #IMPLIED>
69    
70     <!ATTLIST clpoint value CDATA #REQUIRED>
71     <!ATTLIST clpoint label CDATA #IMPLIED>
72    
73     <!ATTLIST clrange min CDATA #IMPLIED>
74     <!ATTLIST clrange max CDATA #IMPLIED>
75     <!ATTLIST clrange range CDATA #IMPLIED>
76     <!ATTLIST clrange label CDATA #IMPLIED>
77    
78     <!ATTLIST clcont rmin CDATA #REQUIRED>
79     <!ATTLIST clcont rmax CDATA #REQUIRED>
80     <!ATTLIST clcont dmin CDATA #REQUIRED>
81     <!ATTLIST clcont dmax CDATA #REQUIRED>
82    
83     <!ELEMENT cldata EMPTY>
84     <!ATTLIST cldata
85     stroke CDATA #IMPLIED
86     stroke_width CDATA #IMPLIED
87     fill CDATA #IMPLIED
88     >
89    
90     <!-- a table points to the actual file that
91     contains the tabular data.
92     -->
93     <!ELEMENT table EMPTY>
94     <!ATTLIST table title CDATA #REQUIRED>
95     <!ATTLIST table filename CDATA #REQUIRED>
96    
97     <!-- a projection has a number of parameters
98     -->
99     <!ELEMENT projection (parameter*)>
100     <!ATTLIST projection
101     name CDATA #IMPLIED >
102    
103     <!-- just a simple parameter consisting of a value
104     -->
105     <!ELEMENT parameter EMPTY>
106     <!ATTLIST parameter value CDATA #REQUIRED>
107    
108    
109     <!-- The label layer contains text labels -->
110     <!ELEMENT labellayer (label*) >
111    
112     <!ELEMENT label EMPTY>
113     <!ATTLIST label
114     x CDATA #REQUIRED
115     y CDATA #REQUIRED
116     text CDATA #REQUIRED
117     halign (left|center|right) #REQUIRED
118     valign (top|center|bottom) #REQUIRED>

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26