araskind / jmzml

Automatically exported from code.google.com/p/jmzml
0 stars 0 forks source link

Ids mapped to String type not NCName #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
While developing jmzquantml, we noticed that ID and IDREF have to be of type: 
NCName http://books.xmlschemata.org/relaxng/ch19-77215.html, which places some 
restrictions on strings.

I think they cannot contain colons and they cannot start with an integer. We 
should (perhaps) build an ID checker into jmzml and jmzquantml e.g. 
http://www.jarvana.com/jarvana/view/axis/axis/1.4/axis-1.4-sources.jar!/org/apac
he/axis/types/NCName.java?format=ok

otherwise we could create invalid XML files using the APIs. This is not so 
unlikely, given that someone might create an ID containing colons.

This is not a problem for mzIdentML that uses key, keyref on Strings.

cheers
Andy

Original issue reported on code.google.com by andrewro...@googlemail.com on 6 Jul 2012 at 12:45