xsd:uriReference

Discussion in 'XML' started by richard@tortoise.demon.co.uk, Jan 2, 2008.

  1. Guest

    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
     
    , Jan 2, 2008
    #1
    1. Advertising

  2. wrote:

    > 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>


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 2, 2008
    #2
    1. Advertising

  3. Guest

    On Wed, 02 Jan 2008 19:13:41 +0100, Martin Honnen <>
    wrote:

    >See the specification
    ><URL:http://www.w3.org/TR/xmlschema-2/#built-in-datatypes>


    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
     
    , Jan 2, 2008
    #3
  4. Jerry Guest

    On Jan 2, 1:27 pm, wrote:
    > On Wed, 02 Jan 2008 19:13:41 +0100, Martin Honnen <>
    > wrote:
    >
    > >See the specification
    > ><URL:http://www.w3.org/TR/xmlschema-2/#built-in-datatypes>

    >
    > 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
     
    Jerry, Jan 3, 2008
    #4
  5. Guest

    , Jan 3, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,162
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    520
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Replies:
    1
    Views:
    894
    Martin Honnen
    Jan 14, 2004
  4. Peter Aberline

    xsd:any as a child of xsd:all

    Peter Aberline, Apr 5, 2004, in forum: XML
    Replies:
    0
    Views:
    814
    Peter Aberline
    Apr 5, 2004
  5. Bernd Oninger
    Replies:
    1
    Views:
    548
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page