- From: Bijan Parsia <bparsia@cs.man.ac.uk>
- Date: Wed, 22 Jul 2009 19:45:10 +0100
- To: Antoine Zimmermann <antoine.zimmermann@deri.org>
- Cc: 'W3C OWL Working Group' <public-owl-wg@w3.org>
On 22 Jul 2009, at 17:52, Antoine Zimmermann wrote: > Bijan, > > Bijan Parsia wrote: >> On 22 Jul 2009, at 17:01, Antoine Zimmermann wrote: >>> Dear working group fellows, >>> >>> I've been pointed to an issue wrt the XML schema of the OWL/XML >>> syntax. >>> First, the XSD file is enclosed by <pre> ... </pre> which breaks >>> its validity. >> Yeah, a known problem. >>> Second, the example XML ontology in the spec [2] is not validated >>> against the schema (without <pre> ... </pre>). >> It is valid, but there's another issue with the "live from wiki" >> version...it entities all the ampersand, e.g., >> <!ENTITY PN_CHARS_U "&PN_CHARS_BASE;|_"> >> Which, obviously, breaks that use of entities. > > Thanks. Why can't we just edit the file at w3.org? The problem > seems very easy to fix. Hysterical raisons. Basically, wikiexperimentation and I believe we decided to wait until the next round to fix this once and for all. >> If you cut and paste the text of the schema as it's rendered in a >> browser, it works fine and it validates the example. >> For your convenience, I've put a clean, working copy of the schema >> here: >> http://www.cs.man.ac.uk/~bparsia/owl/owlxml.xsd >> and here's the spec example with schemaLocation pointing to the >> clean schema: >> http://www.cs.man.ac.uk/~bparsia/owl/specExample.xml > > It works, but one validator [1] is still not happy with you input. I don't find that one prima facie reliable. E.g., if I put the schema into the bottom box, I get: Schema Error: System.Xml.Schema.XmlSchemaException: The targetNamespace parameter '' should be the same value as the targetNamespace 'http://www.w3.org/2002/07/owl#' of the schema. ... Inconsistent results depending on whether it's downloading from my site or pulling it from a text box does not leave me filled with confidence :) > [1] http://www.xmlme.com/Validator.aspx 1) I test with oXygen, generally. Saxon is the validator. 2) It works with: http://tools.decisionsoft.com/schemaValidate/ (Don't know what the engine is.) 3) And with: http://validate.openlaboratory.net/schema/ (Xerces C++) Some others crap out in weird ways (stay away from ones aiming for XHTML or known vocabs...they don't even valdiate the schema). I can't even load the w3c's page: http://www.w3.org/2001/03/webdata/xsv 4) Works with schematools: http://www.brics.dk/schematools/ java -jar schematools-all.jar -idocument specExample.xml -sxsd owlxml.xsd 0 validity errors detected. [Validation time: 66859 ms] (All this makes me realize I should get as many schema engines into my oxygen set up as possible. It makes this soooooo much easier. I think that on a windows machine, you'd get several more for free, e.g., xsv and .NET ones.) 5) Sun's msv: java -jar msv-20081113/msv.jar owlxml.xsd specExample.xml start parsing a grammar. warnings are found. use -warning switch to see all warnings. validating specExample.xml the document is valid. (I'm investigating the warnings, but they don't seem material.) 6) xmlstarlet which uses libxml2 I think. xml val -s owlxml.xsd -e specExample.xml specExample.xml - valid I had someone with windows try XML Notepad and it barfed on the pattern (I think it's using MSXML but I don't know what version). So, at least 5 distinct engines agree (saxon, xerces c++, schematools, msv, and libxml2). Whew! Good to know :) Cheers, Bijan.
Received on Wednesday, 22 July 2009 18:40:57 UTC