[Commits] r1354 - in sandbox/camptocamp/geobretagne: examples examples/data lib/GeoExt/widgets/form tests/lib/GeoExt/widgets/form

commits at geoext.org commits at geoext.org
Thu Sep 3 21:52:23 CEST 2009


Author: elemoine
Date: 2009-09-03 21:52:23 +0200 (Thu, 03 Sep 2009)
New Revision: 1354

Added:
   sandbox/camptocamp/geobretagne/examples/attributes-form.html
   sandbox/camptocamp/geobretagne/examples/attributes-form.js
   sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.js
Modified:
   sandbox/camptocamp/geobretagne/examples/data/describe_feature_type.xml
   sandbox/camptocamp/geobretagne/lib/GeoExt/widgets/form/FormPanel.js
   sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.html
Log:
applying patch-155-r1353-A1.diff from #155


Added: sandbox/camptocamp/geobretagne/examples/attributes-form.html
===================================================================
--- sandbox/camptocamp/geobretagne/examples/attributes-form.html	                        (rev 0)
+++ sandbox/camptocamp/geobretagne/examples/attributes-form.html	2009-09-03 19:52:23 UTC (rev 1354)
@@ -0,0 +1,25 @@
+<html>
+    <head>
+        <title>GeoExt AttributeReader and AttributeStore</title>
+
+        <script type="text/javascript" src="http://extjs.cachefly.net/builds/ext-cdn-771.js"></script>
+        <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/resources/css/ext-all.css" />
+        <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2.1/examples/shared/examples.css" />
+        <script src="http://openlayers.org/api/2.8/OpenLayers.js"></script>
+        <script type="text/javascript" src="../lib/GeoExt.js"></script>
+
+        <script type="text/javascript" src="attributes-form.js"></script>
+
+    </head>
+    <body>
+        <h1>Attribute Form</h1>
+
+        <p>This example shows how to create a form with fields derived from
+        attributes read from a WFS DescribeFeatureType response. This can be
+        useful when doing feature editing with WFS-T.</p>
+        
+        <p>Note that the js is not minified so it is readable.
+        See <a href="attributes-form.js">attributes-form.js</a>.</p>
+
+    </body>
+</html>

Added: sandbox/camptocamp/geobretagne/examples/attributes-form.js
===================================================================
--- sandbox/camptocamp/geobretagne/examples/attributes-form.js	                        (rev 0)
+++ sandbox/camptocamp/geobretagne/examples/attributes-form.js	2009-09-03 19:52:23 UTC (rev 1354)
@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2008-2009 The Open Source Geospatial Foundation
+ * 
+ * Published under the BSD license.
+ * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
+ * of the license.
+ */
+
+var form;
+Ext.onReady(function() {
+    Ext.QuickTips.init();
+    
+    // create attributes store
+    var attributeStore = new GeoExt.data.AttributeStore({
+        url: "data/describe_feature_type.xml"
+    });
+
+    form = new GeoExt.form.FormPanel({
+        renderTo: document.body,
+        attributeStore: attributeStore,
+        autoScroll: true,
+        height: 300,
+        width: 350,
+        defaults: {
+            width: 120,
+            maxLengthText: "too long",
+            minLengthText: "too short",
+            blankText: "this field is required"
+        }
+    });
+
+    attributeStore.load();
+});

Modified: sandbox/camptocamp/geobretagne/examples/data/describe_feature_type.xml
===================================================================
--- sandbox/camptocamp/geobretagne/examples/data/describe_feature_type.xml	2009-09-02 13:32:53 UTC (rev 1353)
+++ sandbox/camptocamp/geobretagne/examples/data/describe_feature_type.xml	2009-09-03 19:52:23 UTC (rev 1354)
@@ -1 +1 @@
-<?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.1/feature.xsd"/><xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" name="states_Type"><xs:complexContent><xs:extension base="gml:AbstractFeatureType"><xs:sequence><xs:element name="the_geom" minOccurs="0" nillable="true" type="gml:MultiPolygonPropertyType"/><xs:element name="STATE_NAME" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="STATE_FIPS" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="SUB_REGION" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="STATE_ABBR" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="LAND_KM" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="WATER_KM" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="PERSONS" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="FAMILIES" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="HOUSHOLD" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="MALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="FEMALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="WORKERS" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="DRVALONE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="CARPOOL" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="PUBTRANS" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="EMPLOYED" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="UNEMPLOY" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="SERVICE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="MANUAL" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="P_MALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="P_FEMALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="SAMP_POP" minOccurs="0" nillable="true" type="xs:double"/></xs:sequence></xs:extension></xs:complexContent></xs:complexType><xs:element name="states" type="topp:states_Type" substitutionGroup="gml:_Feature"/></xs:schema>
\ No newline at end of file
+<?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.1/feature.xsd"/><xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" name="states_Type"><xs:complexContent><xs:extension base="gml:AbstractFeatureType"><xs:sequence><xs:element name="the_geom" minOccurs="0" nillable="true" type="gml:MultiPolygonPropertyType"/><xs:element name="STATE_NAME" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="STATE_FIPS" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="SUB_REGION" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="STATE_ABBR" minOccurs="0" nillable="true"><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="2147483647"/></xs:restriction></xs:simpleType></xs:element><xs:element name="LAND_KM" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="WATER_KM" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="PERSONS" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="FAMILIES" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="HOUSHOLD" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="MALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="FEMALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="WORKERS" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="DRVALONE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="CARPOOL" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="PUBTRANS" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="EMPLOYED" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="UNEMPLOY" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="SERVICE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="MANUAL" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="P_MALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="P_FEMALE" minOccurs="0" nillable="true" type="xs:double"/><xs:element name="SAMP_POP" minOccurs="0" nillable="true" type="xs:double"/></xs:sequence></xs:extension></xs:complexContent></xs:complexType><xs:element name="states" type="topp:states_Type" substitutionGroup="gml:_Feature"/></xs:schema>

Modified: sandbox/camptocamp/geobretagne/lib/GeoExt/widgets/form/FormPanel.js
===================================================================
--- sandbox/camptocamp/geobretagne/lib/GeoExt/widgets/form/FormPanel.js	2009-09-02 13:32:53 UTC (rev 1353)
+++ sandbox/camptocamp/geobretagne/lib/GeoExt/widgets/form/FormPanel.js	2009-09-03 19:52:23 UTC (rev 1354)
@@ -19,7 +19,7 @@
 Ext.namespace("GeoExt.form");
 
 /** api: example
- *  Sample code showing how to use a GeoExt form panel.
+ *  Sample code showing how to use a GeoExt form panel as a search form.
  *
  *  .. code-block:: javascript
  *
@@ -56,6 +56,26 @@
  *          },
  *          scope: formPanel
  *      });
+ *
+ *  Sample code showing how to use a GeoExt form panel as a feature
+ *  attribute form (for editing features for example).
+ *
+ *  .. code-block:: javascript
+ *
+ *      var formPanel = new GeoExt.form.Panel({
+ *          attributeForm: new GeoExt.data.AttributeForm({
+ *              url: "http://some.wfs",
+ *              baseParams
+ *          },
+ *          autoScroll: true,
+ *          height: 300,
+ *          width: 350,
+ *          defaults: {
+ *              maxLengthText: "too long",
+ *              minLengthText: "too short",
+ *              blankText: "this field is required"
+ *          }
+ *      });
  */
 
 /** api: constructor
@@ -79,6 +99,152 @@
      */
     protocol: null,
 
