- From: Martin Gudgin <marting@develop.com>
- Date: Tue, 10 Oct 2000 16:33:58 +0100
- To: "Michael Burns" <Michael.Burns@sas.com>
- Cc: <xmlschema-dev@w3.org>
- Message-ID: <00de01c032cf$85dc24b0$21c7010a@greyarea>
test new sig from mac outlookMichael, XSV is the 'latest and greatest'. The version that supports the 22nd Sept WD is at[1] ( the W3C is having some mirroring problems at the moment so you may have some trouble getting that URL to resolve ) Can you post your instance and schema? ( you can e-mail them to me or send me URLs ) The reason XSV is not complaining is because it's doing LAX validation. ( the line that says 'No declaration for document root found, validation was lax'is the clue here ). I'm guessing that you don't have a global element declaration in the schema for the document element in your instance. If I can see the schema and instance I should be able to give more explicit help... Regards Martin Gudgin DevelopMentor [1] http://www.w3.org/2000/09/webdata/xsv P.S. Cool sig... ----- Original Message ----- From: Michael Burns To: 'xmlschema-dev@w3.org' Sent: Monday, October 09, 2000 11:19 PM Subject: Trying to validate a sample xml file against a schema I am develo ping. I am new to this list, but spent quite a bit of time reading and trying things out today, so hopefully this is not a newby or RTFM question: Question: What is the best tool to use to validate an xml file and schema pair? I have tried the xerces DOM parser, XML Instance from TIBCO (Extensiblity), the xmlnorm program that is part of ltxml and the web based XSV. None of them seems to match the primer examples very well. Background: I am developing a tool to build a schema according to the latest draft standard: http://www.w3.org/TR/2000/WD-xmlschema-0-20000922/ I have made quite a bit of progress using the xerces parser with it's validation turned on. It is now complaining about something in my schema (which I am not free to share with you, Sorry). So, I started cutting and pasting samples from the primer to see if it complained about the examples from the primer too. Sure enough it does. So, I was pursuing other validation tools. I downloaded the ltxml-1.2 tools that were recently posted. Got those built ok. :-) Then I tried xmlnorm -sxV on the problematic xml file but it said: Warning: Document has no DTD, validating abandoned. I will pursue looking into the sources for the xmlnorm and see if there are some parser options I have to turn on to enable schema based validation. Any clues?? In the mean time I tried out your web based validator (I guess this is what people are calling XSV on the list): http://www.w3.org/2000/09/webdata/xsv It says: Schema validating with XSV 1.166/1.77 of 2000/09/28 15:54:50 a.. Target: file:/export/home/ht/xsvlog/@15848.4uploaded (Real name: C:\ModelCompilerTestPen\doc\MOresult.xml) b.. docElt: {None}objects c.. No declaration for document root found, validation was lax d.. schemaLocs: e.. The schema(s) used for schema-validation had no errors f.. instanceAssessed: true g.. No schema-validity problems were found in the target Which initially led me to believe that my schema was really OK. However, when I intentionally screwed up the schema It did not complain at all. When I changed an element tag in my xml file so that it was not found in the schema, it still did not complain. I tried some other samples of valid xml and xsd such as the one that comes as a sample with xerces. personal-schema.xml and personal.xsd I changed an element tag 'person' to 'persona' and now the xerces parser complains: [Error] personal-schema.xml:5:27: Element type "persona" must be declared. [Error] personal-schema.xml:5:27: Attribute "id" must be declared for element type "persona". [Error] personal-schema.xml:41:14: The content of element type "personnel" must match "(##any:uri=)+". [Error] personal-schema.xml:41:14: An element with the identifier "Big.Boss" must appear in the document. personal-schema.xml: 2423 ms (37 elems, 19 attrs, 122 spaces, 146 chars) But XSV does not complain at all: Schema validating with XSV 1.166/1.77 of 2000/09/28 15:54:50 a.. Target: file:/export/home/ht/xsvlog/@15856.4uploaded (Real name: C:\sasmkb\xml\parsers\xerces-1_2_0\data\personal-schema.xml) b.. docElt: {None}personnel c.. No declaration for document root found, validation was lax d.. schemaLocs: e.. The schema(s) used for schema-validation had no errors f.. instanceAssessed: true g.. No schema-validity problems were found in the target ------------------------------------------------------------------------------ -------------------------------------------------------------------------------------------- Michael Burns email: Michael.Burns@sas.com Principal Systems Developer home: mburns@bga.com Metadata Integration Technology voice: (512)258-5171x3264 SAS Institute, Inc. fax: (512)258-3906 11920 Wilson Parke Ave. www: http://www.realtime.net/~mburns Austin, TX 78726-4052 sww: http://sww.sas.com/~sasmkb "choose for yourselves today whom you will serve;... but as for me and my house, we will serve the Lord." Joshua 24:15
Received on Tuesday, 10 October 2000 12:02:07 UTC