XML Tutorial/XML Schema/anyURI
The anyURI data type represents a URI reference
<source lang="xml">
<xsd:element name="address">
<xsd:simpleType> <xsd:restriction base="xsd:anyURI"> <xsd:enumeration value= "http://www.w3.org/TR/2000/PR-xlink-20001220/"/> <xsd:enumeration value= "http://www.w3.org/TR/xmlschema-2/"/> </xsd:restriction> </xsd:simpleType>
</xsd:element>
<address>http://www.w3.org/TR/xmlschema-2/</address></source>
To limit the accepted URI schemes
<source lang="xml">
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru" elementFormDefault="qualified"> <xs:simpleType name="myType"> <xs:restriction base="xs:anyURI"> <xs:pattern value="http://.*" /> </xs:restriction> </xs:simpleType>
</xs:schema></source>