- From: Jeff Rafter <jeffrafter@definedweb.com>
- Date: Tue, 27 Mar 2001 16:57:53 -0800
- To: "Eddie Robertsson" <eddie@allette.com.au>
- Cc: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, <xmlschema-dev@w3.org>
Eddie, Wow, I am so glad to hear I am not the only one-- I was getting worried <g>. Well I did some more digging (and a couple more samples) and seem to have found some success. The first set does not work (as described earlier), uses xs: as the schema prefix (which is the default) and has no DOCTYPE: http://xml.definedsys.com/schema/instance.xml http://xml.definedsys.com/schema/element.xml http://xml.definedsys.com/schema/children.xml The second set does not work, uses "" as the schema prefix and has no DOCTYPE http://xml.definedsys.com/schema/instance2.xml http://xml.definedsys.com/schema/element2.xml http://xml.definedsys.com/schema/children2.xml The third set *does* work, uses "" as the schema prefix and has a DOCTYPE. (By working I mean children3.xml correctly raises an error when validating) http://xml.definedsys.com/schema/instance3.xml http://xml.definedsys.com/schema/element3.xml http://xml.definedsys.com/schema/children3.xml For anyone else interested I used the following DOCTYPE in element3.xml <!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" [ <!ATTLIST schema xmlns:r CDATA #FIXED "http://xml.definedsys.com/samples"> <!ENTITY % s ''> <!ENTITY % p ''> ]> This is overriding the parameter entities p and s to be blank (no prefix for schema elements, which is why the second example failed) and adding the declaration of the xmlns:r attribute on the schema element (which is why the first example failed). In Eddie's case I suppose the entities should look like: <!ENTITY % s ':xsd'> <!ENTITY % p 'xsd:'> and the ATTLIST should probably look something like: <!ATTLIST schema xmlns:xsd CDATA #FIXED http://www.w3.org/2001/XMLSchema> xmlns CDATA #FIXED "http://foo"> 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. 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 19:57:48 UTC