+    /** api: config[attributeStore]
+     *  ``GeoExt.data.AttributeStore`` The attribute store to bind this
+     *  form panel to. If set form items will be created from the 
+     *  attribute records in this store.
+     */
+    attributeStore: null,
+
+    /** private: property[matchTextField]
+     *  ``RegExp`` Regular expression used to determine if a text field
+     *  must be created from an attribute record.
+     */
+    matchTextField: new RegExp(
+        "^(string)$", "i"
+    ),
+
+    /** private: property[matchNumberField]
+     *  ``RegExp`` Regular expression used to determine if a number field
+     *  must be created from an attribute record.
+     */
+    matchNumberField: new RegExp(
+        "^(float|decimal|double|int|long|integer|short)$", "i"
+    ),
+
+    /** private: property[matchCheckbox]
+     *  ``RegExp`` Regular expression used to determine if a checkbox
+     *  must be created from an attribute record.
+     */
+    matchCheckbox: new RegExp(
+        "^(boolean)$", "i"
+    ),
+
+    /** private: property[matchDatefield]
+     *  ``RegExp`` Regular expression used to determine if a date field
+     *  must be created from an attribute record.
+     */
+    matchDatefield: new RegExp(
+        "^(dateTime)$", "i"
+    ),
+
+    /** private: method[initComponent]
+     */
+    initComponent: function() {
+        GeoExt.form.FormPanel.superclass.initComponent.apply(this, arguments);
+
+        // any Ext.data.Store is authorized, so it also works
+        // with an Ext.data.Store configured with a
+        // GeoExt.data.AttributeReader
+        if(this.attributeStore instanceof Ext.data.Store) {
+            this.addFields();
+            this.bind(this.attributeStore);
+        }
+    },
+
+    /** private: method[bind]
+     *  :param store: :class:`GeoExt.data.AttributeStore` The attribute store
+     *  this form panel is to be bound to.
+     *
+     *  Bind the panel to the attribute store passed as a parameter.
+     */
+    bind: function(store) {
+        this.unbind();
+        store.on({
+            "load": this.onLoad,
+            scope: this
+        });
+        this.attributeStore = store;
+    },
+
+    /** private: method[unbind]
+     *
+     *  Unbind the panel from the attribute store it is currently bound
+     *  to, if any.
+     */
+    unbind: function() {
+        if(this.attributeStore) {
+            this.attributeStore.un("load", this.onLoad, this);
+        }
+    },
+
+    /** private: method[onLoad]
+     *  
+     *  Callback called when the store is loaded.
+     */
+    onLoad: function() {
+        if(this.items) {
+            this.removeAll();
+        }
+        this.addFields();
+    },
+
+    /** private: method[addFields]
+     *
+     *  For each attribute record in the attribute store create
+     *  a form field and add it to this form panel.
+     */
+    addFields: function() {
+        this.attributeStore.each(function(record) {
+            var name = record.get("name");
+            var type = record.get("type").split(":").pop(); // remove ns prefix
+            var nillable = record.get("nillable") === "true" ? true : false;
+            var restriction = record.get("restriction") || {};
+            if(type.match(this.matchTextField)) {
+                var maxLength = restriction["maxLength"] !== undefined ?
+                    parseFloat(restriction["maxLength"]) : undefined;
+                var minLength = restriction["minLength"] !== undefined ?
+                    parseFloat(restriction["minLength"]) : undefined;
+                this.add({
+                    xtype: "textfield",
+                    name: name,
+                    fieldLabel: name,
+                    value: "",
+                    maxLength: maxLength,
+                    minLength: minLength,
+                    allowBlank: nillable
+                });
+            } else if(type.match(this.matchNumberField)) {
+                var maxValue = restriction["maxInclusive"] !== undefined ?
+                    parseFloat(restriction["maxInclusive"]) : undefined;
+                var minValue = restriction["minInclusive"] !== undefined ?
+                    parseFloat(restriction["minInclusive"]) : undefined;
+                this.add({
+                    xtype: "numberfield",
+                    name: name,
+                    fieldLabel: name,
+                    value: "",
+                    maxValue: maxValue,
+                    minValue: minValue,
+                    allowBlank: nillable
+                });
+            } else if(type.match(this.matchCheckbox)) {
+                this.add({
+                    xtype: "checkbox",
+                    name: name,
+                    boxLabel: name
+                });
+            } else if(type.match(this.matchDatefield)) {
+                this.add({
+                    xtype: "datefield",
+                    fieldLabel: name,
+                    name: name
+                });
+            }
+        }, this);
+        this.doLayout();
+    },
+
     /** private: method[createForm]
      *  Create the internal :class:`GeoExt.form.BasicForm` instance.
      */
