Re: Trying to prove a schema works, by breaking it..

The crucial thing to look out for in the output from XSV is the third
bullet. It currently reads;

    No declaration for document root found, validation was lax

This usually means that the validator wasn't able to find a schema for the
namespace that your instance uses ( as David Cleary suggests this may be due
to invalid nsuri in your xsd file )

When it finds a schema it can use against the instance you will get
something that says 'Validation was strict'.

Hope this helps,

Martin Gudgin
DevelopMentor

----- Original Message -----
From: "Ian Stuart" <Ian.Stuart@ed.ac.uk>
To: "XML-Schema-dev" <xmlschema-dev@w3.org>
Sent: Wednesday, September 19, 2001 5:03 PM
Subject: Trying to prove a schema works, by breaking it..


> Afternoon folks,
>
> I have written a schema
> (http://eildon.ucs.ed.ac.uk:1964/Zblsa/zblsa.xsd) to define data (of
> which http://eildon.ucs.ed.ac.uk:1964/zblsa.return.4.xml is an example)
>
> This setup passes the W3C validator (version 20010502, at
> http://www.w3.org/2001/03/webdata/xsv), however I want to extend my
> [shakey] grasp of schemas by the method of test-by-breaking - whereby I
> include extra elements, or incorrectly composed elements, and confirm
> the results are what I predict.
>
> My problem is that I can add a new element (not defined in the schema),
> or miss out a required element - and it still passes.
>
> Can anyone explain why adding an undefined element does not break my
> schema? or why missing a required chunk of data passes the validator
> test?
>
> Many thanks
> --
>
> --==++
> Ian (slightly confused) Stuart
> I build things: computer programs (with code); or cars (with metal)
>

Received on Wednesday, 19 September 2001 16:04:39 UTC