| 30 | Current layer definition schema already defines an element "URL" in "VectorLayerDefinition" complex type to store URL definition. However, we may need further details of the URL, such as description of URL which can be displayed to user. Also, we may assign an FDO expression to URL element which designates a layer level URL setting for features, but at the the same time, we may as well would like to override it for a specific feature. For example: the URL xml element has been assigned Fdo value |
| 31 | {{{ |
| 32 | Concat('http://www.map.com/fid=', FeatId) |
| 33 | }}} |
| 34 | where 'FeatId' property is the property to identify a unique feature of the feature class. The the URL of features should be something like "http://www.map.com/fid=123" for feature with FeatID=123. At the same time, a user may want to change the URL this feature, e.g a hard coded string "www.google.com". We have to specify where to store this value. |
| 35 | |
| 36 | == Proposed Solution == |
| 37 | We need to change the layer definition a little bit. First we add a XML complex type named "URLDataType". |
31 | | == Proposed Solution == |
| 39 | {{{ |
| 40 | <xs:complexType name="URLDataType"> |
| 41 | <xs:annotation> |
| 42 | <xs:documentation>URL information for features.</xs:documentation> |
| 43 | </xs:annotation> |
| 44 | <xs:sequence> |
| 45 | <xs:element name="Content" type="xs:string" minOccurs="0"> |
| 46 | <xs:annotation> |
| 47 | <xs:documentation>The real address of the URL. This can be an string FDO expression.</xs:documentation> |
| 48 | </xs:annotation> |
| 49 | </xs:element> |
| 50 | <xs:element name="Description" type="xs:string" minOccurs="0"> |
| 51 | <xs:annotation> |
| 52 | <xs:documentation>The description of the URL. This can be an string FDO expression.</xs:documentation> |
| 53 | </xs:annotation> |
| 54 | </xs:element> |
| 55 | <xs:element name="ContentOverride" type="xs:string" minOccurs="0"> |
| 56 | <xs:annotation> |
| 57 | <xs:documentation>Specify the property name of the feature class where the override of URL content for a specific feature can be stored.</xs:documentation> |
| 58 | </xs:annotation> |
| 59 | </xs:element> |
| 60 | <xs:element name="DescriptionOverride" type="xs:string" minOccurs="0"> |
| 61 | <xs:annotation> |
| 62 | <xs:documentation>Specify the property name of the feature class where the override of URL description for a specific feature can be stored.</xs:documentation> |
| 63 | </xs:annotation> |
| 64 | </xs:element> |
| 65 | <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/> |
| 66 | </xs:sequence> |
| 67 | </xs:complexType> |
| 68 | }}} |
| 69 | The child elements this complex type is well explained in its annotation. |
| 70 | |
| 71 | Then change the original "URL" element in "VectorLayerDefinition" from simple type "xs:string" to complex type "URLDataType". |
| 72 | {{{ |
| 73 | <xs:element name="Url" type="URLDataType" minOccurs="0"> |
| 74 | <xs:annotation> |
| 75 | <xs:documentation>The optional URL information associated with each feature.</xs:documentation> |
| 76 | </xs:annotation> |
| 77 | </xs:element> |
| 78 | }}} |