References to XML schemas

30 Copyright © 2006. Open Geospatial Consortium, Inc. All Rights Reserved.

8.5 References to XML instances

GML instance data in the root-instance box and in the dictionary instance box may reference GML data, other XML data, or non-XML data through the use of URI references e.g. xlink:href, gml:uom, gml:srsName, gml:resultOf. Where such references point to data within the JPEG 2000 file, the URI shall be encoded in accordance with Clause 8.5. Note that instances e.g. GML elements can only be referenced within labeled boxes.

8.6 URI references within JPEG 2000 files

8.6.1 Introduction

This subclause describes the GMLJP2 URI syntax, a URI structure for references to schemas and instance elements that reside within the JPEG 2000 file. GMLJP2 URIs are required for ALL references from within GML instance data within the JPEG 2000 file as described in Clause 8.3 and Clause 8.4. The structure of the GMLJP2 URI is as follows: gmljp2:[resource.type][resource.id][fragment-identifier] where • “gmljp2” is the URI scheme • resource.type is one of o xml o codestream • values for resource.id depend upon the value of resource.type, as explained below in clauses 8.5.1-2 • values for fragment-identifier depends on the value of resource.type

8.6.2 The xml resource.type

URIs with xml resource.type identify a particular XML data box in the JPEG 2000 file. These URIs have the following form: gmljp2:xml[label] gmljp2:xml[label][id] where [label] identifies a labeled XML box within the gml.data box, and [id] is a GML id of an element inside the XML. If [id] is omitted, then the URI refers to the entire XML document. Copyright © 2006. Open Geospatial Consortium, Inc. All Rights Reserved. 31 GML instance documents may use URIs of this form to import schema, dictionary entries, or other XML data stored in the gml.data box. EXAMPLE 1 gmljp2:xmlmyschema.xsd Identifies a schema in the labeled XML box myschema.xsd. EXAMPLE 2 gmljp2:xmluom.xml Identifies a UOM dictionary in the labeled XML box uom.xml . EXAMPLE 3 gmljp2:xmluom.xmlmeter Identifies the meter entry in the UOM dictionary in the labeled XML box uom.xml .

8.6.3 The codestream resource.type

URIs with codestream resource.type identify a particular codestream. These URIs have the following form: gmljp2:codestream[codestream-number] where [codestream-number] is an integer, greater than or equal to 0, that identifies a particular codestream in the JPEG 2000 file. GML instance documents may use URIs of this form to refer to a particular codestream in the file. EXAMPLE 1 gmljp2:codestream0 Identifies the first codestream in the file. EXAMPLE 2 gmljp2:codestream1 Identifies the second codestream in the file .

8.6.4 Relative and absolute forms

The gmljp2 URI scheme supports a hierarchical naming system as specified in IETF RFC 2396 . Thus the gmljp2 URI can be used in absolute and relative forms. EXAMPLE 1 gmljp2:xmlgml.root-instance.xsd Absolute URI that identifies the root instance GML document. EXAMPLE 2 uom.xml Relative URI that resolves to gmljp2:xmluom.xml when interpreted against a base URI gmljp2:xmlgml.root-instance.xsd. EXAMPLE 3 uom.xmluom121 Relative URI with fragment identifier that resolves to gmljp2:xmluom.xmluom121 when interpreted against a base URI gmljp2:xmlgml.root-instance.xsd.