W3C

Protocol for Web Description Resources (POWDER): Web Description Resources Datatypes (WDRD)

W3C Working Draft Draft 25 September 2007

This version
http://www.w3.org/TR/2007/WD-powder-xsd-20070925/
Latest version
http://www.w3.org/TR/powder-xsd/
Editors:
Andrea Perego, Università degli Studi dell'Insubria
Phil Archer, Family Online Safety Institute
Kevin Smith, Vodafone Group R & D

This document is also available as a non-normative XML Schema.


Abstract

This is the namespace document for the XML schema used in the Protocol for Web Description resources (POWDER). It defines the datatypes used and the structure for Description Resources where these are serialized in XML.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is a first public working draft which allows other POWDER documents to reference it (with due caution) and for the working group to solicit feedback. It is not appropriate for other documents to reference this one until it reaches a greater level of maturity. Feedback is particularly welcome on whether the regular expressions used to restrict each data type are the most appropriate. There is a place holder for a definition of the complex type of Description Resource.

This document was developed by the POWDER Working Group which expects to publish updates throughout the remainder of its charter.

Please send comments about this document to public-powderwg@w3.org (with public archive).

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

Introduction
Simple Types
| uriScheme | uriUserInfo | uriHost | uriPort | uriPath | uriQuery | uriFragment | uriPortRange | ip | cidr | stringList | uriList | uriSchemeList | uriUserInfoList | uriHostList | uriPortList | uriPathList | uriQueryList | uriFragmentList | uriPortRangeList | ipList | cidrList |
Complex Types
Description Resource
Acknowledgements
References

Introduction

This is the namespace document for the XML schema used in the Protocol for Web Description resources (POWDER). It provides a human-readable summary of the XML Schema itself.

A series of simple (atomic) datatypes is defined, followed by a list of datatypes derived from them. These are used as the range of the various RDF properties defined in POWDER: Grouping of Resources [GROUP].

The Description Resource complex type is provided to facilitate quick validation of a DR, when serialized in XML, before full semantic processing in an RDF environment. Description Resources themselves are defined separately [DR].

For each atomic type we have defined a pattern restriction (i.e. a regular expression). For those data types that refer to URI components, these are, of course, conformant with RFC3986. Appendix B of that RFC provides a regular expression that is useful in splitting up a URI into its components:

^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
 12            3  4          5       6  7        8 9

However, matching against this regular expression is not necessarily the same as validating a component once it has been separated from the URI. In some cases therefore we define our own pattern that we believe is more useful as a validation tool. White space is excluded from all atomic data types except response.

The group is particularly keen to receive feedback on whether we have chosen wisely and whether there are better patterns for validating URI components.

Simple Types

uriScheme

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriScheme

Base: xsd:string

Pattern value restriction: [a-zA-Z]+[a-zA-Z0-9\+\-\.]*

The datatype denoting a string corresponding to the scheme component of a URI.

uriUserInfo

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriUserInfo

Base: xsd:string

