Re: <include> with XSV (web-version)

Hi all,

I'm also experiencing validation problems with the new version of the web based
XSV validator. I just tried to validate the following simple instance and
schema:

Fields.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:complexType name="fields">
  <xsd:sequence>
   <xsd:element name="field">
    <xsd:complexType>
     <xsd:attribute name="tag" use="fixed" value="15A"/>
    </xsd:complexType>
   </xsd:element>
  </xsd:sequence>
 </xsd:complexType>
 <xsd:element name="fields" type="fields"/>
</xsd:schema>

Fields.xml:
<fields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Fields.xsd">
 <field tag="15A"/>
</fields>

The files are located at http://www.allette.com.au/Demo/XSV/Test/ and when I run
the web based validator with the following address:

http://www.allette.com.au/Demo/XSV/Test/Fields.xml

I get the following error:

"No declaration for document root found, validation was lax
schemaLocs: None -> Fields.xsd
The schema(s) used for schema-validation had no errors
No schema-validity problems were found in the target

Schema resources involved

Attempt to import a schema document from
http://www.allette.com.au/Demo/XSV/Test/Fields.xsd for no
namespace, failed"

Since the import for Fields.xsd failed I suspect there is an error in this file
but I can't seem to find it. Any suggestions?

Cheers,
/Eddie


Jeff Rafter wrote:

> Still at a loss.  I created a simple instance, but now it cannot find even
> the main schema at the schemaLocation.  The only thing I am sure of is that
> I am missing something...
>
> http://xml.definedsys.com/schema/instance.xml
> http://xml.definedsys.com/schema/element.xml
> http://xml.definedsys.com/schema/children.xml
>
> Warning: Start tag for undeclared element xs:schema
>  in unnamed entity at line 2 char 11 of
> http://xml.definedsys.com/schema/element.xml
> Warning: Root element is xs:schema, should be schema
>  in unnamed entity at line 2 char 11 of
> http://xml.definedsys.com/schema/element.xml
>
> Huh?  I thought it was allowed to be xs:schema if the namespace is prefixed.
> Am I missing a very important DOCTYPE declaration that fixes this?  I am
> guessing that is what my problem is, and it has something to do with that
> "important" warning on the XSV coverage page.  However I am not sure what
> the new public identifier for the DOCTYPE is and if it still works the same
> as the old one.
>
> Feeling more and more naive every day...
>
> Thanks,
> Jeff Rafter
>
> ==============
> XSV returns:
>
> <?xml version='1.0'?>
> <xsv docElt='{http://xml.definedsys.com/samples}root'
> instanceAssessed='true' instanceErrors='0' modDate='Fri,
>
> 23 Mar 2001 17:02:56 GMT' nsURIDeref='success'
> realName='http://xml.definedsys.com/schema/instance.xml'
>
> schemaErrors='0' schemaLocs='http://xml.definedsys.com/samples ->
>
> http://xml.definedsys.com/schema/element.xml' server='Microsoft-IIS/5.0'
> size='311'
>
> target='http://xml.definedsys.com/schema/instance.xml' validation='lax'
> version='XSV 1.178/1.88 of 2001/03/17
>
> 12:11:13' xmlns='http://www.w3.org/2000/05/xsv'>
> <importAttempt URI='http://xml.definedsys.com/schema/element.xml'
>
> namespace='http://xml.definedsys.com/samples' outcome='failure'/>
> <notASchema filename='http://xml.definedsys.com/schema/element.xml'/>
> <importAttempt URI='http://xml.definedsys.com/samples'
> namespace='http://xml.definedsys.com/samples'
>
> outcome='failure'/>
> <notASchema filename='http://xml.definedsys.com/samples'/>
> <XMLMessages>
> Warning: Start tag for undeclared element xs:schema
>  in unnamed entity at line 2 char 11 of
> http://xml.definedsys.com/schema/element.xml
> Warning: Root element is xs:schema, should be schema
>  in unnamed entity at line 2 char 11 of
> http://xml.definedsys.com/schema/element.xml
> Error: can't retrieve "http://xml.definedsys.com/samples": 302 Object Moved
> </XMLMessages>
> </xsv>
>
> ----- Original Message -----
> From: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
> To: "Jeff Rafter" <jeffrafter@definedweb.com>
> Cc: <xmlschema-dev@w3.org>
> Sent: Friday, March 23, 2001 2:04 AM
> Subject: Re: <include> with XSV (web-version)
>
> > "Jeff Rafter" <jeffrafter@definedweb.com> writes:
> >
> > > Can someone explain where I am going wrong here?  I have two documents
> > >
> > > http://xml.definedsys.com/schema/element.xml
> > > http://xml.definedsys.com/schema/children.xml
> > >
> > > <?xml version='1.0' encoding='UTF-8'?>
> > > <xs:schema targetNamespace="http://xml.definedsys.com/samples"
> > > xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> > >  <xs:include
> > > schemaLocation="http://xml.definedsys.com/schema/children.xml"/>
> > >  <xs:element name="root" type="children"/>
> > > </xs:schema>
> >
> > Sorry, same old story -- this schema document _is_ schema-valid per
> > the SforS.  That's _all_ XSV checks.  You give it a document, it
> > checks that document for schema-validity.  End of story.
> >
> > It's an entirely separate question whether documents which happen also
> > to be schema documents actually describe valid schemas.  To find that
> > out with XSV, the only thing you can do is try to use them as such,
> > i.e. to validate some _other_ document with them.
> >
> > Yes, XSV should have a switch which says something like "Pretend to
> > use this as a schema", but it doesn't (yet).  Sorry.
> >
> > ht
> > --
> >   Henry S. Thompson, HCRC Language Technology Group, University of
> Edinburgh
> >           W3C Fellow 1999--2001, part-time member of W3C Team
> >      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
> >     Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
> >      URL: http://www.ltg.ed.ac.uk/~ht/
> >

Received on Tuesday, 27 March 2001 19:11:34 UTC