[Tdwg-tag] GML application schema for TDWG
Javier de la Torre
jatorre at gmail.com
Tue Dec 20 16:58:45 CET 2005
Hi Flip,
I've been playing a little bit more with the schemas. Here are some
ideas:
I think I am still not understaind the way you would like to
implement the schemas, but here is an idea on how to do it for ABCD
and for Darwin Core:
The main idea is to create a CollectionRecordType in a document
called something like abcd2.06_gml_biding.xsd or dwc2_gml_binding.xsd
What this schema does is to create an element called
CollectionRecordType that extends the AbstractFeatureType of GML and
that includes two elements in a sequence: Unit or Record of type
"abcd:Unit" or "dwc:Record" and another element called Geospatial of
type "tdwg_geo:GeospatialType". The schema imports GML, ABCD, and
your Geospatial schema.
We only create the binding between our actual schemas and GML and
then we add also a GeospatialExtension to them.
Here is an example:
---------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema.....>
<xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
<xsd:import namespace="http://www.tdwg.org/schemas/abcd/2.06"
schemaLocation="http://www.bgbm.org/TDWG/CODATA/Schema/ABCD_2.06/
ABCD_2.06.XSD"/>
<xsd:import namespace="http://www.tdwg.org/schemas/geo_spatial/1.0"
schemaLocation="http://gis.grinfo.net/resources/dcGeospatial_javi.xsd"/>
<xsd:complexType name="CollectionRecordType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element name="Unit" type="abcd:Unit"/>
<xsd:element name="Geospatial" type="tdwg_geo:GeospatialType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="CollectionRecord" type="CollectionRecordType"
substitutionGroup="gml:_Feature"/>
</xsd:schema>
--------------------------
I do not like it specially like this... Is not possible to extend
something from two types in XML schema no? this is why I have to
repeat CollectionRecord and then Unit...
I don't know. In any case now I think I understand that what you want
is to separate the extension from the binding, is that correct?
We will have to recreate our schemas inside the binding or we can
somehow, like I am showing, import directly our schemas?
I have the schemas that you sent already to make them validate if you
want them.
Javier.
More information about the tdwg-tag
mailing list