[ome-devel] OME-XML validation

Ilya Goldberg igg at nih.gov
Mon Apr 25 16:08:11 BST 2005


On Apr 18, 2005, at 2:59 PM, Josiah Johnston wrote:

> Your first problem is the schema validator. The one you use doesn't  
> work so well. Try this one instead:
> 	http://www.w3.org/2001/03/webdata/xsv
>
> Two errors remain with the working validator:
> 1) CustomAttributes isn't using a namespace (i.e. <CustomAttributes>  
> should be <CA:CustomAttributes>). I logged this as bug 493  
> <http://bugs.openmicroscopy.org.uk/show_bug.cgi?id=493>

Since there is technically no governing schema to cover  
CustomAttributes, I changed the validation instructions to "skip" from  
"strict".  This eliminated these types of processing errors.  This  
change should propagate sometime tonight.  Sample.ome now validates  
properly.

> 2) OTF's <Bin:External> needs to be wrapped in a <Bin:BinaryFile>
>
> file:/usr/local/XSV/xsvlog/tmpH4XNxmuploaded:101:4: Invalid per  
> cvc-complex-type.1.2.4: element
> {http://www.openmicroscopy.org/XMLschemas/BinaryFile/RC1/ 
> BinaryFile.xsd}:External not allowed here (3) in element
> {http://www.openmicroscopy.org/XMLschemas/OME/FC/ome.xsd}:OTF,  
> expecting
> [{http://www.openmicroscopy.org/XMLschemas/BinaryFile/RC1/ 
> BinaryFile.xsd}:

I think this still needs to be fixed - haven't looked into this.


> Once those problems were addressed, two more problems came up:
> 1) There are some issues with the #wildcard datatype that  
> CustomAttributes uses. I don't fully understand this.
> file:/usr/local/XSV/xsvlog/tmpcFUTUZuploaded:55:3: Invalid per  
> cvc-complex-type.1.2.4:
>     content of CA:CustomAttributes is not allowed to end here (1),  
> expecting [u'{Wildcard: ##any}']:

The wildcard specification wasn't quite correct in the CA schema.  It  
should work now.

> 2) The BinaryFile schema (OME/src/xml/schemas/BinaryFile.xsd) had an  
> error. It was expecting an External element AND a BinData element. I  
> changed it from 'sequence' to 'choice', and committed to the main  
> branch. I think this should be committed to 2.4 as well, but want to  
> get the group's OK first. Is that OK with everyone?
> file:/usr/local/XSV/xsvlog/tmpyUXp9Luploaded:109:4: Invalid per  
> cvc-complex-type.1.2.4:
>     content of Bin:BinaryFile is not allowed to end here (2),  
> expecting  
> [u'{http://www.openmicroscopy.org/XMLschemas/BinaryFile/RC1/ 
> BinaryFile.xsd}:BinData']:

Changes to the main branch should propagate to the main schema (i.e.  
the "official" one on the web) every night.  Committing it to a branch  
won't really do anything.  Did you update documentation in OME-WEBSITE?

Its well nigh impossible second-guessing validation problems.  If there  
are documents that don't validate, please simplify them as much as  
possible and attach them to a bug report in Bugzilla.

The definitive XML Validator is http://www.w3.org/2001/03/webdata/xsv,  
though validation should pass in TurboXML as well.

-Ilya



More information about the ome-devel mailing list