|
From: Egon W. <e.w...@sc...> - 2006-03-08 20:09:40
|
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) 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 |