[Refdb-users] nitpicking (element ordering in risx)
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mar...@mh...> - 2003-11-21 23:08:38
|
Hi Bruce, Bruce D'Arcus writes: > I've been working on some input templates for risx for emacs. The idea > is to make entering data much easier than it currently is, since ris is > a rather abstract data model. So, for each variable, the user is > prompted for the input with unambiguous prompts: "book title" and so > forth. > I am very sympathetic to this approach. > I have templates now for chapters and articles, and will do another for > book. In doing so, however, I'm struck by some somewhat unintuitive > element ordering in the risx DTD. Below's the instance: > > What is odd for me: > > 1) lastname before first > > 2) city before publisher > What would then be intuitive? It wouldn't be a big deal to change the order. > Anyone out there with lisp experience interested in a menu item to load > these records from the buffer directly into refdb? > This would be sweet. For the time being, I was thrilled enough to tinker a little with Emacs, trying to find out whether you could do the same with built-in functions. A menu (and key bindings) would be so much better, but right now you can do the following: Generally it is a good idea to run refdbc inside a shell buffer (M-x shell). It is best to avoid a pager and send the output to stdout instead. Whatever you retrieve with e.g. getref is editable text. If you want to import refdbc output into a new buffer, run something like: M-! refdbc -d dbname -t ris -C getref :ID:=1 Remember that if you run M-! again, you can use the argument history (up arrow) to walk through the previous calls which saves a lot of typing. You may then select a suitable mode (M-x ris-mode or M-x psgml-mode or whatever you use to edit XML) if you need specific editing support. In order to send new or updated references from a buffer to refdb, mark the region (go to start of ref, press Ctrl-space, move cursor to end of ref). Then run something like: M-| refdbc -d dbname -C addref or M-| refdbc -d dbname -C updateref This will send the marked region as input to the addref or updateref commands. Use the -t risx switch if you deal with risx data. Keep in mind that the M-! and M-| commands won't give you a chance to enter a password. You have to set this in your cofiguration file or use no password. regards Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |