|
From: peter murray-r. <pm...@ca...> - 2006-03-08 21:49:19
|
At 20:09 08/03/2006, Egon Willighagen wrote: >On Tuesday 07 March 2006 14:35, peter murray-rust wrote: > > At 12:52 07/03/2006, Egon Willighagen wrote: > > > > Namespaces are a problem since we haven't been very consistent in > > > > CML. The current suggestion is that we always use > > > > "http://www.xml-cml.org/schema". What we could then do is strip off > > > > all other old CML namespaces at start of parse and replace by this one. > > > > > >Yes, stripping might be a good idea. At least they have the above in > > > common. > > > > I have had quite a lot of discussion on the XOM list about namespaces > > - they are not trivial. So my current idea is: > > - read in a potential CML file. > > - does if have namespace http://www.xml-cml.org/schema on the root > > - if not use heuristics to judge whether it is a CML file (if there > > is an obsolete CML namespace on root? or whether all elements have > > local names in CML. Then strip old CML namespaces and replace by current > > one. > >This is the error I now have... the CML goes to the builder as plain text. It >looks good: > >CML source for entry: ><cml:molecule xmlns:cml="http://www.xml-cml.org/schema"> ><cml:atomArray atomID="a1 a2 a3 a4" elementType="C C O O" formalCharge="0 0 0 >0" /> ><cml:bondArray atomRef1="a1 a2 a2" atomRef2="a2 a3 a4" order="1 2 1" /> ></cml:molecule> >General error with resourceString from: null >java.lang.ClassCastException: nu.xom.Element > at >net.bioclipse.model.FeedEntryResource.parseResource(FeedEntryResource.java:109) I have cut and pasted your example into: schema23/examples/complex/arrays.xml and run it through ExamplesTest in JUMBO5.1 and got: Error: URI=file:C:/pmr/schema23/examples/complex/arrays.xml Line=1: cvc-elt.1: Cannot find the declaration of element 'cml:molecule'. (this is a Xerces message). So there is clearly a problem and I'm completely mystified! I shall now have to hack it! Thanks - keep the bugs coming. P. >Egon > >-- >e.w...@sc... >PhD student on Molecular Representation in Chemometrics >Radboud University Nijmegen >Blog: http://chem-bla-ics.blogspot.com/ >http://www.cac.science.ru.nl/people/egonw/ >GPG: 1024D/D6336BA6 > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >cml-discuss mailing list >cml...@li... >https://lists.sourceforge.net/lists/listinfo/cml-discuss Peter Murray-Rust Unilever Centre for Molecular Sciences Informatics University of Cambridge, Lensfield Road, Cambridge CB2 1EW, UK +44-1223-763069 |