@@ -95,6 +261,13 @@
      */
     search: function(options) {
         this.getForm().search(options);
+    },
+
+    /** private: method[destroy]
+     */
+    destroy: function() {
+        this.unbind();
+        GeoExt.form.FormPanel.superclass.destroy.apply(this, arguments);
     }
 });
 

Modified: sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.html
===================================================================
--- sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.html	2009-09-02 13:32:53 UTC (rev 1353)
+++ sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.html	2009-09-03 19:52:23 UTC (rev 1354)
@@ -5,6 +5,7 @@
     <script type="text/javascript" src="../../../../../../ext/adapter/ext/ext-base.js"></script>
     <script type="text/javascript" src="../../../../../../ext/ext-all-debug.js"></script>
     <script type="text/javascript" src="../../../../../lib/GeoExt.js"></script>
+    <script type="text/javascript" src="FormPanel.js"></script>
 
     <script type="text/javascript">
     function test_constructor(t) {
@@ -34,8 +35,161 @@
               "its internal form"].join(" "));
         t.ok(form.getForm().protocol == protocol,
              "FormPanel constructor sets protocol in internal form");
+
+        /*
+         * Tear down
+         */
+
+        form.destroy();
     }
 
+    function test_constructor_attrstore(t) {
+        t.plan(5);
+
+        /*
+         * Set up
+         */
+
+        var store, form;
+        var NUM_ATTR = 24;
+
+        /*
+         * Test
+         */
+
+        // provide the form with a loaded store
+        store = new GeoExt.data.AttributeStore({
+           fields: [
+               {name: "name"},
+               {name: "type"},
+               {name: "nillable"},
+               {name: "restriction"}
+           ]
+        });
+        store.loadData(doc);
+        form = new GeoExt.form.FormPanel({
+           renderTo: "form",
+           attributeStore: store
+        });
+        t.eq(form.items.getCount(), NUM_ATTR,
+             "ctor auto-fills form when given a loaded store");
+        t.eq(store.hasListener("load"), true,
+             "ctor binds form to store when given a loaded store");
+
+        // provide the form with a non-loaded form
+        store = new GeoExt.data.AttributeStore({
+           fields: [
+               {name: "name"},
+               {name: "type"},
+               {name: "nillable"},
+               {name: "restriction"}
+           ]
+        });
+        form = new GeoExt.form.FormPanel({
+           renderTo: "form",
+           attributeStore: store
+        });
+        t.eq(form.items.getCount(), 0,
+             "ctor adds no item when given a non-loaded store");
+        t.eq(store.hasListener("load"), true,
+             "ctor binds form to store when given a non-loaded store");
+
+        // load the store
+        store.loadData(doc);
+        t.eq(form.items.getCount(), NUM_ATTR,
+             "fields are added when store is loaded");
+
+        /*
+         * Tear down
+         */
+
+        form.destroy();
+    }
+
+    function test_destroy(t) {
+        t.plan(1);
+
+        /*
+         * Set up
+         */
+
+        var store, form;
+
+        store = new GeoExt.data.AttributeStore({
+           fields: [
+               {name: "name"},
+               {name: "type"},
+               {name: "nillable"},
+               {name: "restriction"}
+           ]
+        });
+
+        form = new GeoExt.form.FormPanel({
+           renderTo: "form",
+           attributeStore: store
+        });
+
+        /*
+         * Test
+         */
+
+         form.destroy();
+         t.eq(store.hasListener("load"), false,
+              "destroy unbinds form from store");
+     }
+
+     function test_autofill(t) {
+        t.plan(13);
+
+        /*
+         * Set up
+         */
+
+        var store, form, field;
+
+        store = new GeoExt.data.AttributeStore({
+           fields: [
+               {name: "name"},
+               {name: "type"},
+               {name: "nillable"},
+               {name: "restriction"}
+           ]
+        });
+        store.loadData(doc);
+        form = new GeoExt.form.FormPanel({
+           renderTo: "form",
+           attributeStore: store
+        });
+
+        /*
+         * Test
+         */
+        field = form.getComponent(0);
+        t.ok(field instanceof Ext.form.TextField, "[txt] field is a text field");
+        t.eq(field.name, "STATE_NAME", "[txt] field name is correct");
+        t.eq(field.allowBlank, true, "[txt] field allowBlank is correct");
+        t.eq(field.maxLength, 10, "[txt] field maxLength is correct");
+        t.eq(field.minLength, 5, "[txt] field minLength is correct");
+
+        field = form.getComponent(1);
+        t.ok(field instanceof Ext.form.NumberField, "[num] field is a number field");
+        t.eq(field.name, "SAMP_POP", "[num] field name is correct");
+        t.eq(field.maxValue, 10, "[txt] field maxValue is correct");
+        t.eq(field.minValue, 5, "[txt] field minValue is correct");
+
+        field = form.getComponent(2);
+        t.ok(field instanceof Ext.form.Checkbox, "[bool] field is a checkbox");
+        t.eq(field.name, "BOOLEAN", "[bool] field name is correct");
+
+        field = form.getComponent(3);
+        t.ok(field instanceof Ext.form.DateField, "[date] field is a checkbox");
+        t.eq(field.name, "DATE", "[date] field name is correct");
+        /*
+         * Tear down
+         */
+        form.destroy();
+     }
+
     function test_actioncomplete(t) {
         t.plan(2);
 

Added: sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.js
===================================================================
--- sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.js	                        (rev 0)
+++ sandbox/camptocamp/geobretagne/tests/lib/GeoExt/widgets/form/FormPanel.js	2009-09-03 19:52:23 UTC (rev 1354)
@@ -0,0 +1,55 @@
+var doc = (new OpenLayers.Format.XML).read(
+'<?xml version="1.0" encoding="UTF-8"?>' +
+'<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:topp="http://www.openplans.org/topp" elementFormDefault="qualified" targetNamespace="http://www.openplans.org/topp">' +
+  '<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://sigma.openplans.org:80/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>' +
+  '<xsd:complexType name="statesType">' +
+    '<xsd:complexContent>' +
+      '<xsd:extension base="gml:AbstractFeatureType">' +
+        '<xsd:sequence>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiSurfacePropertyType"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="STATE_NAME" nillable="true">' +
+            '<xsd:simpleType>' +
+              '<xsd:restriction base="xsd:string">' +
+                '<xsd:maxLength value="10"/>' +
+                '<xsd:minLength value="5"/>' +
+              '</xsd:restriction>' +
+            '</xsd:simpleType>' +
+          '</xsd:element>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="SAMP_POP" nillable="true">' +
+            '<xsd:simpleType>' +
+              '<xsd:restriction base="xsd:double">' +
+                '<xsd:maxInclusive value="10"/>' +
+                '<xsd:minInclusive value="5"/>' +
+              '</xsd:restriction>' +
+            '</xsd:simpleType>' +
+          '</xsd:element>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="BOOLEAN" nillable="true" type="xsd:boolean"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="DATE" nillable="true" type="xsd:dateTime"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="STATE_FIPS" nillable="true" type="xsd:string"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="SUB_REGION" nillable="true" type="xsd:string"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="STATE_ABBR" nillable="true" type="xsd:string"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="LAND_KM" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="WATER_KM" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="PERSONS" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="FAMILIES" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="HOUSHOLD" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="MALE" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="FEMALE" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="WORKERS" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="DRVALONE" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="CARPOOL" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="PUBTRANS" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="EMPLOYED" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="UNEMPLOY" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="SERVICE" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="MANUAL" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="P_MALE" nillable="true" type="xsd:double"/>' +
+          '<xsd:element maxOccurs="1" minOccurs="0" name="P_FEMALE" nillable="true" type="xsd:double"/>' +
+        '</xsd:sequence>' +
+      '</xsd:extension>' +
+    '</xsd:complexContent>' +
+  '</xsd:complexType>' +
+  '<xsd:element name="states" substitutionGroup="gml:_Feature" type="topp:statesType"/>' +
+'</xsd:schema>'
+);
+



More information about the Commits mailing list