Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] We're generating invalid dates in GML....

I'm curious if it is a uDig problem or a Geoserver problem. I remember someone mentioning Dates not being correctly handled by the WFS Client, but I don't know if it was ever addressed. It was before I entered the WFS battlefield.

Jesse

On 6-Mar-07, at 8:40 AM, Andrea Aime wrote:

Hi,
it seems my little versioned datastore is issue happy...
This time I've discovered I'm not able to see the changesets feature type (which is really the versioned data store log table) in udig
from WFS.

Now, uDig reports parsing errors on a date field, and in fact something
is going on because XML validation of the generated GML does not pass.

Here is the feature type:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.openplans.org/topp";
  xmlns:topp="http://www.openplans.org/topp";
  xmlns:gml="http://www.opengis.net/gml";
xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified"
  attributeFormDefault="unqualified" version="1.0">
  <xs:import namespace="http://www.opengis.net/gml";
schemaLocation="http://localhost:8080/geoserver/schemas/gml/2.1.2/ feature.xsd" />
  <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema";
    name="changesets_Type">
    <xs:complexContent>
      <xs:extension base="gml:AbstractFeatureType">
        <xs:sequence>
          <xs:element name="author" minOccurs="0" nillable="true">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="2147483647" />
              </xs:restriction>

            </xs:simpleType>
          </xs:element>
          <xs:element name="date" minOccurs="0" nillable="true"
            type="xs:dateTime" />
          <xs:element name="message" minOccurs="0" nillable="true">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:maxLength value="2147483647" />
              </xs:restriction>
            </xs:simpleType>

          </xs:element>
          <xs:element name="BBOX" minOccurs="0" nillable="true"
            type="gml:PolygonPropertyType" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name='changesets' type='topp:changesets_Type'
    substitutionGroup='gml:_Feature' />
</xs:schema>


and here is a sample feature:

<gml:featureMember>
    <topp:changesets fid="1">
      <topp:date>2007-03-05 15:38:57.046</topp:date>
      <topp:message>Version enabling archsites</topp:message>
      <topp:BBOX>
<gml:Polygon srsName="http://www.opengis.net/gml/srs/ epsg.xml#4326">
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates decimal="." cs="," ts=" ">
                -103.87256377,44.37740325 -103.6379418,44.37740325
                -103.6379418,44.48804274 -103.87256377,44.48804274
                -103.87256377,44.37740325
              </gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
      </topp:BBOX>
    </topp:changesets>
  </gml:featureMember>

Oh hum. om fact "2007-03-05 15:38:57.046" is not a valid xs:dateTime.
The valid pattern (http://www.w3.org/TR/2001/REC- xmlschema-2-20010502/#dateTime) is CCYY-MM-DDThh:mm:ss, so no milliseconds around, and we need the T, not a space.

I'm wondering if this problem came up before and how it was dealt with,
and if the new GML2 bindings would do the right thing.

Cheers
Andrea
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top