Pattern value restriction: [^/?#@\s]+

The datatype denoting a string corresponding to the userInfo component of a URI.

uriHost

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriHost

Base: xsd:string

Pattern value restriction: [^/?#@:\s]+

The datatype denoting a string corresponding to the host component of a URI.

uriPort

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriPort

Base: xsd:string

Pattern value restriction: (\d{1}|[1-9]\d*)

The datatype denoting a string corresponding to the port component of a URI.

uriPath

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriPath

Base: xsd:string

Pattern value restriction: [^?#\s]+

The datatype denoting a string corresponding to the path component of a URI.

uriQuery

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriQuery

Base: xsd:string

Pattern value restriction: [^#\s]+

The datatype denoting a string corresponding to the query component of a URI.

uriFragment

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriFragment

Base: xsd:string

Pattern value restriction: [^#\s]+

The datatype denoting a string corresponding to the fragment component of a URI.

uriPortRange

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:uriPortRange

Base: xsd:string

Pattern value restriction: (\d{1}|[1-9]\d*)\-(\d{1}|[1-9]\d*)

The datatype denoting a string corresponding to a range of logical ports.

The regular expressions used in the following two data types are provisional. The group would welcome feedback on this, particularly on developing a regular expression for an IPv6 address.

ip

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:ip

Base: xsd:string

Pattern value restriction: (((([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5]))|((([\da-fA-F]{1,4})|(\:))\:){7}(([\da-fA-F]{1,4})|(\:))))

The datatype denoting a string corresponding to a IPv4 or IPv6 address.

cidr

Atomic Datatype

Type: xsd:simpleType

Name: wdrd:cidr

Base: xsd:string

Pattern value restriction: (((([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\/(\d|[1-2]\d|3[0-2]))|((([\da-fA-F]{0,4})|(\:))\:){7}(([\da-fA-F]{0,4})|(\:)))\/([1-9]?\d|1[01]\d|12[0-8])))

stringList

List Datatype

Type: xsd:simpleType

Name: wdrd:stringList

Item: xsd:string

The datatype denoting a space-separated list of strings. This is used for POWDER vocabulary properties having as range a space-separated list of generic strings.

uriList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriList

Item: xsd:anyURI

The datatype denoting a space-separated list of URIs.

uriSchemeList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriSchemeList

Item: wdrd:uriScheme

Range datatype for wdr:includeSchemes wdr:excludeSchemes

The datatype denoting a space-separated list of URI schemes.

uriUserInfoList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriUserInfoList

Item: wdrd:uriUserInfo

Range datatype for wdr:includeUsers wdr:excludeUsers

The datatype denoting a space-separated list of URI userInfos.

uriHostList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriHostList

Item: wdrd:uriHost

Range datatype for wdr:includeHosts wdr:excludeHosts

The datatype denoting a space-separated list of URI hosts.

uriPortList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriPortList

Item: wdrd:uriPort

Range datatype for wdr:includePorts wdr:excludePorts

The datatype denoting a space-separated list of URI ports.

uriPathList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriPathList

Item: wdrd:uriPath

Range datatype for wdr:includeExactPaths wdr:excludeExactPaths wdr:includePathContains wdr:excludePathContains wdr:includePathStartsWith wdr:excludePathStartsWith wdr:includePathEndsWith wdr:excludePathEndsWith

The datatype denoting a space-separated list of URI paths.

uriQueryList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriQueryList

Item: wdrd:uriQuery

Range datatype for wdr:includeExactQueries wdr:excludeExactQueries wdr:includeQueryContains wdr:excludeQueryContains

The datatype denoting a space-separated list of URI queries.

uriFragmentList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriFragmentList

Item: wdrd:uriFragment

Range datatype for wdr:includeFragments wdr:excludeFragments

The datatype denoting a space-separated list of URI fragments.

uriPortRangeList

List Datatype

Type: xsd:simpleType

Name: wdrd:uriPortRangeList

Item: wdrd:uriPortRange

Range datatype for wdr:includeRanges wdr:excludePortRanges

The datatype denoting a space-separated list of logical port ranges.

ipList

List Datatype

Type: xsd:simpleType

Name: wdrd:ipList

Item: wdrd:ip

Range datatype for wdr:includeIPs wdr:excludeIPs

The datatype denoting a space-separated list of IP addresses.

cidrList

List Datatype

Type: xsd:simpleType

Name: wdrd:cidrList

Item: wdrd:cidr

Range datatype for wdr:includeIpRanges wdr:excludeIpRanges

The datatype denoting a space-separated list of CIDR blocks.

Complex Types

Description Resource

A complex type will defined for easy validation of a Description Resource when serialized in XML.

Acknowledgements

The editors duly acknowledge contributions made by all members of the POWDER Working Group.

References

[GROUP]
Protocol for Web Description Resources (POWDER): Grouping of Resources, A Perego, P Archer. This document is at http://www.w3.org/TR/powder-grouping/
[DR]
Protocol for Web Description Resources (POWDER): Description Resources, K Smith, P Archer. This document is at http://www.w3.org/TR/powder-dr/