OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] What am I overlooking...?

[ Lists Home | Date Index | Thread Index ]


Thanks Priscilla!  I found a newer version of XSV and that fixed the
problem.  Interestingly, it's still reporting the same error message at the
end of the run, even though it is obviously now finding and using the schema
file.  Oh well, at least we're making progress ;-)

John Atchley
Senior Software Analyst
Engineering and Design, Courseware Support
FlightSafety International, Inc.
mailto:John.Atchley@FlightSafety.com


-----Original Message-----
From: Priscilla Walmsley [mailto:priscilla@walmsley.com]
Sent: Saturday, February 02, 2002 9:46 AM
To: 'Atchley, John'; xml-dev@lists.xml.org
Subject: RE: [xml-dev] 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@walmsley.com
Vitria Technology                            http://www.vitria.com
Author, Definitive XML Schema                  (Prentice Hall PTR)
------------------------------------------------------------------

> -----Original Message-----
> From: Atchley, John [mailto:John.Atchley@flightsafety.com]
> Sent: Friday, February 01, 2002 12:05 PM
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] 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@FlightSafety.com
>
>
>
> -----------------------------------------------------------------
> 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>
>
>




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS