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

Re: validate .xml against .xsd

From: Ian Stokes-Rees <ijs@decisionsoft.com>
Date: Thu, 29 Nov 2001 09:23:04 +0000
To: Tom Preston <tpreston@amadeusboston.com>
Cc: xmlschema-dev@w3.org
Message-ID: <20011129092256.A2178@decisionsoft.com>
Try coping the examples from the XSDL primer.  Copy the .xml and .xsd
files onto your local system and then validate the xml with XSV (you may
need to change "schemaLocation" to point to a local file rather than a
URL).  This will show you that XSV does work.

The likely problems are:
mismatches in namespace,
incorrect use of elementFormDefault,
mismatches in schemaLocation.
incorrect use of xmlns="..." (default namespace)
incorrect specification of XSDL namespace
    (should be: http://www.w3.org/2001/XMLSchema)
incorrect specification of XSI namespace
    (should be: http://www.w3.org/2001/XMLSchema-instance)

Regards,

Ian.

On Wed, Nov 28, 2001 at 05:08:32PM -0500, Tom Preston wrote:
> I would like to validate a .xml file against a valid .xsd file.  What tools
> are recommended for this purpose.  I have tried XSV and it will validate
> that the xml is well formed, but it does not complain if the xml breaks
> constraints of the xsd.  Maybe I am running it wrong, but I have tried
> everything that I can find.  Always see validation='lax' in the output.  Is
> this the problem.  How can I make it strictly validate?  Any help on this
> would be appreciated.
> 
> 

-- 
Ian Stokes-Rees, Client Services      DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com
Received on Thursday, 29 November 2001 04:23:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:35 GMT