W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2001

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

From: Eddie Robertsson <eddie@allette.com.au>
Date: Wed, 28 Mar 2001 12:24:01 +1000
Message-ID: <3AC14B40.74E51BEE@allette.com.au>
To: Jeff Rafter <jeffrafter@definedweb.com>
CC: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, xmlschema-dev@w3.org
Jeff,

I've done some more testing and with your suggestions I finally managed to
validate my examples by adding:

<!DOCTYPE xsd:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN"
"http://www.w3.org/2001/XMLSchema.dtd" [
  <!ENTITY % s ':xsd'>
  <!ENTITY % p 'xsd:'>
]>

to my Fields.xsd schema [1]. BTW, I also found an error in my first schema where
I had the attribute declaration:

<xsd:attribute name="tag" use="fixed" value="15A"/>

This is the old declaration from the CR and the new declaration in PR should be:

<xsd:attribute name="tag" fixed="15A"/>

> The fact that the first two examples did not work without a DOCTYPE is still
> a little frustrating-- especially the first one-- I suppose this makes sense
> as it is failing DTD validation (which is now the first step DOCTYPE or
> no)-- but still a little frustrating.

I agree that this is frustrating. I tried (like you) to use the prefix xs:
instead of xsd: but that doesn't work. I guess this means that you have to
specify a DOCTYPE declaration if you want to use the online version of XSV.

Cheers,
/Eddie

[1]
<!DOCTYPE xsd:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN"
"http://www.w3.org/2001/XMLSchema.dtd" [
  <!ENTITY % s ':xsd'>
  <!ENTITY % p '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" fixed="15A"/>
    </xsd:complexType>
   </xsd:element>
  </xsd:sequence>
 </xsd:complexType>
 <xsd:element name="fields" type="fields"/>
</xsd:schema>


>
>
> Thanks,
> Jeff Rafter
>
> ----- Original Message -----
> From: "Eddie Robertsson" <eddie@allette.com.au>
> To: "Jeff Rafter" <jeffrafter@definedweb.com>
> Cc: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>; <xmlschema-dev@w3.org>
> Sent: Tuesday, March 27, 2001 4:12 PM
> Subject: 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 21:22:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT