Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Data Range"

(fixed references and wordsmithing)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
This page describes the concept of an [[Data Range]].
+
This page describes the concept of a [[Data Range]].
  
 
== Definition ==
 
== Definition ==
* The datatype and [optionally] constraints on the value of an [[Attribute]]
+
* A [[Data Range]] defines the datatype and [optionally] constraints on the value of an [[Attribute]]
* An [[Data Range]] MUST have a base XML Schema type (e.g. String)
+
* A [[Data Range]] MUST have a base XML Schema type (e.g. String)
* An [[Data Range]] MAY include a set of constraint "facets" on its value(s). The names and semantics of these facets are taken from XML Schema. They include:
+
* A [[Data Range]] MAY include a set of constraining "facets" on its value(s). The names and semantics of these facets are taken from the [http://www.w3.org/TR/xmlschema-2/#rf-facets Constraining Facets] section of XML Schema Part 2. They include:
** Value must be one of {"red", "green", "blue"}
+
** Enumeration (e.g., must be one of {"red", "green", "blue"})
** Syntax constraints (e.g. regular expression)
+
** Pattern (e.g. regular expression)
** ranges (e.g. less than 5, more than 100)
+
** Bounding (e.g. less than 5, more than 100)
<to be completed>
+
See the [http://www.w3.org/TR/xmlschema-2/#rf-facets Constraining Facets] section of XML Schema Part 2 for detailed specifications and examples.
  
 
== Examples ==
 
== Examples ==
* An [[Attribute]] might have a value whose [[Data Range]] was defined in the [[Context]]s schema as "telephone number". This telephone number [[Data Range]] might have a base type of (XML Schema) string, but might also have an XML Schema ''pattern'' facet that constrained its syntax to be value in North America for auto-dialing (e.g. it is of the form (NNN)-NNN-NNNN)
+
* An [[Attribute]] might have a value whose [[Data Range]] was defined in the schema of its [[Context]] as "telephone number". This telephone number [[Data Range]] might have a base type of [http://www.w3.org/TR/xmlschema-2/#string string] as defined by XML Schema Part 2, but for use in auto-dialing, it might also have a [http://www.w3.org/TR/xmlschema-2/#rf-pattern pattern] facet that constrains the syntax to be valid phone number in North American (e.g. it is of the form (NNN)-NNN-NNNN).
  
== Predefined [[Data Ranges]]s ==
+
== Predefined [[Data Range]]s ==
 
The following are predefined in HOWL:
 
The following are predefined in HOWL:
 
# [[ContextIdDatatype]]
 
# [[ContextIdDatatype]]
 
# [[NodeIdDatatype]]
 
# [[NodeIdDatatype]]
# [[NodeRelationDatatype]]
 
  
 
== See Also ==
 
== See Also ==
 +
* [[Attribute]]
 
* [[Higgins Global Graph]]
 
* [[Higgins Global Graph]]
  
 
== Links ==
 
== Links ==
 
* [http://eclipse.org/higgins Higgins Home]
 
* [http://eclipse.org/higgins Higgins Home]

Revision as of 20:38, 12 February 2008

Introduction

This page describes the concept of a Data Range.

Definition

  • A Data Range defines the datatype and [optionally] constraints on the value of an Attribute
  • A Data Range MUST have a base XML Schema type (e.g. String)
  • A Data Range MAY include a set of constraining "facets" on its value(s). The names and semantics of these facets are taken from the Constraining Facets section of XML Schema Part 2. They include:
    • Enumeration (e.g., must be one of {"red", "green", "blue"})
    • Pattern (e.g. regular expression)
    • Bounding (e.g. less than 5, more than 100)

See the Constraining Facets section of XML Schema Part 2 for detailed specifications and examples.

Examples

  • An Attribute might have a value whose Data Range was defined in the schema of its Context as "telephone number". This telephone number Data Range might have a base type of string as defined by XML Schema Part 2, but for use in auto-dialing, it might also have a pattern facet that constrains the syntax to be valid phone number in North American (e.g. it is of the form (NNN)-NNN-NNNN).

Predefined Data Ranges

The following are predefined in HOWL:

  1. ContextIdDatatype
  2. NodeIdDatatype

See Also

Links

Copyright © Eclipse Foundation, Inc. All Rights Reserved.