Re: latex bibliographies with multiple databases

Markus Hoenicka <[email protected]>
Newsgroups gmane.text.refdb.devel
Message-ID <[email protected]>
David Nebauer <[email protected]> was heard to say:

> I'm afraid the current scheme is unusable.  It is possible for citation
> keys to contains hyphens -- in fact, the default key for a hyphenated
> author surname contains a hyphen.  Try using a hyphenated citation key
> and watch the fun.  Even better, combine a database name with the
> hyphenated citation key -- that introduces another hyphen.  Even more fun.
>

That's why the code does not rely on the hyphen as a separator, but on the
sequences "ID" and "-ID", which are checked for in this particular order from
left to right. Unless  a citation is malformed, you can have as many hyphens or
even "-ID" sequences in your citation keys as you like:

\cite{IDMILLER-IDRUM-2005}
      **
\cite{dbname-IDMILLER-IDRUM-2005}
            ***

The '*' mark the database name prefix separator in both cases. Unless I'm dense
this is foolproof as far as citation keys are concerned. Trouble may arise when
you use database names like "IDBASE" or "DATA-IDBASE". RefDB would have to
reject these names in order to avoid trouble.

> refdb allows you to create databases whose names contain hyphens.  I
> haven't tried including a hyphenated database with a hyphenated citation
> key in the one citation -- I'm too scared.  Interestingly, while I can
> create a database with a hyphenated name I can't delete it (at least
> with an sqlite backend) -- the deletedb operation fails.

I'll have to investigate this. SQLite databases are deleted on the filesystem
level by using an unlink() system call - I can't imagine why that would fail
with a hyphen in the filename.

>
> IIRC, it is illegal to include colons in citation keys.  I seem to
> recall they are automatically stripped out.  It is currently possible to
> include hyphens in database names.  But, if you made it illegal to
> include a hyphen in a database name that gives you a ready-made
> delimiter to use in citations.
>

Yes, colons are not allowed in IDREF attributes (xref linkend). And yes, refdbd
indeed strips out colons in citation keys to avoid creating invalid output.

The remainder of your suggestion is less clear to me. If I understand correctly,
you suggest to use the hyphen under the assumption that database names never
have hyphens (this could indeed be enforced). But how do you distinguish
between a citation key prefixed with a database name and a sole citation key
containing a hyphen? As in:

dbname-citekey
cite-key

regards,
Markus

-- 
Markus Hoenicka
[email protected]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.