Adding namespaces to versioned OWSCommon formats. Adding regExes to OWSCommon v1 prototype. r=bartvde (closes #2671)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2010-06-11 14:38:42 +00:00
parent 35b8350aec
commit f7113df376
3 changed files with 29 additions and 8 deletions
+7 -4
View File
@@ -17,11 +17,14 @@ if (!OpenLayers.Format.OWSCommon) {
OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
/** /**
* Property: namespaces * Property: regExes
* {Object} Mapping of namespace aliases to namespace URIs. * Compiled regular expressions for manipulating strings.
*/ */
namespaces: { regExes: {
xlink: "http://www.w3.org/1999/xlink" trimSpace: (/^\s*|\s*$/g),
removeSpace: (/\s*/g),
splitSpace: (/\s+/),
trimComma: (/\s*,\s*/g)
}, },
/** /**
@@ -13,6 +13,15 @@
*/ */
OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, { OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, {
/**
* Property: namespaces
* {Object} Mapping of namespace aliases to namespace URIs.
*/
namespaces: {
ows: "http://www.opengis.net/ows/1.0",
xlink: "http://www.w3.org/1999/xlink"
},
/** /**
* Property: readers * Property: readers
* Contains public functions, grouped by namespace prefix, that will * Contains public functions, grouped by namespace prefix, that will
@@ -13,6 +13,15 @@
*/ */
OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, { OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, {
/**
* Property: namespaces
* {Object} Mapping of namespace aliases to namespace URIs.
*/
namespaces: {
ows: "http://www.opengis.net/ows/1.1",
xlink: "http://www.w3.org/1999/xlink"
},
/** /**
* Property: readers * Property: readers
* Contains public functions, grouped by namespace prefix, that will * Contains public functions, grouped by namespace prefix, that will