Q: localfile as validating scheme (anyURI problem)

Discussion in 'XML' started by Hrvoje Somun, Jan 7, 2004.

  1. Hrvoje Somun

    Hrvoje Somun Guest

    i am trying to use file on local computer as xsd, but my java program always
    throws;

    URI file:C:/data.xml
    cvc-datatype-valid.1.2.1: 'C:\shemadata.xsd' is not a valid value for
    'anyURI'.

    only anyuri type i use in schema is in

    <FirstTag xmlrp="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="shemadata.xsd"></FirstTag>


    in shema
    <xs:element name="FirstTag">
    <xs:complexType>
    <xs:sequence>
    ...
    ...
    </xs:sequence>
    <xs:attribute name="xmlrp" type="xs:anyURI" use="required"/> //
    only anyURI
    </xs:complexType>
    </xs:element>


    even if i change xmlrp to type string it wount validate right and throws
    same message. Is it because 'C:\shemadata.xsd' is not of type anyURI ?

    thnx
    Hrvoje Somun, Jan 7, 2004
    #1
    1. Advertising

  2. Hi , i don't think i understand your post completely, but a anyURI
    represents a Uniform Resource Identifier (URI). It's quite like URL's
    (though there's a difference). Anyway, to be short you should have
    something like file://<MY_LOCAL_FILE> and 'C:\shemadata.xsd' is
    definitely not

    w. kind regards
    PIeter

    Hrvoje Somun wrote:
    > i am trying to use file on local computer as xsd, but my java program always
    > throws;
    >
    > URI file:C:/data.xml
    > cvc-datatype-valid.1.2.1: 'C:\shemadata.xsd' is not a valid value for
    > 'anyURI'.
    >
    > only anyuri type i use in schema is in
    >
    > <FirstTag xmlrp="http://www.w3.org/2001/XMLSchema"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > xsi:noNamespaceSchemaLocation="shemadata.xsd"></FirstTag>
    >
    >
    > in shema
    > <xs:element name="FirstTag">
    > <xs:complexType>
    > <xs:sequence>
    > ...
    > ...
    > </xs:sequence>
    > <xs:attribute name="xmlrp" type="xs:anyURI" use="required"/> //
    > only anyURI
    > </xs:complexType>
    > </xs:element>
    >
    >
    > even if i change xmlrp to type string it wount validate right and throws
    > same message. Is it because 'C:\shemadata.xsd' is not of type anyURI ?
    >
    > thnx
    >
    >
    Pieter Vandepitte, Jan 8, 2004
    #2
    1. Advertising

  3. Hrvoje Somun

    Hrvoje Somun Guest

    i found error in my program, big thanks!



    "Pieter Vandepitte" <> wrote in message
    news:...
    > Hi , i don't think i understand your post completely, but a anyURI
    > represents a Uniform Resource Identifier (URI). It's quite like URL's
    > (though there's a difference). Anyway, to be short you should have
    > something like file://<MY_LOCAL_FILE> and 'C:\shemadata.xsd' is
    > definitely not
    >
    > w. kind regards
    > PIeter
    >
    > Hrvoje Somun wrote:
    > > i am trying to use file on local computer as xsd, but my java program

    always
    > > throws;
    > >
    > > URI file:C:/data.xml
    > > cvc-datatype-valid.1.2.1: 'C:\shemadata.xsd' is not a valid value for
    > > 'anyURI'.
    > >
    > > only anyuri type i use in schema is in
    > >
    > > <FirstTag xmlrp="http://www.w3.org/2001/XMLSchema"
    > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    > > xsi:noNamespaceSchemaLocation="shemadata.xsd"></FirstTag>
    > >
    > >
    > > in shema
    > > <xs:element name="FirstTag">
    > > <xs:complexType>
    > > <xs:sequence>
    > > ...
    > > ...
    > > </xs:sequence>
    > > <xs:attribute name="xmlrp" type="xs:anyURI" use="required"/>

    //
    > > only anyURI
    > > </xs:complexType>
    > > </xs:element>
    > >
    > >
    > > even if i change xmlrp to type string it wount validate right and throws
    > > same message. Is it because 'C:\shemadata.xsd' is not of type anyURI ?
    > >
    > > thnx
    > >
    > >

    >
    Hrvoje Somun, Jan 8, 2004
    #3
    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. Jens Mander
    Replies:
    0
    Views:
    502
    Jens Mander
    Jun 10, 2005
  2. Replies:
    3
    Views:
    722
    Richard Tobin
    Nov 12, 2005
  3. Claudio Grondi
    Replies:
    10
    Views:
    581
    Thomas Heller
    Apr 16, 2005
  4. David Brockus
    Replies:
    1
    Views:
    983
    Patrice
    Jun 25, 2009
  5. Replies:
    0
    Views:
    166
Loading...

Share This Page