home -> developer -> Doc -> Schema

Model

WaterkenTM Doc

Schema

2003-06-23

This specification describes the structure of a WaterkenTM Doc schema. A schema is a meta document that describes the structure of a Node. [dtd]

Abstract

A schema is a document with a fixed structure that defines the namespace for a Node's Branch Names.

Overview

Design goals

  1. An unambiguous description of the structure of a Node is provided.

Schema structure

A schema is a Node of type <http://waterken.com/doc/schema/Schema>. The <Schema> schema file contains a recursive definition of the structure of a schema. This specification provides an equivalent description of the structure in English.

Description

A <Schema> defines the namespace for a Node's Branch Names.

The 'unordered' branch determines whether or not the order of Branches within a Node is significant.

Each Branch is described by a 'child' branch of type <Branch>. A <Branch> defines the branch Name, the number of occurrences per Node, and the implicit Schema of the child Node.

The Schema unordered branch

The 'unordered' branch determines whether or not the order of Branches within the described Node is significant. The child node is of type <http://waterken.com/Boolean>. If the child node contains 'true', the relative order of Branches with differing Names is insignificant; otherwise it is significant. The relative order of Branches with the same Name is always significant.

The Schema child branch

Each Node Branch is defined by a corresponding 'child' branch. The child node is of type <http://waterken.com/doc/schema/Branch>.

The Branch name branch

The 'name' branch defines the Name of the described Branch.

The Branch arity branch

The 'arity' branch defines the number of occurrences of the described Branch within the described Node. The possible child node types are: <http://waterken.com/doc/schema/Once>; <http://waterken.com/doc/schema/Many>; or <http://waterken.com/doc/schema/Implied>.

The Branch implicit branch

The 'implicit' branch defines the implicit Schema of the described Branch's child node. The 'implicit' branch child node is of type <http://waterken.com/uri/URI> and contains the URI string.

Predefined schemas

This section defines the predefined schemas. New schemas can be made by creating aggregations of these predefined schemas.

An implementation is not required to understand any of the predefined schemas. However, if an implementation does exchange a data type described by a predefined schema, it SHOULD represent the data type using the predefined schema. Creating a synonymous schema reduces interoperability.

Primitive types

These node types are used to represent primitive data types.

<http://waterken.com/Boolean>

Represents a boolean value.

<http://waterken.com/Character>

Represents a text character.

<http://waterken.com/Integer>

Represents an integer. There are no limits on the size of the represented integer.

<http://waterken.com/Void>

Represents null.

<http://waterken.com/adt/string/String>

Represents a character string.

<http://waterken.com/uri/URI>

Represents an encoded URI string.

Schema types

These node types are used in the construction of document schemas.

<http://waterken.com/doc/schema/Branch>

Describes the structure of a Branch.

<http://waterken.com/doc/schema/Implied>

Indicates that the Branch has an implied value.

<http://waterken.com/doc/schema/Many>

Indicates that the Branch occurs zero to infinite times within the Node.

<http://waterken.com/doc/schema/Once>

Indicates that the Branch occurs exactly once within the Node.

<http://waterken.com/doc/schema/Schema>

Describes the structure of a Node.

Footnotes

[dtd] A WaterkenTM Doc document schema fills the same role as a W3C XML Schema, or DTD.

top

Copyright 2003 Waterken Inc. All rights reserved.

Valid XHTML 1.0! Valid CSS!