[seek-dev] What to do about "nil"
Rod Spears
rods at ku.edu
Tue Nov 9 10:40:17 PST 2004
Here is the schema for Latitude per the DarwinCore spec:
<xsd:element name="DecimalLatitude"
substitutionGroup="digir:searchableReturnableData" nillable="true">
<xsd:annotation>
<xsd:documentation>The latitude of the location from which
the cataloged item was collected, expressed in decimal
degrees.</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:minInclusive value="-90.0"/>
<xsd:maxInclusive value="90.0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Note that the value can be "nil" and it also has a restriction. When the
value reaches the DarwinCoreDataSource as a string it is either a valid
number within the range or an empty string (length zero).
Currently, I convert the empty string to "0.0" which is the wrong thing
to do. The question is what should I do? As Dan suggested I could pick
an arbitray large number and pass that back, but that assumes the
consumer will know what to do with that value. I could skip any and all
rows that have empty Lat or Long values, but that may be bad for
consumers that want to see that data but don't care if it is nil (empty)
or not.
Any thoughts?
Rod
More information about the Seek-dev
mailing list