From: <obo...@go...> - 2011-09-27 01:08:40
|
Comment #1 on issue 54 by cmung...@gmail.com: OBO format parser has problems with a comma in xref http://code.google.com/p/oboformat/issues/detail?id=54 Currently the spec does not prohibit this. However, allowing commas in xrefs is problematic as commas are used as separators in XrefLists. The current OE behavior is to accept unescaped commas for the xref tag, and to escape these by default when outputting. However, when you don't escape commans in XrefLists you get nonsense. E.g. def: "foo" [X:1,2,3, X:1,2,4] is translated to def: "foo" [:2, :3, :4, X:1] which is not unreasonable (garbage in, garbage out). The simplest thing that is compatible with existing behavior is to allow commas in solitary xrefs, but to disallow them in a XrefList. I have updated the spec. The XrefLists section now distinguishes between xrefs occurring in solitary and list contexts. I also added 8.1.4 in the informative recommendations section, stating that commas should (not must) be escaped in the solitary context. Next step: change the parser to allow commas in solitary context. |