GNOME Bugzilla – Bug 557351
Proposing XML schema for Tomboy
Last modified: 2017-07-31 12:45:31 UTC
I wrote an XML schema to validate tomboy's XML notes. Having this and testing against it before releases will allow more interoperability with other 3rd party applications that want to use Tomboy's notes. I did this as a part of the (upcoming) Tomdroid project[1]. As part of my tests, I'll make sure I read and write XML that is valid against that schema. I also saw the PHP Web front-end that could use that also. I started using the documentation here[2] as a base and then created test cases covering all the formatting options (I think). I encourage people to give it a look. The RELAX-NG Compact format makes it very easy to read and understand. Note: It's my first XML schema so be kind. The ultimate goal of this bug is to have it included in Tomboy's trunk and maintained as the file format changes. What do you think? Please comment. For now its hosted at tomdroid's launchpad: http://bazaar.launchpad.net/~olivier-bottomlesspit/tomdroid/main/files/8?file_id=xmlschema-20081021214531-riepjheydl0ejrkx-1 [1]: http://launchpad.net/tomdroid [2]: http://live.gnome.org/Tomboy/NoteXmlFormat
Created attachment 121084 [details] Tomboy XML schema for v.0.3 notes (RELAX-NG Compact)
Created attachment 121085 [details] The whole thing v.0.1 This is the whole thing: - Simple test case - Complete test case with all (AFAIK) formatting options (even some nesting) - Some doc on how I tested - the RELAX-NG Compact - the generated RELAX-NG XML used to test
Created attachment 141526 [details] [review] Some additions to make the schema pass in my note directory I added some stuff to the .rng. I know I should be editing the .rnc instead...just didn't get to it yet.
What is the next step on this? Does this mean that all notes need to be migrated to a new format or does this just insure that the notes are in a correct format.
This isn't a new note format, it's just a schema for our existing format. I think somebody just needs to update the .rnc file, regenerate the .rng file, double-check that it works on a large note collection, and upload it to tomboy git.
Created attachment 190983 [details] updated RELAX-NG XML Schema This updated schema passes on all my notes (~100+). However I do not use any add-ins adding tags inline. For now it's very slack on validation. It validates mostly tags and not data formats. So it's really a draft at validating tomboy notes' XML. That said, I still think that an agreed upon schema validator hosted in tomboy's source would be a good thing. To run this schema against your own notes: download it, install xmllint then: $ xmllint ~/.local/share/tomboy/*.note --relaxng <the relax ng file> --noout Report any problems with the schema in this bug as comments.
Created attachment 190985 [details] The whole thing v.0.2 Includes a README with instructions, a simple note, complete sample notes, the relax-ng compact and the relax-ng xml. I recommend that this whole thing should be pushed to tomboy's repo (once proven valid on several users' notes). Also, I realize now that you might wanna drop the regression test notes from xml-schema/bug*/ or rename them to bug-lp*/ to avoid people looking up wrong b.g.o ids. In any case let me know what you'll do because I'll adjust my tomdroid repo likewise.
Review of attachment 141526 [details] [review]: accepted
The Tomboy team has moved from GNOME Bugzilla to GitHub for bug reports and feature requests: https://github.com/tomboy-notes/tomboy/issues/ Closing this report as NOTGNOME as part of Bugzilla Housekeeping (bug 781054) to keep tasks in one place. Please feel free to transfer this task to GitHub if this task is still valid in a recent Tomboy version. We are sorry for the inconvenience.