Hi Charles,
Am 25.03.2011 00:19, schrieb Charles F. Munat:
I backed up to BaseX 6.5 and tried again and everything worked perfectly.
which version of BaseX did you use when the corruption happened? The 6.5.2-SNAPSHOT builds contained a severe storage bug that was fixed with version 6.6.
I had to switch to a back-up copy. I then tried simply inserting the seminars one at a time. This didn't work either.
could you send me the backup so I can reproduce and hunt down the bug? That would definitely speed up the process.
Have I done something dumb, or is there a problem here?
Looks like our fault, not yours.
BTW:
I wanted to add some new seminars to this list. I was working from a spreadsheet, which I converted to tab-separated values and then used regular expressions to rewrite each line as a <seminar/> element.
We provide a quite convenient CSV parser [1], it can be easily configured to read tab-separated files, too.
I don't know to do multiple replaces in a single query
You can simply separate the update statements by commas, building a sequence:
let $node-to-modify := //node[@id eq 42] return ( rename node $node-to-modify as 'foo', insert node attribute bar { '21' } into $node-to-modify, delete node $node-to-modify/@useless-attribute )
Using that technique you can easily restructure your database completely within one query.
Hope this helps, cheers Leo __________ [1] http://docs.basex.org/wiki/Parsers#CSV_Parser