Hi Romano, Actually the order of attributes does matter.
This is because, while we use a proper XML parser to load the file, the validation of attributes is done one at a time as they are encountered, to simplify things -- in the case of backgrounds, we need to know early on whether this'll be a PDF style background or a solid plain page background in order to parse the relevant attributes -- or rather we don't absolutely need to, but the code currently assumes that we receive things in the right order. This makes generating xournal-valid XML harder unfortunately, and could perhaps be changed in the future but it's not really high priority for me. So: try to doing things so the order of attributes doesn't change. The order of attributes is as indicated in http://xournal.sourceforge.net/manual.html#file-format I think, or in any case it's the order found in any xoj file. Sorry to be complicating your life! Best, Denis On 03/25/2015 03:45 AM, Romano Gtti wrote: > Hi, > > I was trying to manipulate the .xoj XML code with a python program, to > implement a simple annotated file switch. I just did a minimal change, > but it seems that the code I generated is not accepted by xournal any more. > > All the files cited in this mail are available here: > https://dl.dropboxusercontent.com/u/57662186/xojxml.tar.gz > > The problem is that I just changed a number from "original" to > "modified" (in the background element); now "modified" is not accepted > by Xournal. The only thing that changed is the order of attributes in > the elements, but I suppose that should not matter... So, what am I > doing wrong? > > Thanks! > Romano > > -- Denis Auroux UC Berkeley, Department of Mathematics 817 Evans Hall, Berkeley CA 94720-3840, USA aur...@math.berkeley.edu ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel