- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 12 Mar 2002 18:25:50 +0000
- To: Simon Josefsson <simon+xmlschema-dev@josefsson.org>
- CC: xmlschema-dev@w3.org
Hi Simon, > I'm trying to get XSV (CVS HEAD) to work under linux, but it is > giving me some problems. Running it on triv.xml + triv.xsd yields: > > [sjosefsson@sjosefsson-pc xmlschema]$ python ./applyschema.py triv.xml triv.xsd > <?xml version='1.0'?> > <xsv docElt='{http://foo}root' instanceAssessed='true' instanceErrors='1' schemaDocs='triv.xsd' schemaErrors='0' schemaLocs='http://foo -> triv.xsd' target='/home/sjosefsson/src/xmlschema/triv.xml' > validation='lax' version='XSV 1.205/1.109 of 2001/10/03 21:06:42' xmlns='http://www.w3.org/2000/05/xsv'> > <schemaDocAttempt URI='/home/sjosefsson/src/xmlschema/triv.xsd' outcome='failure' source='command line'/> > <notASchema filename='/home/sjosefsson/src/xmlschema/triv.xsd'/> > <schemaDocAttempt URI='/home/sjosefsson/src/xmlschema/triv.xsd' namespace='http://foo' outcome='failure' source='schemaLoc'/> > <notASchema filename='/home/sjosefsson/src/xmlschema/triv.xsd'/> > <schemaDocAttempt URI='http://foo/' namespace='http://foo' outcome='failure' source='docElt'> > <notASchema filename='http://foo/'>couldn't open</notASchema> > </schemaDocAttempt> > <invalid char='5' code='cvc-elt.1.1' line='9' resource='file:///home/sjosefsson/src/xmlschema/triv.xml'>xsi:nil > specified on non-nillable element e2</invalid> > <XMLMessages> > Error: can't find address for host "foo" in http URL "http://foo/" > </XMLMessages> > </xsv> If you look at the first couple of schemaDocAttempts, it looks as though XSV is having problems opening triv.xsd. It only tries to find a schema at http://foo/ because it can't use the schema that you've provided at triv.xsd. So my guess would be that there's something wrong with triv.xsd. Perhaps it's not well formed, or perhaps the XML Schema namespace isn't declared properly within it. It's hard to tell without seeing the schema, but that's what I'd look at first. Try running XSV on triv.xsd with the -i flag so that it checks the schema itself. > Even running it on XMLSchema doesn't work: > > [sjosefsson@sjosefsson-pc xmlschema]$ python ./applyschema.py http://www.w3.org/2001/XMLSchema > <?xml version='1.0'?> > <xsv docElt='{http://www.w3.org/2001/XMLSchema}schema' instanceAssessed='true' instanceErrors='0' schemaErrors='0' target='http://www.w3.org/2001/XMLSchema' validation='lax' version='XSV > 1.205/1.109 of 2001/10/03 21:06:42' xmlns='http://www.w3.org/2000/05/xsv'> > <schemaDocAttempt URI='http://www.w3.org/2001/XMLSchema' namespace='http://www.w3.org/2001/XMLSchema' outcome='failure' source='docElt'/> > <notASchema filename='http://www.w3.org/2001/XMLSchema'/> > </xsv> That's a different problem. XSV is trying to retrieve the schema for schema by guessing that it's at the location specified by the namespace URI http://www.w3.org/2001/XMLSchema. There is a RDDL document there that refers to the schema for schema, so my guess would be that either XSV can't use the RDDL document or it can't open the connection to http://www.w3.org/2001/XMLSchema to retrieve the document for some reason. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Tuesday, 12 March 2002 13:25:52 UTC