Hi,
We are using CML in our project (ChEBI) but when we try to use the CML schema to validate - we get validation errors in the CML schema itself.
CML Schema we are pointing to:
http://cml.sourceforge.net/schema/cmlCore.xsd
The problem seems to be the restriction pattern used in the formulaType:
<xsd:restriction base="xsd:string">
<xsd:pattern value="\s*([A-Z][a-z]?\s+[1-9][0-9]*)(\s+[A-Z][a-z]?\s+[1-9][0-9]*)*(\s+[-|+]?[0-9]+)?\s*"/>
</xsd:restriction>
I am using XMLSpy for this and it complains about:
invalid:pattern: is not a valid XML regular expression.
We have also tried with JAXB (Java parser) and got similar problems.
Though if we try with the w3 web validator, we don't get any errors.
http://www.w3.org/2001/03/webdata/xsv
Any ideas why we get these validation errors and how we can prevent them?
Cheers,
Paula
Logged In: NO
Thanks for reporting this.
We use Xerces and don't get errors. My guess is that Java (at least in JAXB) may not escape the backslashes correctly. Are you able to change the expression so that the other parsers can accept it? Also suggest that you mail it to the CML list.
PeterMR