Document Structure OGC Augmented Reality Markup Language 2.0 (ARML 2.0)

Copyright © 2015 Open Geospatial Consortium 50 7 ARML 2.0 – XSD and XML Serialization normative Requirements Class http:www.opengis.netspecarml2.0reqmodel Target Type Encoding Requirement http:www.opengis.netspecarml2.0reqmodelgeneralxsd_verification Any ARML 2.0 XML encoding shall validate correctly against the XSD defined in section 7. This chapter defines an XML serialization of the ARML 2.0 object model. The XML serialization is defined in XSD. The following XSD header, namespaces and imports are used: xsd:schema xmlns:xsd=http:www.w3.org2001XMLSchema targetNamespace= http:www.opengis.netarml2.0 xmlns= http:www.opengis.netarml2.0 xmlns:xlink=http:www.w3.org1999xlink xmlns:gml= http:www.opengis.netgml3.2 elementFormDefault=qualified version=2.0 -- Xlink import -- xsd:import namespace=http:www.w3.org1999xlink schemaLocation=http:www.w3.org1999xlink.xsd -- GML import -- xsd:import namespace=http:www.opengis.netgml3.2 schemaLocation=http:schemas.opengis.netgml3.2.1gml.xsd

7.1 Document Structure

The root element of the document is arml, which contains the following elements: ฀ The ARElements element, containing a list of ARElement objects. ฀ Multiple optional style elements, including and optional type‐attribute that allows the specification of the style‐mime type typically textcss. ฀ Multiple optional script elements, including and optional type‐attribute that allows the specification of the script‐mime type typically textjavascript. Requirement http:www.opengis.netspecarml2.0reqmodelgeneralroot_element arml is the root element of the encoding and shall be present. Requirement http:www.opengis.netspecarml2.0reqmodelARElementcontainer Only objects derived from ARElement are allowed as immediate child elements in the ARElements tag. Copyright © 2015 Open Geospatial Consortium 51 XML Example shortest possible ARML document: ?xml version=1.0 encoding=UTF-8? arml xmlns= http:www.opengis.netarml2.0 xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:www.opengis.netarml2.0 http:schemas.opengis.netarml2.0arml.xsd ARElements ARElements arml XML Example: arml xmlns= http:www.opengis.netarml2.0 ARElements Feature id=myFeature nameMy first Featurename anchors gml:Point gml:id=myPoint gml:pos48.123 13.456gml:pos gml:Point anchors Feature ARElements style type=textcss [CDATA[ ... CSS style definitions of any Visual Assets ]] style script type=textecmascript --might also be javascript and other derivatives -- [CDATA[ ... ECMAScript goes here ... ]] script arml XSD: xsd:complexType name=ArmlType xsd:sequence xsd:element name=ARElements maxOccurs=1 minOccurs=1 xsd:complexType xsd:sequence xsd:element ref=ARElement minOccurs=0 maxOccurs=unbounded xsd:sequence xsd:complexType xsd:element xsd:element name=style maxOccurs=unbounded minOccurs=0 xsd:complexType xsd:simpleContent xsd:extension base=xsd:string xsd:attribute name=type type=xsd:string use=optional xsd:attribute ref=xlink:href use=optional xsd:extension xsd:simpleContent Copyright © 2015 Open Geospatial Consortium 52 xsd:complexType xsd:element xsd:element name=script maxOccurs=unbounded minOccurs=0 xsd:complexType xsd:simpleContent xsd:extension base=xsd:string xsd:attribute name=type type=xsd:string use=optional xsd:attribute ref=xlink:href use=optional xsd:extension xsd:simpleContent xsd:complexType xsd:element xsd:sequence xsd:complexType xsd:element name=arml type=ArmlType

7.2 interface ARElement