Q: localfile as validating scheme (anyURI problem)

H

Hrvoje Somun

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
 
P

Pieter Vandepitte

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
 
H

Hrvoje Somun

i found error in my program, big thanks!



Pieter Vandepitte said:
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
 

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

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top