[mapserver-users] Mapfile dtd proposal
Hugues Parvillers
Hugues.Parvillers at AgdF.com
Sun Jul 28 11:22:36 PDT 2002
For me, it would be very much better to user xsd rather than dtd.
H/P
France
Ricky Jo a écrit :
> Hi,
> As I have to deal with big mapfiles on my server, I
> wanted to push forward the migration to xml, which
> will simplify things, I think.
>
> Here's my proposal joined, with a quite not complete
> example. I inspired myself from some posts before.
> A few points of discussion:
> first, the order of elements is important in dtd, so
> if someone find a better ordering, it would be good. I
> simply copied from the doc and mapfile.c.
> Then, I did not pay attention on the requirement of
> the elements: they are mostly all optional. It is
> still needed to specify which elements are required
> (change XX? to XX).
> Finally, there is the question of attributes vs
> elements. So if some of you have good arguments, let's
> send your changes.
>
> The dtd has some drawbacks, such as the unability to
> constraints the element content. That's why you'll see
> some lines likes this.
> <units type="meter"/> instead of <units>meter</units>.
>
> Cheers,
>
> Ricky
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
>
> ------------------------------------------------------------------------
> Name: mapfile.dtd
> mapfile.dtd Type: XMLSpy Fichier (text/xml)
> Encoding: base64
> Description: mapfile.dtd
>
> ------------------------------------------------------------------------
> <?xml version="1.0" ?>
> <!DOCTYPE map SYSTEM "mapfile.dtd" >
>
> <map status="on" name="demo">
>
> <size x="600" y="600"/>
>
> <extent
> minx="388107.634400379"
> miny="5203120.88405952"
> maxx="500896.339019834"
> maxy="5310243.30613897" />
> <imagetype type="png"/>
> <interlace status="on"/>
>
> <symbol name="triangle" type="vector">
> <points>
> <point x="10" y="20" />
> <point x="15" y="25" />
> </points>
> </symbol>
>
> <units type="meters"/>
>
> <web>
> <header>demo_header.html</header>
> <imagepath>"/var/www/img"</imagepath>
> <imageurl>"http://demo/img/"</imageurl>
> <minscale>1000</minscale>
> <maxscale>1550000</maxscale>
> <template>demo.html</template>
> </web>
>
> <reference status="on">
> <image>graphics/reference_base.gif</image>
> <extent
> minx="388107.634400379"
> miny="5203120.88405952"
> maxx="500896.339019834"
> maxy="5310243.30613897" />
> <color r="-1" g="-1" b="-1"/>
> <outlinecolor r="255" g="0" b="0"/>
> </reference>
>
> <legend status="on">
> <keysize x="18" y="12"/>
> <label type="bitmap">
> <outlinecolor r="255" g="0" b="0"/>
> <labelsize type="medium"/>
> </label>
> </legend>
>
> <scalebar status="on">
> <backgroundcolor r="255" g="0" b="0"/>
> <color r="255" g="0" b="0"/>
> <imagecolor r="255" g="0" b="0"/>
> <intervals>5</intervals>
> <label>
> <outlinecolor r="255" g="0" b="0"/>
> <labelsize type="medium"/>
> </label>
> <outlinecolor r="255" g="0" b="0"/>
> <size x="350" y="5"/>
> <units type="miles" />
> </scalebar>
>
> <layer name="lakes" type="polygon" status="on">
> <classitem>usclass</classitem>
> <data>lakes.tif</data>
> <tolerance>3</tolerance>
> <toleranceunits type="miles"/>
>
> <class name="water">
> <backgroundcolor r="255" g="0" b="0"/>
> <color r="255" g="0" b="0"/>
> <expression>421</expression>
> <outlinecolor r="255" g="0" b="0"/>
> </class>
>
> </layer>
>
> </map>
More information about the MapServer-users
mailing list