| 271 | ==== Feature Schemas ==== |
| 272 | |
| 273 | The fdo:version and fdo:minimumVersion elements will also be allowed on the <xs:schema> element. Both attributes are optional. |
| 274 | When the FDO XML Schema writer writes a single schema, it does not wrap the schema in an <fdo:Datastore> element. This is done to maximize compatibility with external applications. In this case, the document root element is <xs:schema>. Therefore, the schema writer will add the versioning attributes to the <xs:schema> element, in this case. |
| 275 | |
| 276 | In order to support the required schema override change, the !FdoFeatureSchema class will be modified to include a !GetFeatureDataObjectsVersion function as well as a !GetMinimumFeatureDataObjectsVersion function. |
| 277 | |
| 278 | |
| 279 | {{{ |
| 280 | class FdoFeatureSchema : |
| 281 | public FdoSchemaElement, |
| 282 | public FdoXmlSerializable |
| 283 | { |
| 284 | public: |
| 285 | /// \brief |
| 286 | /// Gets the version of FDO that created the Feature Schema |
| 287 | /// |
| 288 | /// \return |
| 289 | /// Returns the Feature Data Objects version as an FdoString. |
| 290 | /// The FDO version must conform to the format: |
| 291 | /// "[VersionMajor].[VersionMinor].[BuildMajor].[BuildMinor]". |
| 292 | /// |
| 293 | FDO_API virtual FdoString* GetFeatureDataObjectsVersion(); |
| 294 | |
| 295 | /// \brief |
| 296 | /// Gets the earliest version of FDO that can possibly |
| 297 | /// read the Schema Mapping |
| 298 | /// |
| 299 | /// \return |
| 300 | /// Returns the Feature Data Objects version as an FdoString. |
| 301 | /// The FDO version must conform to the format: |
| 302 | /// "[VersionMajor].[VersionMinor].[BuildMajor].[BuildMinor]". |
| 303 | /// |
| 304 | FDO_API virtual FdoString* GetMinimumFeatureDataObjectsVersion(); |
| 305 | … |
| 306 | … |
| 307 | }; |
| 308 | }}} |
| 309 | |
| 310 | ==== Schema Overrides ==== |
| 311 | |
| 312 | The Schema Overrides version is already stored in the provider attribute of the <!SchemaMapping> tag. The following new attribute (for the <!SchemaMapping> tag ) will be defined: |
| 313 | |
| 314 | minimumVersion |
| 315 | |
| 316 | Its behaviour is identical to that of the general fdo:minimumVersion. |
| 317 | |
| 318 | The following updated !FdoOverride.xsd definitions reflect the proposed changes above. |
| 319 | |
| 320 | |
| 321 | {{{ |
| 322 | <xs:schema> |
| 323 | ... |
| 324 | ... |
| 325 | <xs:complexType name="PhysicalSchemaMappingType" abstract="true"> |
| 326 | <xs:complexContent> |
| 327 | <xs:extension base="SchemaMappingElement"> |
| 328 | <xs:attribute name="provider" type="ProviderType" use="required"/> |
| 329 | <xs:attribute ref="fdo:minimumVersion" use="optional"/> |
| 330 | </xs:extension> |
| 331 | </xs:complexContent> |
| 332 | </xs:complexType> |
| 333 | ... |
| 334 | ... |
| 335 | </xs:schema> |
| 336 | }}} |
| 337 | |
| 338 | |
| 339 | In order to support the required schema override change, the !FdoPhysicalSchemaMapping and !FdoXmlSchemaMapping classes will be modified to include a !GetMinimumProviderVersion function. |
| 340 | |
| 341 | |
| 342 | {{{ |
| 343 | class FdoPhysicalSchemaMapping : |
| 344 | public FdoPhysicalElementMapping, |
| 345 | public FdoXmlSerializable |
| 346 | { |
| 347 | public: |
| 348 | /// \brief |
| 349 | /// Gets the earliest version of Provider that can possibly |
| 350 | /// read the Schema Mapping |
| 351 | /// |
| 352 | /// \return |
| 353 | /// Returns the version as a constant wchar_t*. |
| 354 | /// The version must conform to the format: |
| 355 | /// "[VersionMajor].[VersionMinor].[BuildMajor].[BuildMinor]". |
| 356 | /// |
| 357 | FDO_API virtual FdoString* GetMinimumProviderVersion () = 0; |
| 358 | … |
| 359 | … |
| 360 | }; |
| 361 | |
| 362 | /// \brief |
| 363 | /// FdoXmlSchemaMapping specifies overrides for translating a feature schema |
| 364 | /// between FDO and GML. |
| 365 | class FdoXmlSchemaMapping : |
| 366 | public FdoPhysicalSchemaMapping |
| 367 | { |
| 368 | public: |
| 369 | /// \brief |
| 370 | /// Gets the earliest version of Provider that can possibly |
| 371 | /// read the Schema Mapping |
| 372 | /// |
| 373 | /// \return |
| 374 | /// Returns the version as a constant wchar_t*. |
| 375 | /// The version must conform to the format: |
| 376 | /// "[VersionMajor].[VersionMinor].[BuildMajor].[BuildMinor]". |
| 377 | /// |
| 378 | FDO_API FdoString* GetMinimumProviderVersion (); |
| 379 | … |
| 380 | … |
| 381 | }; |
| 382 | }}} |
| 383 | |
| 384 | |
| 385 | |