[Refdb-users] refdb & '&'
Status: Beta
Brought to you by:
mhoenicka
|
From: Markus H. <mar...@mh...> - 2004-02-15 23:01:10
|
Matt Price writes: > Hey Markus: > > a couple notes: > > I may have overstated my problems with refdb earlier. I think my > 'addnote' issues don't actually require rebuilding the database, but > rather, just restarting refdbd. obviously that's way less drastic. > I could track down the problem with the help of your logs. I can't explain why in your case restarting refdbd got you around the problem (it can't, if I understand my code correctly :-). In any case, no one wouldn't want to restart an app anyway. I think I've fixed the problem. In brief, adding a dataset or a note involves creating a temporary citation key if the dataset doesn't specify one. If there is a problem with a dataset and it is not removed properly from the database again, this citation key may block the next addnote/addref command as it has to be unique. That is, this problem occurred only with a database engine that does not use transactions, only with datasets that cause a parse error (see below), and only with datasets that don't specify a citation key. I've fixed the code that removes partial datasets if you can't do a rollback, and I've also fixed a bug that swallowed the error message of the XML parser. It now returns for your dataset: refdbc: addnote ../pseudotest/data/xnoteset.xml server error: Parse error at line 50: not well-formed (invalid token) Now it should be pretty clear what's going on. > As for the note, the stumbling block seems to be the presence of the > character '&'. Do you know why this would be? being quite ignorant > of almost all the technologies involved here, I'm not sure what the > issue is. > Yep. The ampersand is one of the reserved characters in XML (others would be < and >). In order to use a literal ampersand in an XML document, use the entity "&" instead. Same with "<" and ">" for < and >, respectively. Thanks again for helping me spot this bug. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |