RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)

You are welcome to use our annotation system to give your feedback.


Name

xsd:anyURI — URI (Uniform Resource Identifier).

Derived from:

xsd:anySimpleType

Primary:

xsd:anyURI

Known subtypes:

none

Data parameters (facets):

enumeration, length, maxLength, minLength, pattern.

Synopsis

<xsd:simpleType name="anyURI" id="anyURI">
  <xsd:restriction base="xsd:anySimpleType">
    <xsd:whiteSpace value="collapse" fixed="true"/>
  </xsd:restriction></xsd:simpleType>

Description

This datatype corresponds normatively to the XLink href attribute. Its value space includes the URIs defined by the RFC's (Requests for Comments) 2396 and 2732, but its lexical space doesn't require the character escapes needed to include non-ASCII characters in a URIs.

Restrictions

Relative URIs are not "absolutized" by W3C XML Schema. A pattern defined as:

<data type="xsd:anyURI">
  <choice">
    <value type="xsd:anyURI">http://www.w3.org/TR/xmlschema-0/</value>
    <value type="xsd:anyURI">http://www.w3.org/TR/xmlschema-1/</value>
    <value type="xsd:anyURI">http://www.w3.org/TR/xmlschema-2/</value>
  </choice> 
</data>

should not match the href attribute in this instance element:

<a xml:base="http://www.w3.org/TR/" href="xmlschema-1/">
  XML Schema Part 2: Datatypes
</a> 

The Recommendation states that "it is impractical for processors to check that a value is a context-appropriate URI reference," thus freeing schema processors from having to validate the correctness of the URI.

Example

<define name="httpURI">
  <data type="xsd:anyURI">
    <param name="pattern">http://.*<param>
  </data>
</define>

You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.