xlink:href gml property in MapServer WFS

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Mar 21 12:07:33 PST 2006


Actually there might be something you can do. MapServer CVS version supports
a new templating capability. It basically allows you to define an adhoc string that is
used to present a particular attribute (but only 1 attribute at a time right now, Tom
has talked about wanting to do layer level GML templates similiar to query templates).

For example, we've been working with the FGDC Framework layer schema and they
support a mechanism for extending GML output. So we can do stuff like:

  gml_area_template "<$namespace:extended><name>area</name><value>$value</value></$namespace:extended>"

which upon processing results in:

  <gubs:extended>
    <name>area</name>
    <value>1500.00</name>
  </gubs:extended>

You may be able to do some funky stuff with this approach. The downside is that there's
no way to construct a schema fragment for the template (short of creating a schema
template which is not a bad idea) so this mechanism is intended to be used with external 
application schema which is something I am still working on (with Tom's help).

An idea any way. Let me know if you pursue.

Steve

>>> "Kralidis,Tom [Burlington]" <Tom.Kralidis at EC.GC.CA> 3/21/2006 1:10:32 PM >>>
The WFS will output elements as per field names, i.e.:

<location>location</location>
<access>access</access>

If you're looking for making the location field displayed as an XML
attribute, i.e. @xlink:href, I'm not sure there's much that can be done
here.   MapServer WFS/GML is mostly a flat output content model.  You
can group fields such that they are output as such, but I don't think
you can make a field output as an XML attribute.

..Tom




-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu] On
Behalf Of Norman Barker
Sent: Tuesday, March 21, 2006 1:48 PM
To: MAPSERVER-USERS at lists.umn.edu 
Subject: [UMN_MAPSERVER-USERS] xlink:href gml property in MapServer WFS


Hi,
 
I am thinking of creating a shapefile in python (using gdal) to index
all of the raster data I have in a file tree.
 
Fields of the shapefile will be location, extent, access
 
In particular for the access GML property I would like to express the
GML output from MapServer WFS to include an xlink:href attribute so that
this could point
to either a WMS url, ftp url, arcims url etc.
 
Is there a way to customize how MapServer delivers GML from a WFS in
this way?
 
Many thanks,
 
Norman



More information about the MapServer-users mailing list