|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: What am I overlooking...?
Hi John, My guess is that the target namespace of your schema does not match the namespace in your instance document. They must match _exactly_. XSV is dereferencing the namespace because it is looking for a schema document with the correct target namespace. If it can't find an appropriate schema document via either the xsi:schemaLocation attribute or a command line parameter, it dereferences the namespace as a last resort. There is nothing illegal about this - processors are not required to dereference the namespace, but they are not forbidden from doing so either. Also, it looks like you are using a fairly old version of XSV. I would upgrade. Hope that helps, Priscilla ------------------------------------------------------------------ Priscilla Walmsley priscilla@w... Vitria Technology http://www.vitria.com Author, Definitive XML Schema (Prentice Hall PTR) ------------------------------------------------------------------ > -----Original Message----- > From: Atchley, John [mailto:John.Atchley@f...] > Sent: Friday, February 01, 2002 12:05 PM > To: xml-dev@l... > Subject: What am I overlooking...? > > > Has anyone used XSV successfully? It appears to be treating > namespace URIs > as URLs, and ignoring Schema-instance extensions, or am I > just even stupider > than I look? > > Here's the header of my instance document: > > <?xml version="1.0" encoding="UTF-8"?> > <mydoc > xmlns="http://notarealurl.com/sourcedata/2002_01_31" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://notarealurl.com/sourcedata/2002_01_31 > file:gensrcschema.xsd"> > > The file gensrcschema.xsd exists in the same folder as my > instance document. > > Here's the output from XSV: > > <?xml version='1.0'?> > <xsv docElt='{http://notarealurl.com/sourcedata/2002_01_31}mydoc' > instanceAssessed='true' instanceErrors='0' nsURIDeref='success' > schemaErrors='0' schemaLocs='' target='file:/C:/Program > Files/XSV/testschema.xml' validation='lax' version='XSV 1.173/1.80 of > 2000/10/18 15:54:58' xmlns='http://www.w3.org/2000/05/xsv'> > <importAttempt URI='http://notarealurl.com/sourcedata/2002_01_31' > namespace='http://notarealurl.com/sourcedata/2002_01_31' > outcome='failure'/> > <notASchema filename='http://notarealurl.com/sourcedata/2002_01_31'/> > <XMLMessages> > Error: can't find address for host "notarealurl.com" in http URL > "http://notarealurl.com/sourcedata/2002_01_31" > </XMLMessages> > </xsv> > > My understanding is that > "xmlns=http://notarealurl.com/sourcdata/2002_01_31" > should _never_ be interpretted by an XML parser as a > reference to an object > but merely as an URI, even in the absence of > xsi:schemaLocation. However, > as you can see from the above error output XSV is saying that > it is "not a > schema filename." > > So, what gives? Is my understanding of URIs completely > faulty, or is XSV > doing a no-no here? > > If I haven't made an error, and XSV is mucked up, where does > one find a > (preferably free) W3C schema validator that is actually conformant and > useful? > > John Atchley > Senior Software Analyst > Engineering and Design, Courseware Support > FlightSafety International, Inc. > mailto:John.Atchley@F... > > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl> > >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








