Target namespace GML application schemas

228 Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. The import element specifies that the components described in the imported GML schema document are associated with the GML namespace http:www.opengis.netgml3.2. This namespace identifier shall match the target namespace specified in the schema being imported in order to ensure XML Schema validity. The path schemaLocation to the imported GML schema document shall be provided and may be to a local copy of the document, or may be a URI reference to a copy of the schema document in some remote repository. EXAMPLE 2 Examples for such repositories are http:www.iso.orgittfISO_19136_Schemas on the ISO web site or http:schemas.opengis.net on the OGC web site. NOTE According to the W3C XML Schema specification, the schemaLocation attribute is only a hint to the physical location and may be disregarded by XML parsers.

21.2.4 Object type derivation

An object type declared by a GML application schema shall not violate any XML Schema derivation restrictions imposed by a final attribute on its base GML type nor any other XML Schema rules. The content model of an object type defined by a GML application schema shall derive directly from the most specialized GML object type that may serve as the base for its content model while preserving semantic consistency and increasing type specialization.

21.2.5 Elements representing objects

A GML application schema shall declare a global element for any object type that is to serve as the root element in a GML document.

21.2.6 Property type derivation

A property type defined by a GML application schema to contain inline or reference a single GML object may be derived from gml:AssociationRoleType or may follow the pattern of this type. A property type defined by a GML application schema to contain inline a single GML object may be derived from gml:InlinePropertyType or may follow the pattern of this type. A property type defined by a GML application schema to reference a single GML object may be derived from gml:ReferenceType or may follow the pattern of this type. A property type defined by an application schema to contain a homogeneous collection of GML objects shall follow the pattern of gml:InlinePropertyType, but may change the minOccurs and maxOccurs values in the sequence element. NOTE As derivation-by-restriction of property types has created problems with commonly used XML parsers in the past, all instances of such derivations have been removed from the GML schema. It is recommended to avoid derivation-by- restriction in property types in application schemas, too.

21.2.7 Elements representing properties

Elements representing properties of GML objects may be declared as global elements in an application schema, or they may be declared locally within object content models type definitions. NOTE Elements in the content of complex types that are defined with local names in an application schema will prevent derivation by restriction in another namespace . Such complex types are appropriate for elements intended for use ―as is‖ in their own namespace, and may be declared to be final=restriction. Elements in the content of complex types defined by reference to global elements support derivation by restriction in another namespace, allowing restriction of cardinality,