Dear Gary,
Wayne has pretty much said what there is to say, but here is my bit:
Our first considerations have to be speed and memory - loading times and
memory footprint are problematical as is. Whatever we put in has to be
fast. We could not track line numbers, as the XML parser we use does not
do that. We could maybe track XML element number - we'll have a look. We
coudl also consider the error messages.
We have been making XML schemas until now, and we shall probably do that
for the new version as well. It wil not be soon, though, unless somebody
shows interest in having them. But as Wayne says the format (and certainly
the elements) can change without warning from one version to the next.
Besides, ven a fully correct XML file could easily contain illegal and
unreadable data. XML schemas simply cannot contain all the constraints on
the data that we have in our model. The sensible way to read and write
CCPN data is to read to or write from a CCPN project in memory. APIs and
their documentation are on SourceForge, and will still be there if CCPN
disappears.
Yours,
Rasmus
---------------------------------------------------------------------------
Dr. Rasmus H. Fogh Email: [log in to unmask]
Dept. of Biochemistry, University of Cambridge,
80 Tennis Court Road, Cambridge CB2 1GA, UK. FAX (01223)766002
On Sun, 28 Oct 2007, Gary Thompson wrote:
> Dear All
>
> We have another old project which refuses to load (as an side we definitley
> regard opening old projects as 'a fraught execise'... we have a first time
> success rate of ~ 1/3 say) anyway here is the backtrace
>
> last xml element read:
> </dataLocation>
>
>
> parser state was:
> reading
>
> ERROR loading xml ccp.nmr.Nmr ccp/Nmr.xml
> Traceback (most recent call last):
> File
> "/home/garyt/programs/ccpnmr/1.0.12/ccpnmr1.0/python/ccpnmr/analysis/AnalysisGui.py",
> line 217, in ?
> main(filename, max_size, glDirect)
> File
> "/home/garyt/programs/ccpnmr/1.0.12/ccpnmr1.0/python/ccpnmr/analysis/AnalysisGui.py",
> line 110, in main
> top.initProject(project)
> File
> "/home/garyt/programs/ccpnmr/1.0.12/ccpnmr1.0/python/ccpnmr/analysis/AnalysisPopup.py",
> line 929, in initProject
> Analysis.initProject(self, project)
> File
> "/home/garyt/programs/ccpnmr/1.0.12/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py",
> line 405, in initProject
> self.initTopObjects(project)
> File
> "/home/garyt/programs/ccpnmr/1.0.12/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py",
> line 195, in initTopObjects
> if not project.currentNmrProject:
> File
> "/home/garyt/programs/ccpnmr/1.0.12/temporaryReleaseDir/ccpnmr/ccpnmr1.0/python/memops/api/Implementation.py",
> line 18782, in getCurrentNmrProject
> File
> "/home/garyt/programs/ccpnmr/1.0.12/temporaryReleaseDir/ccpnmr/ccpnmr1.0/python/memops/api/Implementation.py",
> line 13173, in findFirstNmrProject
> File
> "/home/garyt/programs/ccpnmr/1.0.12/temporaryReleaseDir/ccpnmr/ccpnmr1.0/python/memops/api/Implementation.py",
> line 9066, in load
> File
> "/home/garyt/programs/ccpnmr/1.0.12/temporaryReleaseDir/ccpnmr/ccpnmr1.0/python/ccp/xml/nmr/Nmr.py",
> line 114, in load
> File
> "/home/garyt/programs/ccpnmr/1.0.12/temporaryReleaseDir/ccpnmr/ccpnmr1.0/python/memops/format/xml/XmlIO.py",
> line 425, in load
> File
> "/home/garyt/programs/ccpnmr/1.0.12/temporaryReleaseDir/ccpnmr/ccpnmr1.0/python/memops/format/xml/XmlIO.py",
> line 741, in doLoad
> memops.general.Implementation.ApiError: Error loading fileNo DataLocation
> object found from key:
> [42]
>
> regards
> gary
>
> as an aside the information here is not the most helpful I have seen (I know
> its hard ;-) I have seen far worse and from commercial applications at
> that), specifically
>
> 1. there is no indication of the line number which caused the error, though
> the file is listed which is good
> 2. the last read xml element provides little context if there are lots of
> these elements (there are 34 dataLocation elements in my Nmr.xml)
> 3. the message Error loading fileNo DataLocation object found from key:
> [42] is pretty cryptic and provides little information on what the parser
> was doing when it gaveup
> 4. would it be possible to provide a verbose mode that provided output on
> the console as elements are read?
> 5. will there at some point be a rigorous definition of what the ccpnmr xml
> format is? Say god forbid that ccpn didn't get renewed next time round what
> would other implimentors use to create back compatible implimentations?
>
|