xsd:uriReference

R

richard

Hi All,

I seem to be unable to validate a schema using this datatype:


<?xml version="1.0"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="MyURI" type="xsd:uriReference"/>
</xsd:schema>


XMLSpy tells me:
"xsd:uriReference" must refer to an existing simple or complex type.

Is there something wrong with this? The textbook I'm using has
examples using this type.

Thanks for any help.
Richard
 
M

Martin Honnen

I seem to be unable to validate a schema using this datatype:


<?xml version="1.0"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="MyURI" type="xsd:uriReference"/>
</xsd:schema>


XMLSpy tells me:
"xsd:uriReference" must refer to an existing simple or complex type.

Is there something wrong with this? The textbook I'm using has
examples using this type.

I think there is xsd:anyURI but not xsd:uriReference.
See the specification
<URL:http://www.w3.org/TR/xmlschema-2/#built-in-datatypes>
 
R

richard


Thanks for the link Martin.

The book I'm using,'XML for the World Wide Web' by Elizabeth Castro
(2001) mentions several other datatypes which don't appear in that
chart. For example:
xsd:year
xsd:timeInstant
xsd:month

Maybe the final spec for XML Schema didn't include them. The book says
it's based on the 'last call' working draft.

Thanks for your help.
Richard
 
J

Jerry

Thanks for the link Martin.

The book I'm using,'XML for the World Wide Web' by Elizabeth Castro
(2001) mentions several other datatypes which don't appear in that
chart. For example:
xsd:year
xsd:timeInstant
xsd:month

Maybe the final spec for XML Schema didn't include them. The book says
it's based on the 'last call' working draft.

Thanks for your help.
Richard

Semantics are unchanged check this page here:
http://www.w3.org/TR/2001/PR-xmlschema-2-20010316/
67. 2001-01-22: am: Changed name timeDuration to duration and
timeInstant to dateTime.
89. 2001-03-14: pvb: changed names of day, month, year, monthDay and
yearMonth to gDay, gMonth, gYear, gMonthDay and gYearMonth; also added
health warnings that conversion to other calendar systems may not
result in simple values

Jerry Sheehan
http://www.altova.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,829
Latest member
KimberAlli

Latest Threads

Top