Log in Page Discussion History Go to the site toolbox

LocusXML Schemas

From BluWiki

Contents

Introduction

This document describes what a LocusXML Schema is, how it is structured, and how it is made.

What Is A LocusXML Schema?

A LocusXML Schema allows the data within LocusXML Instance Documents to be validated, and can assist applications that need to understand and process LocusXML Documents. In essence, it allows you to understand the contents of a LocusXML Instance Document. All LocusXML Schemas are written in the 2SimpleXML language, which is a simplified version of XML. There are two main types of schemas: (1) Core Schemas and (2) Domain Schemas.

  • Core Schemas define a standard set of elements that can be referenced in Domain Schemas. These core schemas include definitions for things like the Geometry element and the Feature element.
  • Domain Schemas are created by organizations or individuals that want to define custom elements based on the core schemas. As an example, a forestry company might develop a Forestry Domain Schema, while a Shipping Company might develop a Transportation Domain Schema. These Domain Schemas contain the information needed to understand the data from those domains stored or transferred in LocusXML documents.

An illustration can help you understand the difference between LocusXML Schemas and LocusXMLInstance Documents. You can think of a LoucsXML schema as a dictionary and set of grammar rules that make up the rules for a language. A LocusXML Instance Document can be thought of as a text written in that language. It uses that language to convey information, and must play by its rules.

How Is A LocusXML Schema Organized?

A LocusXML Schema has 2 main sections. The first section is the Metadata Section, the second is the Object Definitions Section.

The Metadata Section

Description:The Metadata section is marked by the Metadata tags. contains 2 types of child elements. Comments can be used to embed any remark into the metadata section. These remarks typically provide useful information about the LocusXML Schema, its history, and its use. External Schema References point to other LocusXML Schemas that define objects used in the schema containing the reference. Typically the Core LousXML Schemas will be imported, although other application schemas may also be imported.

Element Name: Metadata

Required Element: Yes

Default Value: Not Applicable

Maximum Number of Child Elements: 2

Minimum Number of Child Elements: 1

Allowed Child Elements:

Comments
ExternalSchemaReferences

Order of Child Elements Enforced: Yes

Order of Child Elements
Comments
ExternalSchemaReferences

Notes: Both the Comments Element and the ExternalSchemaReferences Element are optional. If they appear, they must contain the child elements appropriate for their element type. The Metadata Element is a required child element of the LocusXMLSchema Element, so it may appear empty, that is, without any either of its child elements.

Here is an example of the structure of the Metadata Section:

<Metadata>

<Comments>
</Comments>
<ExternalSchemaReferences>
</ExternalSchemaReferences>

</Metadata>

Rules and Structure of the Comments Element

The Comments Element is an optional element of the Metadata Element. If it is used the Comments Element must immediately follow the Metadata Element. It may contain one or more Comment Elements as child elements, and may only contain these Comment Elements. It must contain at least one comment element and there is no limit to the number of elements it can contain.

Here is an example of the structure of a Comments Element:

<Comments>

<Comment> (++) (...) (R)
</Comment>

</Comments>

The Comment Element

The Comment Element itself has 3 child elements. The first child element that should appear is the Author Element, the second to appear is the Date Element, the third element to appear is the Content Element.

The Author Element

The Author Element is an optional child element of the Comment element. Both of the Author Element's child elements are also optional. These are the Name Element, which contains the name of the comment's author, and the ContactInformation Element, which contains the information that can be used to contact the Author.

The ContactInformation Element

The ContactInformation Element is an optional child element of the Author Element. It can contain as many as 3 of its own child elements. The first element that can appear is the PhoneNumber Element. It must contain 3 child elements if it is used. These

The Telephone Number Element

The Address Element

The Date Element

The Content Element

Sample Comment

<Comment>

<Author>
<Name>The Sunburned Surveyor<Name>
<ContactInfomration>
<TelephoneNumber>
<Value>(XXX) XXX-XXXX</Value>
<Type>Cellular</Type>
<Description>Don’t call this number.</Description>
</TelephoneNumber>
<E-MailAddress>knight.in.shinging.armor@landoflegends.com</E-MailAddress>
<Address>
<Type>Mailing Address</Type>
<RouteName>Yellow Brick Road</RouteName>
<Number>1212</Number>
<Municipality>Fairy Tale Village</Municipality>
<PostalCode>99999</PostalCode>
<Nation>Land Of Legends</Nation>
</Address>
</ContactInformation>
</Author>
<Date>
<Year>2006</Year>
<Month>2</Month>
<Day>2</Day>
<DayOfTheWeek>Wednesday</DayOfTheWeek>
<Time>
<Hours>14</Hours>
<Minuts>11</Minutes>
</Time>
</Date>
<Content>This is a sample comment.</Content>

</Comment>

Defining Object Properties

Constraining Simple Data Types

Defining LocusXML Objects

Data Validation Rules

Defining Non-Spatial Features

Defining Spatial Features

Defining Geometries

Defining Relationships

A LocusXML Schema allows the data within LocusXML Instance Documents to be validated, and can assist applications that need to understand and process LocusXML Documents. All LocusXML Schemas are written in the 2SimpleXML language, which is a simplified version of XML. There are two main types of schemas: (1) Core Schemas and (2) Domain Schemas.

  • Core Schemas define a standard set of elements that can be referenced in Domain Schemas. These core schemas include definitions for things like the Geometry element and the Feature element.
  • Domain Schemas are created by organizations or individuals that want to define custom elements based on the core schemas. As an example, a forestry company might develop a Forestry Domain Schema, while a Shipping Company might develop a Transportation Domain Schema. These Domain Schemas contain the information needed to understand the data from those domains stored or transferred in LocusXML documents.

Structure of a LocusXML Schema

Defining Geospatial Data Types in a LocusXML Schema

Navigation

GSFS Home Page.

Site Toolbox:

Personal tools
GNU Free Documentation License 1.2
This page was last modified on 1 May 2006, at 22:24.
Disclaimers - About BluWiki