refdb-cvs Mailing List for RefDB (Page 45)
Status: Beta
Brought to you by:
mhoenicka
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(88) |
Feb
(50) |
Mar
(36) |
Apr
(9) |
May
(30) |
Jun
(30) |
Jul
(22) |
Aug
(16) |
Sep
(42) |
Oct
(18) |
Nov
(29) |
Dec
(23) |
2005 |
Jan
(18) |
Feb
(28) |
Mar
(21) |
Apr
(35) |
May
(62) |
Jun
(22) |
Jul
(5) |
Aug
(40) |
Sep
(98) |
Oct
(81) |
Nov
(51) |
Dec
(62) |
2006 |
Jan
(46) |
Feb
(36) |
Mar
(8) |
Apr
(16) |
May
(14) |
Jun
(16) |
Jul
(47) |
Aug
(60) |
Sep
(34) |
Oct
(16) |
Nov
(46) |
Dec
(11) |
2007 |
Jan
(16) |
Feb
(13) |
Mar
(58) |
Apr
(32) |
May
(4) |
Jun
(8) |
Jul
(31) |
Aug
(46) |
Sep
(22) |
Oct
(30) |
Nov
(58) |
Dec
(15) |
2008 |
Jan
(8) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(3) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(6) |
Nov
(3) |
Dec
(5) |
2009 |
Jan
(1) |
Feb
(20) |
Mar
(8) |
Apr
(5) |
May
(8) |
Jun
(3) |
Jul
(6) |
Aug
(4) |
Sep
(7) |
Oct
(8) |
Nov
(2) |
Dec
(1) |
2010 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
(5) |
Feb
(5) |
Mar
(13) |
Apr
(3) |
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
|
Dec
(3) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(13) |
2014 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(6) |
Sep
(3) |
Oct
|
Nov
(2) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
(9) |
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Markus H. <mho...@us...> - 2005-10-12 19:21:42
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17094 Added Files: Tag: Release_0_9_5_stable refdb-ms document-dtd-entities Log Message: moved over from makestyle module --- NEW FILE --- #!/usr/bin/perl =head1 NAME refdb-ms - RefDB MakeStyle, a bibliography style generator for RefDB =head1 Summary A utility to aid the generation of RefDB bibliography styles for RefDB <refdb.sourceforge.net>. =head1 Requirements One of the design goals for this utility was to minimise external dependencies. =over =item Refdb::Makestyle A custom module containing methods and attributes used by this script. Debian package: libperl-refdb-makestyle. =back =cut use strict; use RefDB::Makestyle; $ENV{'CLUI_DIR'} = "OFF"; my $ui = UI->new(); die "Fatal errors encountered.\n" if not $ui->startup_checks(); =head1 The program =head2 Style root The root element of the style, C<CiteStyle>, is a data member of the user-interface (C<ui>) object. All other elements of the style are children of the C<CiteStyle> element. =cut $ui->set_root( CiteStyle->new() ); =head2 Help system There is a series of help screens. See C<refdb-ms.pl> library for details. =cut print "RefDB MakeStyle -- generate bibliography styles for RefDB.\n"; $ui->help_system() if $ui->_input_confirm( "Do you require help?" ); =head2 Main entry loop This is the main part of the program -- where the style itself is created. It is short as most of the "work" is done by the C<refdb-ms.pl> library. =cut my ( $current_element , @choice , $child ) = ( $ui->get_root()->get_last_incomplete() ); $current_element->add_attributes(); $current_element->enter_value(); while ( 1 ) { # Get working element $current_element = $ui->get_root()->get_last_incomplete(); last if not defined $current_element; # style is complete # Add element attributes and content $current_element->add_attributes(); $current_element->enter_value(); # Provide feedback printf "\nProgress report:\n%s\n" , $ui->get_root()->show_progress(); printf "Current element: %s\n" , $current_element->get_name(); # Select next element/action @choice = $current_element->select_next_child(); # Delete element if user selected that option if ( @choice[1] eq "[DELETE]" ) { $ui->delete_selected_element(); next; } # If current element complete, skip next part next if not defined $choice[1]; # current element is complete printf "\n%s" , @choice[0]; # Add newly selected element to style $child = $ui->create_element( @choice[1] ); $current_element->add_child( $child ); } print "\nThe style is now complete.\n"; =head2 Write output The style is written to an C<xml> file. If the default name, E<lt>I<stylename>-style.xmlE<gt>, already exists, another is created. =cut $ui->write_style(); =head2 Write summary A summary of the style is written to an C<html> file. It is meant as an aide memoire when entering references. =cut $ui->write_summary(); =head2 Upload style The style can be uploaded to refdb. If a pre-existing style of the same name exists it is backed up to file before the new style is added. =cut $ui->upload_style(); printf "\nStyle \"%s\" has been created.\nIt has been saved to file <%s>.\nA summary of the style has been written to file <%s>.\n\nRefDB Makestyle is finished.\n" , $ui->get_root()->get_style_name() , $ui->get_style_file() , $ui->get_summary_file(); exit 0; =head1 AUTHOR David Nebauer, david E<lt>atE<gt> nebauer E<lt>dotE<gt> org =head1 COPYRIGHT AND LICENSE Copyright (C) 2004 by David Nebauer Distributed under the same license and conditions as the C<Refdb> project E<lt>L<http://refdb.sourceforge.net/>E<gt>. =cut --- NEW FILE --- #!/usr/bin/perl =head1 document-dtd-entities =head1 Summary Extracts from C<refdb-ms.pl> certain data elements associated with citestylex DTD entities (i.e., elements and attributes). This includes help and prompt text, default values and attribute enumerations. Output is written to an html file. =head1 Configuration =head3 Find 'refdb-ms.pl' This script must be able to find the perl library C<refdb-ms.pl>. Either run this script in the same directory as C<refdb-ms.pl> or make sure C<refdb-ms.pl> is in a directory included in perl's @INC array. To see the directories in the @INC array use the following command: perl -e "print join(\"\n\", @INC);" =head3 Output filename The output filename can be specified as an argument to C<document-dtd-entities>. If one is not supplied the default filename C<dtd-entities.html> is used. =head1 Running When running this program an object of each entity class is created in order to be queried for its properties. The object creation process usually requires no user input. There are three exceptions: TYPE - Type_PubType, ROLE - Role_UserDef and ROLE - Role_Misc. When these attributes are created you will be required to select a value from the enumeration list. Select any value -- it does not matter. =head1 Programmer notes I have broken a general object-oriented programming "rule" in this utility. I have directly accessed the attribute enumeration instead of using a "getter". There is a good reason: for three attributes (TYPE - Type_PubType, ROLE - Role_UserDef and ROLE - Role_Misc) the get->enumeration method returns an incomplete list. It omits those enumeration values already selected by existing attributes. =cut use strict; require "refdb-ms.pl"; # Print informational message print "In the process of extracting entity help each entity is created once.\nSome entities require user interaction.\nIt does not matter what values you enter/select when this occurs.\n-----------------------------------------\n"; # Get output filename my $file = shift; $file = ( $file ) ? $file : "dtd-entities.html"; # Set attribute and element lists my @attributes = qw/ Type_PubType Type_PageRange Style Role_AuthorList Role_PubDate Role_Title Role_UserDef Role_Misc DisplayAuthor MaxAuthor UpperCase InitialStyle NameOrder Sequence Format YearFormat MonthFormat PadLeadingZero DayFormat Case AlternateText DefaultText Punctuation BiblioSequence InTextSequence Threelet_Jan Threelet_Feb Threelet_Mar Threelet_Apr Threelet_May Threelet_Jun Threelet_Jul Threelet_Aug Threelet_Sep Threelet_Oct Threelet_Nov Threelet_Dec Abbrev_Jan Abbrev_Feb Abbrev_Mar Abbrev_Apr Abbrev_May Abbrev_Jun Abbrev_Jul Abbrev_Aug Abbrev_Sep Abbrev_Oct Abbrev_Nov Abbrev_Dec Full_Jan Full_Feb Full_Mar Full_Apr Full_May Full_Jun Full_Jul Full_Aug Full_Sep Full_Oct Full_Nov Full_Dec /; my @elements = qw/ StyleSet CiteStyle StyleName RefStyle PubType RefNumber Preceeding Following AuthorList AbbreviateFirst AbbreviateSubseq Aempty Asame AuthorSeps TwoSeps ThreeSeps ThreeSepsEach ThreeSepsLast AuthorNames NameFirst NameOther Text TextSingle TextMultiple PubDate FirstSep SecondSep Title JournalName Volume Issue Pages SinglePage PageRange RangeSeparator Publisher PubPlace Serial Address Url UserDef Misc Notes Abstract Separator CitStyle CitSeparator BiblioTitle InTextDef AuthorOnly YearOnly Months Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec /; # Start output file my $output = "<html>\n<head><title>'citestylex' DTD Entity Documentation</title></head>\n<body>\n<h1><i>citestylex</i> DTD Entity Documentation</h1>\n<h4>Source</h4>\n<p>Extracted from <<tt>refdb-ms.pl</tt>>.</p>\n"; # Extract attribute help $output .= "<h2>Attributes</h2>\n"; foreach ( @attributes ) { my ( $att , $enum_list ) = ( $_->new() , "" ); my ( $att_name , $att_class ) = ( $att->get_name() , $att->get_classname() ); $output .= sprintf "<h3>%s (%s)</h3>\n" , $att_name , $att_class; $output .= sprintf "<h4>Prompt</h4>\n<p>%s</p>\n" , $att->get_prompt(); if ( defined( $att->{enumeration} ) ) { foreach ( sort @{ $att->{enumeration} } ) { $enum_list .= $_ . " | "; } } if ( $enum_list =~ /|/ ) { $enum_list =~ /^(.*) \| $/; $enum_list = $1; } $enum_list = $enum_list ? $enum_list : "<i>[None]</i>"; $output .= sprintf "<h4>Enumeration</h4>\n<p>%s</p>\n" , $enum_list; $output .= sprintf "<h4>Default</h4>\n<p>%s</p>\n" , $att->get_default(); } # Extract element help $output .= "<hr><br>\n<h2>Elements</h2>\n"; foreach ( @elements ) { my $element = $_->new(); $output .= sprintf "<h3>%s</h3>\n" , $element->get_name(); $output .= sprintf "<h4>Prompt</h4>\n<p>%s</p>\n" , $element->get_prompt(); if ( $element->get_suggestion() ) { $output .= sprintf( "<h4>Suggested value</h4>\n<p>\"%s\"</p>\n" , $element->get_suggestion() ); } $output .= sprintf "<h4>Help</h4>\n<p>%s</p>\n" , $element->get_help(); } # Finish output $output .= "<hr>\n</body>\n</html>"; # Print to file open FILE , "> $file"; print FILE $output; close FILE; # Print informational message printf "-----------------------------------------\nOutput written to \"%s\".\n" , $file; |
From: Markus H. <mho...@us...> - 2005-10-11 20:36:01
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8898/src Modified Files: Tag: Release_0_9_5_stable tokenize.c Log Message: link_tokenize(): take care of escaped quotes Index: tokenize.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/tokenize.c,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -u -U2 -r1.13.2.1 -r1.13.2.2 --- tokenize.c 29 Jul 2005 21:15:44 -0000 1.13.2.1 +++ tokenize.c 11 Oct 2005 20:35:50 -0000 1.13.2.2 @@ -593,10 +593,23 @@ } } - else if (inbuffer[i] == '\'') { + else if (inbuffer[i] == '\'' && inbuffer[i-1] != '\\') { + char *end; /* printf("here1\n"); */ have_token = 1; ptr_sqltoken->type = 0; this_token = &inbuffer[i+1]; - endtoken = strchr(&inbuffer[i+1], (int)'\''); /* jump to next ' */ + end = this_token; + + /* loop until we find an unescaped matching end quote */ + while (end != NULL) { + endtoken = strchr(end, (int)'\''); /* jump to next ' */ + if (!endtoken || *(endtoken-1) != '\\') { + end = NULL; + } + else { + end = endtoken+1; + } + } + if (endtoken != NULL) { ptr_sqltoken->next_token = strstr(endtoken, " "); |
From: Markus H. <mho...@us...> - 2005-10-11 20:35:16
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8637/src Modified Files: Tag: Release_0_9_5_stable strfncs.c strfncs.h Log Message: added escape_chars(), unescape_chars() Index: strfncs.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/strfncs.c,v retrieving revision 1.15.2.3 retrieving revision 1.15.2.4 diff -u -U2 -r1.15.2.3 -r1.15.2.4 --- strfncs.c 9 Sep 2004 21:32:50 -0000 1.15.2.3 +++ strfncs.c 11 Oct 2005 20:35:02 -0000 1.15.2.4 @@ -954,4 +954,91 @@ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + escape_chars(): backslash-escapes characters in a string + + size_t escape_chars returns the length of the escaped string + + char *dest pointer to a buffer that will receive the escaped string + must hold at least twice the size of orig + + char *orig pointer to the buffer with the string to be escaped + + size_t orig_size length of original string + + const char *toescape array of characters that must be escaped + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +size_t escape_chars(char *dest, const char *orig, size_t orig_size, const char *toescape) { + char *curdest = dest; + const char *curorig = orig; + const char *curescaped; + size_t len = 0; + + while (curorig && curorig < orig+orig_size) { + curescaped = toescape; + while (curescaped && *curescaped) { + if (*curorig == *curescaped) { + *curdest = '\\'; + curdest++; + len++; + break; + } + curescaped++; + } + /* Copy char to destination */ + *curdest = *curorig; + + curorig++; + curdest++; + len++; + } + + /* append a NULL byte. This is required if orig was a + zero-terminated string. It does not hurt if orig was a + binary string as the calling function is not supposed to + read past len bytes */ + *curdest = '\0'; + return len; +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + unescape_chars(): unescapes a backslash-escaped string + + size_t unescape_chars returns the length of the unescaped string + + char *dest pointer to a buffer that will receive the unescaped string + must hold at least the size of orig + + char *orig pointer to the buffer with the string to be unescaped + + size_t orig_size length of original string + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +size_t unescape_chars(char *dest, const char *orig, size_t orig_size) { + char *curdest = dest; + const char *curorig = orig; + const char *curescaped; + size_t len = 0; + + while (curorig && curorig < orig+orig_size) { + if (*curorig == '\\') { + curorig++; + } + /* Copy char to destination */ + *curdest = *curorig; + + curorig++; + curdest++; + len++; + } + + /* append a NULL byte. This is required if orig was a + zero-terminated string. It does not hurt if orig was a + binary string as the calling function is not supposed to + read past len bytes */ + *curdest = '\0'; + return len; +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ increment_suffix(): calling this function repeatedly generates a sequence of suffices. The sequence Index: strfncs.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/strfncs.h,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -U2 -r1.8.2.2 -r1.8.2.3 --- strfncs.h 9 Sep 2004 21:32:50 -0000 1.8.2.2 +++ strfncs.h 11 Oct 2005 20:35:02 -0000 1.8.2.3 @@ -67,4 +67,6 @@ char *canonicalize_path(char *the_path); char *strip_quote(char *the_string); +size_t escape_chars(char *dest, const char *orig, size_t orig_size, const char *toescape); +size_t unescape_chars(char *dest, const char *orig, size_t orig_size); int increment_suffix(char* suffix, int max_depth, int upper); int parse_versioninfo(const char* version, struct VERSIONINFO* ver); |
From: Markus H. <mho...@us...> - 2005-10-11 20:33:06
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7815/src Modified Files: Tag: Release_0_9_5_stable refdbd.h.in refdbd.c refdbdref.c Log Message: added updatejo() Index: refdbd.h.in =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.h.in,v retrieving revision 1.7.2.11 retrieving revision 1.7.2.12 diff -u -U2 -r1.7.2.11 -r1.7.2.12 --- refdbd.h.in 21 Sep 2005 23:36:51 -0000 1.7.2.11 +++ refdbd.h.in 11 Oct 2005 20:32:55 -0000 1.7.2.12 @@ -134,4 +134,5 @@ int getnote(struct CLIENT_REQUEST* ptr_clrequest, struct bibinfo *ptr_biblio_info, int ref_format, int n_privatelist, char *cgi_url, struct ADDRESULT* ptr_addresult); int addlink(struct CLIENT_REQUEST* ptr_clrequest, char* set_owner, struct ADDRESULT* ptr_addresult, int n_remove); +int updatejo(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult); struct CLIENT_REQUEST* new_client_request(void); struct CLIENT_REQUEST* dup_client_request(struct CLIENT_REQUEST* ptr_clrequest); Index: refdbd.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbd.c,v retrieving revision 1.74.2.17 retrieving revision 1.74.2.18 diff -u -U2 -r1.74.2.17 -r1.74.2.18 --- refdbd.c 21 Sep 2005 23:35:17 -0000 1.74.2.17 +++ refdbd.c 11 Oct 2005 20:32:55 -0000 1.74.2.18 @@ -1573,6 +1573,4 @@ ptr_biblio_info->encoding = ptr_child_clrequest->db_encoding; -/* printf("child sleeps PID=%d\n", getpid()); */ -/* sleep(10); */ retval = getref(ptr_child_clrequest, ptr_biblio_info, ref_format, n_privatelist, pdfroot, cgi_url, ptr_addresult); @@ -1757,4 +1755,17 @@ } + /*********************************************** updatejo ****/ + else if (strcmp((ptr_child_clrequest->inargv)[0], "updatejo") == 0) { + retval = updatejo(ptr_child_clrequest, ptr_addresult); + + /* let the client know what happened */ + if (retval != 1) { + n_client_status = read_status(ptr_child_clrequest->fd); + send_status(ptr_child_clrequest->fd, 0, TERM_NO); + + sprintf(child_returnmsg, ULLSPEC" updated:"ULLSPEC" skipped:"ULLSPEC" failed\n", (unsigned long long)(ptr_addresult->success), (unsigned long long)(ptr_addresult->skipped), (unsigned long long)(ptr_addresult->failure)); + } + } + /*********************************************** adduser ****/ else if (strcmp((ptr_child_clrequest->inargv)[0], "adduser") == 0) { Index: refdbdref.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdref.c,v retrieving revision 1.65.2.17 retrieving revision 1.65.2.18 diff -u -U2 -r1.65.2.17 -r1.65.2.18 --- refdbdref.c 7 Sep 2005 23:45:03 -0000 1.65.2.17 +++ refdbdref.c 11 Oct 2005 20:32:55 -0000 1.65.2.18 @@ -33,11 +33,4 @@ */ -/* ToDo: implement updatejo command. Could work like this: - use four parameters or arguments, like in - updatejo -a abbrev -f full -1 custabbrev1 -2 custabbrev2 - refdbd tries to match the data to an existing entry from left to right - and updates the other fields -*/ - #include <stdio.h> #include <unistd.h> @@ -86,4 +79,5 @@ static unsigned long long read_ris_data(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult, dbi_conn conn, dbi_conn conn_refdb, int replace_ref, int n_keep_id, const char* the_user, Lilid* ptr_sentinel, iconv_t conv_descriptor, int iconv_init_status); static int real_run_keyword_scan(struct CLIENT_REQUEST* ptr_clrequest, Lilid* ptr_sentinel, int mode, int* ptr_insert); +static int is_journal(dbi_conn conn, const char* field, const char* quoted_name); @@ -2005,4 +1999,411 @@ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + updatejo(): implements the client command updatejo + + int updatejo returns 1 if failed, 0 if successful + + struct CLIENT_REQUEST* ptr_clrequest ptr to structure with client info + + struct ADDRESULT* addresult this structure will be filled in with the number + of (un-)successfully added/updated references + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +int updatejo(struct CLIENT_REQUEST* ptr_clrequest, struct ADDRESULT* ptr_addresult) { + dbi_conn conn; + dbi_result dbires; + dbi_driver driver; + char **inargv; /* tokens of the client request */ + int inargc; /* number of tokens of the client request */ + int inargcmax; /* maximum number of tokens of the client request */ + int len; + int result; + int mode; + int retval = 0; + int havefirst = 0; + int error = 0; /* codes: 0 = no error, 1 = out of memory, 2 = subselect failed */ + int syn_count = 0; /* counter for synonyms changed */ + unsigned long long n_id; + unsigned long long n_target_id; + size_t buffer_len; /* these are the allocated lengths of the buffers */ + size_t sql_command_len; + size_t return_msg_len; + char *return_msg; + char *sql_command; /* these are ptrs to the buffers and temporary ptrs */ + char *new_sql_command; + char *buffer; + char *new_buffer; + char *token; + char *newtoken; + char *stripped_token; + char *quoted_token; + char *eostring; + char journal_val[256] = ""; /* name of journal*/ + char journal_field[23] = ""; /* t_periodical field name of synonym */ + char field_buffer[10]; + char my_type[20]; + char assemble_buffer[2048]; + char jo[256] = ""; + char jf[256] = ""; + char j1[256] = ""; + char j2[256] = ""; + struct SQLTOKEN sqltoken; + struct lilimem sentinel; + Liliform *ptr_curr; + Liliform syn_sentinel; + + ptr_addresult->success = 0; + ptr_addresult->failure = 0; + ptr_addresult->updated = 0; + ptr_addresult->skipped = 0; + + sentinel.ptr_mem = NULL; + sentinel.ptr_next = NULL; + sentinel.varname[0] = '\0'; + + syn_sentinel.ptr_next = NULL; + syn_sentinel.name[0] = '\0'; + syn_sentinel.value = NULL; + + /* get buffer to analyze the request */ + inargc = 0; + inargcmax = 10; + inargv = malloc((size_t)inargcmax*sizeof(char*)); + if (inargv == NULL || insert_lilimem(&sentinel, (void**)&inargv, NULL)) { + send_status(ptr_clrequest->fd, 801, TERM_NO); + LOG_PRINT(LOG_CRIT, get_status_msg(801)); + return 1; + } + + /* get buffer to assemble the SQL queries */ + sql_command_len = 4096; + sql_command = malloc(sql_command_len); + + if (sql_command == NULL || insert_lilimem(&sentinel, (void**)&sql_command, NULL)) { + delete_all_lilimem(&sentinel); + send_status(ptr_clrequest->fd, 801, TERM_NO); + LOG_PRINT(LOG_CRIT, get_status_msg(801)); + return 1; + } + *sql_command = '\0'; /* start with an empty string */ + + /* get a buffer to hold tokens */ + buffer_len = 4096; + buffer = malloc(buffer_len); + + if (buffer == NULL || insert_lilimem(&sentinel, (void**)&buffer, NULL)) { + delete_all_lilimem(&sentinel); + send_status(ptr_clrequest->fd, 801, TERM_NO); + LOG_PRINT(LOG_CRIT, get_status_msg(801)); + return 1; + } + *buffer = '\0'; /* start with an empty string */ + + /* yet another buffer */ + return_msg_len = 4096; + return_msg = malloc(return_msg_len); + + if (return_msg == NULL || insert_lilimem(&sentinel, (void**)&return_msg, NULL)) { + delete_all_lilimem(&sentinel); + send_status(ptr_clrequest->fd, 801, TERM_NO); + LOG_PRINT(LOG_CRIT, get_status_msg(801)); + return 1; + } + *return_msg = '\0'; /* start with an empty string */ + + eostring = ptr_clrequest->argument + strlen(ptr_clrequest->argument); + + /* connect to the database */ + if ((conn = connect_to_db(ptr_clrequest, NULL, 0)) == NULL) { + send_status(ptr_clrequest->fd, 204, TERM_NO); + LOG_PRINT(LOG_WARNING, get_status_msg(204)); + delete_all_lilimem(&sentinel); + return 1; + } + + driver = dbi_conn_get_driver(conn); + + token = ptr_clrequest->argument; + newtoken = token; + + printf("%s\n", token); + + /* general strategy: scan the command string for items and add all of + them except the first to a linked list. Then walk through + the linked list to assemble the update query */ + + + /* loop as long as we find more tokens */ + while (newtoken != NULL) { + token = link_tokenize(newtoken, &sqltoken); + newtoken = sqltoken.next_token; +/* printf("token:%s<<newtoken:%s<<\n", token, newtoken); */ + + if (token != NULL) { + /* extract the token and save to a temporary string */ + if (sqltoken.length > buffer_len) { + new_buffer = (char*)realloc(buffer, (size_t)sqltoken.length); + if (new_buffer == NULL) { /* out of memory */ + error = 1; + break; + } + else { + buffer = new_buffer; + buffer_len = sqltoken.length; + } + } + strncpy(buffer, token, sqltoken.length); + buffer[sqltoken.length] ='\0'; + if (sqltoken.type == 4) { + /*----------------------------------------------------------------*/ + /* target fields */ + if (strncmp(token, ":JF:", 4) == 0 || /* journal full */ + strncmp(token, ":JO:", 4) == 0 || /* journal abbrev */ + strncmp(token, ":J1:", 4) == 0 || /* journal custabbrev1 */ + strncmp(token, ":J2:", 4) == 0) { /* journal custabbrev2 */ + + strcpy(field_buffer, buffer); + field_buffer[4] = '\0'; /* terminate string */ + + /* obtain the token after the '=' */ + token = link_tokenize(newtoken, &sqltoken); + newtoken = sqltoken.next_token; + if (token != NULL) { + strncpy(buffer, token, sqltoken.length); + buffer[sqltoken.length] ='\0'; /* terminate string */ + len = 0; + + /* terminate token at the next unprotected space */ + token = nstrtok(buffer, &len, " "); + if (token != NULL) { +/* printf("token went to: %s<<\n", token); */ + strncpy(buffer, token, sqltoken.length); + buffer[sqltoken.length] ='\0'; /* terminate string */ + len = 0; + token = nstrtok(buffer, &len, " "); + if (token != NULL) { + quoted_token = malloc(strlen(token)+1); + if (!quoted_token) { + error = 1; + break; + } + + stripped_token = strip_quote(token); + + unescape_chars(quoted_token, stripped_token, strlen(stripped_token)); + + +/* printf("quoted_token went to: %s<<\n", quoted_token); */ + + if (!havefirst) { + if (!strcmp(field_buffer, ":JF:")) { + strcpy(journal_field, "periodical_name"); + } + else if (!strcmp(field_buffer, ":JO:")) { + strcpy(journal_field, "periodical_abbrev"); + } + else if (!strcmp(field_buffer, ":J1:")) { + strcpy(journal_field, "periodical_custabbrev1"); + } + else { + strcpy(journal_field, "periodical_custabbrev2"); + } + + if (dbi_conn_quote_string(conn, "ed_token) == 0) { + error = 1; + break; + } + + strncpy(journal_val, quoted_token, 255); + journal_val[255] = '\0'; + /* printf("key:%s<<value:%s<<\n", journal_type, journal_val); */ + free(quoted_token); + + if (is_journal(conn, journal_field, journal_val) != 1) { + error = 2; + break; + } + havefirst++; + } + else { + if (insert_liliform(&syn_sentinel, field_buffer, quoted_token)) { + error = 1; + break; + } + } + } + } + } + } + else { + /* ignore unknown specifier */ + ptr_addresult->skipped++; + } + } /* if (sqltoken.type != 4) / else */ + } /* if (token != NULL) */ + } /* while (newtoken != NULL) */ + + if (error || !*journal_field || !*journal_val) { + if (error == 1) { + send_status(ptr_clrequest->fd, 801, TERM_NO); + LOG_PRINT(LOG_CRIT, get_status_msg(801)); + } + else { + send_status(ptr_clrequest->fd, 417, TERM_NO); + LOG_PRINT(LOG_INFO, get_status_msg(417)); + } + retval = 1; + goto Finish; + } + + /* loop over all synonyms. If the same synonym is specified more + than once, the last value prevails */ + ptr_curr = &syn_sentinel; + + while ((ptr_curr = get_next_liliform(ptr_curr)) != NULL) { + /* strcpy is sufficient as ptr_curr->value is already checked for length */ + quoted_token = mstrdup(ptr_curr->value); + if (!quoted_token) { + error = 1; + break; + } + if (dbi_conn_quote_string(conn, "ed_token) == 0) { + error = 1; + break; + } + + if (!strcmp(ptr_curr->name, ":JO:")) { + strcpy(jo, quoted_token); + free(ptr_curr->value); + } + else if (!strcmp(ptr_curr->name, ":JF:")) { + strcpy(jf, quoted_token); + free(ptr_curr->value); + } + else if (!strcmp(ptr_curr->name, ":J1:")) { + strcpy(j1, quoted_token); + free(ptr_curr->value); + } + else if (!strcmp(ptr_curr->name, ":J2:")) { + strcpy(j2, quoted_token); + free(ptr_curr->value); + } + free(quoted_token); + } + + if (error) { + send_status(ptr_clrequest->fd, 801, TERM_NO); + LOG_PRINT(LOG_CRIT, get_status_msg(801)); + retval = 1; + goto Finish; + } + + /* assemble query string */ + strcpy(sql_command, "UPDATE t_periodical SET "); + + if (*jf) { + sprintf(sql_command + strlen(sql_command), "periodical_name=%s, ", jf); + syn_count++; + sprintf(return_msg, "425:%s:%s\n", journal_val, jf); + } + + if (*jo) { + sprintf(sql_command + strlen(sql_command), "periodical_abbrev=%s, ", jo); + syn_count++; + sprintf(return_msg+strlen(return_msg), "425:%s:%s\n", journal_val, jo); + } + + if (*j1) { + sprintf(sql_command + strlen(sql_command), "periodical_custabbrev1=%s, ", j1); + syn_count++; + sprintf(return_msg+strlen(return_msg), "425:%s:%s\n", journal_val, j1); + } + + if (*j2) { + sprintf(sql_command + strlen(sql_command), "periodical_custabbrev2=%s, ", j2); + syn_count++; + sprintf(return_msg+strlen(return_msg), "425:%s:%s\n", journal_val, j2); + } + + /* remove trailing comma */ + sprintf(sql_command + strlen(sql_command) - 2, " WHERE %s=%s", journal_field, journal_val); + + LOG_PRINT(LOG_DEBUG, sql_command); + + dbires = dbi_conn_query(conn, sql_command); + + if (!dbires) { + error = 1; + goto Finish; + } + + ptr_addresult->success += syn_count; + + Finish: + if (ptr_addresult->success) { + /* database was changed, update meta info */ + update_meta(conn, ptr_clrequest); + } + + /* send back result message */ + if (!error) { + send_status(ptr_clrequest->fd, 0, TERM_NO); + } + else { + send_status(ptr_clrequest->fd, 260, TERM_NO); + } + + tiwrite(ptr_clrequest->fd, return_msg, TERM_YES); + + dbi_conn_close(conn); + delete_all_lilimem(&sentinel); + delete_all_liliform(&syn_sentinel); + + return retval; +} + + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + is_journal(): checks whether journal exists + + int is_journal returns 0 = not found, 1 = journal exists, -1: error + + dbi_conn conn connection to database + + const char* field field to check + + const char* quoted_name periodical name (properly escaped and quoted) + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +static int is_journal(dbi_conn conn, const char* field, const char* quoted_name) { + unsigned long long result; + char sql_command[512]; + dbi_result dbires; + + snprintf(sql_command, 512, "SELECT periodical_id FROM t_periodical WHERE %s=%s", field, quoted_name); + + LOG_PRINT(LOG_DEBUG, sql_command); + + dbires = dbi_conn_query(conn, sql_command); + + if (!dbires) { + LOG_PRINT(LOG_ERR, get_status_msg(234)); + return -1; + } + + result = dbi_result_get_numrows(dbires); + + if (!result) { + return 0; + } + else if (result == DBI_ROW_ERROR) { + LOG_PRINT(LOG_ERR, get_status_msg(234)); + return -1; + } + else { + return 1; + } +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ getref(): implements the client command getref |
From: Markus H. <mho...@us...> - 2005-10-11 20:30:13
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6619/src Modified Files: Tag: Release_0_9_5_stable refdbc.c refdbc.h Log Message: added updatejo command Index: refdbc.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbc.c,v retrieving revision 1.72.2.10 retrieving revision 1.72.2.11 diff -u -U2 -r1.72.2.10 -r1.72.2.11 --- refdbc.c 14 Aug 2005 00:22:44 -0000 1.72.2.10 +++ refdbc.c 11 Oct 2005 20:29:35 -0000 1.72.2.11 @@ -99,4 +99,5 @@ { "updateref", com_updateref, "Update references in the database" }, { "verbose", com_verbose, "Toggle verbose mode" }, + { "updatejo", com_updatejo, "Update journal name synonyms" }, { "whichdb", com_whichdb, "Show info about current database" }, { (char *)NULL, (Function *)NULL, (char *)NULL } @@ -5295,4 +5296,313 @@ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + com_updatejo(): update the journal name synonyms + + int com_updatejo 0 if successful, 1 if error + + char *arg the spec of the note which are to be viewed + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +int com_updatejo (char* arg) { + char outbuffer[COMMAND_INBUF_LEN]; /* holds the command for the server */ + char* infile; + char inbuffer[COMMAND_INBUF_LEN] = ""; + char db[DBNAME_LENGTH] = ""; + char **inargv; /* tokens of the argument */ + char *newarg; + char *read_result; + char scrambled_passwd[PASSWD_LENGTH*3+1] = ""; + int inargc = 0; /* number of tokens of the argument */ + int inargcmax; /* maximum number of tokens */ + int result; + int i, j; + int n_opt; + int n_done; + int n_open_andnot = 0; + int n_limit_to_user = 0; /* indicates -P switch */ + int n_read_file = 0; /* indicates -f switch */ + int n_cmdlinerror = 0; + int numbyte; + int n_read_done = 0; +/* size_t byte_written = 0; */ + FILE *infilefp; + FILE* errstream; + struct lilimem sentinel; + struct liliform* ptr_current; + struct simplelistvals slvals; + + errstream = (n_cgi) ? stdout : stderr; + + slvals.outbuffer = outbuffer; + + strcpy(slvals.outbuffer, "updatejo "); + slvals.n_file_open = 0; + slvals.n_file_append = 0; + slvals.n_pipe = 0; + slvals.outfile = NULL; + slvals.outpipe = NULL; + + sentinel.ptr_mem = NULL; + sentinel.ptr_next = NULL; + sentinel.varname[0] = '\0'; + + strcpy(db, current_db); /* use default db if set */ + + /* parse the argument. first we cut the argument + into pieces with strtok, then we use getopt to interpret */ + + /* get a buffer to hold the tokens. Start with 10 tokens, + increase in steps of 10 as needed */ + inargc = 0; + inargcmax = 10; + inargv = malloc((size_t)inargcmax*sizeof(char*)); + if (inargv == NULL) { + return 1; + } + + if (insert_lilimem(&sentinel, (void**)&inargv, NULL)) { + return 1; + } + + /* the following is a temporary hack to allow cmdln_tokenize to work */ + newarg = malloc((size_t)(strlen(arg)+8)); + if (newarg == NULL) { + delete_all_lilimem(&sentinel); + return 1; + } + + if (insert_lilimem(&sentinel, (void**)&newarg, NULL)) { + delete_all_lilimem(&sentinel); + return 1; + } + + strcpy(newarg, "addlink "); + strcat(newarg, arg); + + result = cmdln_tokenize(&inargc, &inargv, inargcmax, newarg); + + + if (result == 1 || result == 2) { /* memory error */ + delete_all_lilimem(&sentinel); + return 1; + } + + /* now we have the tokens nicely arranged in inargc */ + /* for (i = 0; i < inargc; i++) { */ + /* printf("inargv[%d]: %s\n", i, inargv[i]); */ + /* } */ + + /* get options */ + optind = 0; + + while ((n_opt = getopt(inargc, inargv, "ac:C:d:e:E:f:F:g:G:hi:kl:L:o:O:p:PqR:s:S:t:T:u:U:vVw:")) != -1) { + switch(n_opt) { + case 'c': + /* printf("-c %s\n", optarg); */ + slvals.outpipe = malloc(strlen(optarg)+1); + if (slvals.outpipe == NULL) { + delete_all_lilimem(&sentinel); + return 0; + } + strcpy(slvals.outpipe, optarg); + if (insert_lilimem(&sentinel, (void**)&slvals.outpipe, NULL)) { + delete_all_lilimem(&sentinel); + return 1; + } + + slvals.n_pipe = 1; + break; + case 'd': + /* printf("-d %s\n", optarg); */ + strncpy(db, optarg, _POSIX_PATH_MAX - 1); /* override preset db */ + db[_POSIX_PATH_MAX-1] = '\0'; /* terminate in case string got truncated */ + break; +/* case 'f': */ +/* if (!strcmp(optarg, "stdin")) { */ +/* n_read_stdin = 1; */ +/* } */ +/* else { */ +/* infile = canonicalize_path(optarg); */ +/* if (insert_lilimem(&sentinel, (void**)&infile, NULL)) { */ +/* delete_all_lilimem(&sentinel); */ +/* return 1; */ +/* } */ +/* n_read_file = 1; */ +/* } */ +/* break; */ + case 'h': + printf("Updates the synonyms of a given journal.\nSyntax: updatejo [-c command] [-d database] [-h] [-o outfile] [-O outfile] :JO:|:JF:|:J1:|:J2:=journal :XY:=name [:XY:=name1...]\nThe first argument selects the journal by its short name, full name, user abbreviation1, or user abbreviation2, respectively\nXY is one of JO|JF|J1|J2 and sets the corresponding synonym to the supplied name\nOptions: -c command pipe the output through command\n -d database specify the database to work with\n -h prints this mini-help\n -o outfile save the output in outfile (overwrite)\n -O outfile append the output to outfile\n"); + delete_all_lilimem(&sentinel); + return 0; + break; + case 'o': + /* printf("-o %s\n", optarg); */ + slvals.outfile = canonicalize_path(optarg); + if (insert_lilimem(&sentinel, (void**)&slvals.outfile, NULL)) { + delete_all_lilimem(&sentinel); + return 1; + } + slvals.n_file_open = 1; + break; + case 'O': + /* printf("-O %s\n", optarg); */ + slvals.outfile = canonicalize_path(optarg); + if (insert_lilimem(&sentinel, (void**)&slvals.outfile, NULL)) { + delete_all_lilimem(&sentinel); + return 1; + } + slvals.n_file_append = 1; + break; + /* now all the options that main has already taken care of */ + case 'a': + case 'C': /* fall through */ + case 'e': + case 'E': + case 'f': + case 'F': + case 'g': + case 'G': + case 'i': + case 'k': + case 'l': + case 'L': + case 'p': + case 'P': + case 'q': + case 'R': + case 's': + case 'S': + case 't': + case 'T': + case 'u': + case 'U': + case 'v': + case 'V': + case 'w': + break; + case ':': + fprintf(stderr, "missing option\n"); + n_cmdlinerror = 1; + break; + case '?': + fprintf(stderr, "unknown option\n"); + n_cmdlinerror = 1; + break; + } + } + + + /* get arguments */ +/* for (i = optind; i < inargc; i++) { */ +/* printf("argument %s\n", inargv[i]); */ +/* } */ + + if (!*db) { + fprintf(errstream, "Don't know which database to use. Select one with selectdb or use the -d switch with addlink\n"); + delete_all_lilimem(&sentinel); + return 1; + } + + if (n_cmdlinerror) { + delete_all_lilimem(&sentinel); + return 1; + } + + if (connect_to_server(&slvals.n_sockfd, server_ip, port_address) != 0) { + delete_all_lilimem(&sentinel); + return 1; + } + + strcpy(scrambled_passwd, passwd); + + if (init_dialog(slvals.n_sockfd, scrambled_passwd, inbuffer)) { + delete_all_lilimem(&sentinel); + close(slvals.n_sockfd); + return 1; + } + + + if (n_read_file || n_read_stdin) { + if (!n_read_stdin) { + infilefp = fopen(infile, "rb"); + if (infilefp == NULL) { + send_status(slvals.n_sockfd, 112, TERM_NO); + delete_all_lilimem(&sentinel); + close(slvals.n_sockfd); + return 1; + } + } + else { + infilefp = stdin; /* stdin is already open */ + } + + read_result = fgets(slvals.outbuffer+strlen(slvals.outbuffer), COMMAND_INBUF_LEN-strlen(slvals.outbuffer), infilefp); + if (!n_read_stdin) { /* don't close stdin */ + fclose(infilefp); + } + if (read_result == NULL) { + send_status(slvals.n_sockfd, 112, TERM_NO); + delete_all_lilimem(&sentinel); + close(slvals.n_sockfd); + return 1; + } + } + else { + if (optind < inargc) { + strcat(slvals.outbuffer, "\""); + /* printf("%d\n", optind); */ + for (i = optind; i < inargc; i++) { +/* printf("inargv[%d]: %s<<\n", i, inargv[i]); */ + /* the tokenizer returns a quoted item as a separate token + even if there is no space between e.g. a '=' and the + quoted item. To rectify this, check whether the previous + item ended with a '=' */ + if (slvals.outbuffer[strlen(slvals.outbuffer)-1] != '=') { + strcat(slvals.outbuffer, inargv[i]); +/* strcat(slvals.outbuffer, " "); */ + } + else { + /* quote item */ + strcat(slvals.outbuffer, "\'"); + + /* in order to allow e.g. single quotes in journal names we + must escape the string properly. It will be unescaped on + the server side */ + escape_chars(slvals.outbuffer + strlen(slvals.outbuffer), inargv[i], strlen(inargv[i]), "'\""); + strcat(slvals.outbuffer, "\' "); + } + } + strcpy(&slvals.outbuffer[strlen(slvals.outbuffer)-1], "\""); /* remove trailing space */ + } + } + + /* ToDo: do we need this here? */ + /* make sure there's no newlines in the string; reuse read_result */ + for (read_result = slvals.outbuffer; *read_result; read_result++) { + if (*read_result == '\n' || *read_result == '\r') { + *read_result = ' '; + } + } + + /* assemble command string for refdbd */ + strcat(slvals.outbuffer, " -u "); + strcat(slvals.outbuffer, username); + if (*passwd) { + strcat(slvals.outbuffer, " -w "); + strcat(slvals.outbuffer, scrambled_passwd); + } + strcat(slvals.outbuffer, " -d "); + strcat(slvals.outbuffer, db); + + LOG_PRINT(LOG_DEBUG, slvals.outbuffer); + getsimplelist(&slvals, 1); + + close(slvals.n_sockfd); + + delete_all_lilimem(&sentinel); + + return 0; +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ postprocess_var(): checks and converts as necessary config variables Index: refdbc.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbc.h,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -U2 -r1.6.2.1 -r1.6.2.2 --- refdbc.h 15 Apr 2005 22:45:09 -0000 1.6.2.1 +++ refdbc.h 11 Oct 2005 20:29:38 -0000 1.6.2.2 @@ -43,4 +43,5 @@ int com_selectdb(char *arg); int com_whichdb(char *arg); +int com_updatejo (char* arg); /* other functions */ |
From: Markus H. <mho...@us...> - 2005-10-11 20:28:39
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6509/scripts Modified Files: Tag: Release_0_9_5_stable statgen.pl Log Message: added updatejo message Index: statgen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/Attic/statgen.pl,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -U2 -r1.1.2.5 -r1.1.2.6 --- statgen.pl 23 Sep 2005 23:44:34 -0000 1.1.2.5 +++ statgen.pl 11 Oct 2005 20:28:26 -0000 1.1.2.6 @@ -87,4 +87,5 @@ ["258", "create t_xlink failed"], ["259", "failed to remove ulink"], + ["260", "failed to update journal names"], ## 3xx: query errors @@ -119,4 +120,5 @@ ["423", "dataset is still in use"], ["424", "dataset is already attached to user"], + ["425", "periodical name changed successfully"], # 7xx: internal server warnings |
From: David N. <dav...@us...> - 2005-10-08 00:23:40
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10385 Modified Files: install.html Log Message: Removed incorrect advice regarding Debian install location Index: install.html =================================================================== RCS file: /cvsroot/refdb/homepage/install.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -U2 -r1.5 -r1.6 --- install.html 7 Oct 2005 22:10:29 -0000 1.5 +++ install.html 8 Oct 2005 00:23:32 -0000 1.6 @@ -151,5 +151,5 @@ ./configure && make && make install </pre> - <p>First, configure the package. This is done by running the command <code>./configure</code> which checks your system for required software. It can accept a number of parameters. It is <em>very</em> important that you check whether you need to use any parameters. A summary of the available parameters can be viewed with <code> ./configure --help | more </code> (the output is piped through <code>more</code> as it is often more than a page in length). The <code>README</code> and <code>INSTALL</code> files my indicate any important parameters. Debian users, for example, will want to override the default prefix of <code>/usr/local</code> to the debian-appropriate <code>/usr</code> using <code>./configure --prefix=/usr</code>.</p> + <p>First, configure the package. This is done by running the command <code>./configure</code> which checks your system for required software. It can accept a number of parameters. It is <em>very</em> important that you check whether you need to use any parameters. A summary of the available parameters can be viewed with <code> ./configure --help | more </code> (the output is piped through <code>more</code> as it is often more than a page in length). The <code>README</code> and <code>INSTALL</code> files my indicate any important parameters.</p> <p>The next command <code>make</code> creates the files to be installed.</p> <p>The final step <code>make install</code> copies the newly created files to their target locations on your system. This command must be executed as root. If you are not the root user you can temporarily obtain the required privileges with the <code>su</code> command (see <code>man su</code> for more details).</p> |
From: David N. <dav...@us...> - 2005-10-07 22:59:37
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22539 Modified Files: vim.html Log Message: Replace unicode character with entity, minor text correction Index: vim.html =================================================================== RCS file: /cvsroot/refdb/homepage/vim.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -U2 -r1.2 -r1.3 --- vim.html 7 Oct 2005 22:10:29 -0000 1.2 +++ vim.html 7 Oct 2005 22:59:19 -0000 1.3 @@ -142,5 +142,5 @@ <p>If <a href="http://www.vim.org">Vim</a> is the editor of your choice, this package installs the syntax, filetype and plugin files that enable you to edit DocBook XML files.</p> <p>The plugin has a rather extensive list of dependencies as it interacts with a great many components in order to perform all its functions. For example, in order to create and view PDF and (X)HTML output it must use an XML validator (xmllint), an XSLT processor (xsltproc), a FO processor (fop), an HTML viewer and a PDF viewer. There are other dependencies which are not listed as they are commonly available on most *nix systems. For further information on dependencies unpack the source archive, read the README file and type <em>./configure --help</em>. Debian users need only select the primary package and the rest will happen automagically</p> - <p>While this suite consists of a number of components, all its functionality is exposed as keystroke mappings. All mappings (except special characters) are available via the DocBook menu (menus can be accessed from console vim â see vim help topic 'console-menus').</p> + <p>While this suite consists of a number of components, all its functionality is exposed as keystroke mappings. All mappings (except special characters) are available via the DocBook menu (menus can be accessed from console vim — see vim help topic 'console-menus').</p> <p>The source distribution can be built with support for multiple XSLT processors (xsltproc, Saxon, Xalan), FO processors (FOP, Xep), xml validators (xmllint, RXP) and, of course, RefDB.</p> <p>The Debian package has a minimal configuration with support for only one XSLT processor (xsltproc), one FO processor (Fop), one xml validator (xmllint) and RefDB.</p> @@ -157,5 +157,5 @@ <li>A mapping is supplied that enables users to jump to a selected element (chosen from a menu of available element IDs).</li> <li>Document validation is only a mapping away.</li> - <li>Output as html, xhtml, pdf and text is generated by certain mappings. The resulting output is opened in an external viewer.</li> + <li>Output as html, xhtml, pdf and text is generated via a single mapping. The resulting output is opened in an external viewer.</li> <li>Various RefDB functions are supported when editing RefDB-created documents. The user can create, edit and delete references from within Vim. References from the current document can be displayed (either all or a subset). The user can change the current document's associated database and/or stylesheet. Finally, citations from the current reference database can be selected and inserted.</li> <li>Various help is available via mappings. Help on mappings is available (<Leader>hh). In addition, help on individual docbook elements can be displayed. The user requests help on either the previous or next element and the relevant page from Walsh and Muellner's <em>DocBook: The Definitive Guide</em> is opened in an external html viewer. A summary of document structure can also be displayed.</li> |
From: Markus H. <mho...@us...> - 2005-10-07 22:11:50
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11459 Added Files: programming.html Log Message: initial version --- NEW FILE --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- $Id: programming.html,v 1.1 2005/10/07 22:11:42 mhoenicka Exp $ --> <head> <title>RefDB Features: programming</title> <meta name="author" content="Markus Hoenicka" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Homepage of the RefDB project, a reference manager and bibliography tool for structured texts" /> <link rel="stylesheet" type="text/css" href="refdbn.css" title="RefDB" media="screen, projection" /> <link rel="alternate stylesheet" type="text/css" href="refdbprint.css" title="Printer friendly" media="print, embossed, screen, projection" /> </head> <body> <!-- the page header, to be displayed across the top of the page --> <div id="head"> <div id="headleft"> <a href="http://refdb.sourceforge.net/"><img src="logo.jpg" alt="logo" border="0" /></a> </div> <div id="headright"> <table> <tbody> <tr> <td class="tag"><</td> <td class="graphic"> </td> <td class="tag">/></td> </tr> <tr> <td> </td> <td class="text">bibliographies beyond word processors</td> <td> </td> </tr> </tbody> </table> </div> </div> <div id="left"> <!-- the navigation box --> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Navigation</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="index.html">Home</a></td> </tr> <tr> <td class="navsel"> <p><a href="features.html">Features</a></p> <p class="level1"><a href="cli.html">CLI</a></p> <p class="level1"><a href="web.html">Web</a></p> <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> <tr> <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> <td class="nav"><a href="doc.html">Documentation</a></td> </tr> <tr> <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> <td class="nav"> <p><a href="download.html">Download</a></p> <p class="level1"><a href="sysreq.html">Requirements</a></p> <p class="level1"><a href="install.html">Installation</a></p> </td> </tr> </tbody> </table> </div> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Links</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="http://www.sourceforge.net/projects/refdb">Project page</a></td> </tr> <tr> <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> </tr> <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> </tr> <tr> <td class="nav"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a></td> </tr> <tr> <td class="nav"><a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" border="0" /></a></td> </tr> </tbody> </table> </div> </div> <!-- the main text area, fills most of the page --> <div id="main"> <h1>RefDB Features: programming</h1> <p>A key feature of RefDB is that it is a snap to use it from scripts or even from Makefiles. This greatly simplifies recurring tasks, like feeding the results of a weekly Pubmed search into your database. The simplest way to do this is to use the <a href="cli.html">command line tools</a> in batch mode. For more ambitious projects there is also a Perl module which allows to integrate RefDB functionality into your very own Perl programs.</p> <div class="localnav"> <table class="localnav"> <thead> <tr> <td class="localnav">On this page</td> </tr> </thead> <tbody> <tr> <td class="localnav"><a href="#general">General features</a></td> </tr> <tr> <td class="localnav"><a href="#example">Example</a></td> </tr> </tbody> </table> </div> <h2 id="general">General Features</h2> <p class="authors">Author: Markus Hoenicka <mho...@us...></p> <p><strong><a href="pre/RefDBClient-Client-1.11.tar.gz">Download RefDBClient-Client-1.11.tar.gz</a></strong></p> <p><strong>Note:</strong>This version requires <a href="pre/refdb-latest.tar.gz">refdb-0.9.6-pre2 or later</a> or a current CVS version of RefDB.</p> <p>The Perl client module <code>RefDBClient::Client</code> allows Perl programmers to access the refdbd server from Perl scripts. The client/server dialog is implemented entirely in Perl. That is, you don't need the C clients installed on your system in order to run a Perl script using this module. The module allows an object-oriented approach to all RefDB client commands.</p> <h2 id="examples">Examples</h2> <p>Creating a Perl script that interacts with refdbd is straightforward and simple. First, you create a new instance of <code>RefDBClient::Client</code> and set the initial communication parameters:</p> <pre class="source"> use RefDBClient::Client; my $client = new RefDBClient::Client; $client->set_conninfo("127.0.0.1", "9734", "markus", "pass", "refdbtest", "/home/markus/literature", "/usr/local/share/refdb/css/refdb.css"); </pre> <p>Now you can call any client command and read the retrieved data, if any, into Perl variables:</p> <pre class="source"> my $summary = $client->refdb_listdb(""); my $data = $client->get_data(); print "$data\n"; </pre> <p>This sixliner prints the available RefDB databases to stdout.</p> <p>Please follow the instructions in the INSTALL file of the archive to install this module properly on your system.</p> </div> <!-- the footer, to be displayed across the page at the bottom --> <div id="foot"> <div id="footleft">$Date: 2005/10/07 22:11:42 $</div> <div id="footright">Copyright 2004 <a href="mailto:mho...@us...">Markus Hoenicka</a></div> </div> </body> </html> |
From: Markus H. <mho...@us...> - 2005-10-07 22:10:42
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10935 Modified Files: cli.html doc.html download.html emacs.html examples.html features.html index.html install.html status.html sysreq.html vim.html web.html Log Message: moved addons contents elsewhere Index: cli.html =================================================================== RCS file: /cvsroot/refdb/homepage/cli.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- cli.html 6 Oct 2005 22:16:54 -0000 1.1 +++ cli.html 7 Oct 2005 22:10:29 -0000 1.2 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> @@ -174,4 +172,5 @@ <li><code class="refdbapp">eenc</code>: a command-line password encryption tool. Uses the same method as the RefDB command line tools and the Perl client module. Useful for programmers only.</li> <li><code class="refdbapp">refdb-backup</code>: a tool to backup RefDB databases</li> + <li><code class="refdbapp">refdb-ms</code>: a Perl script which helps you to write bibliography and citation style specifications for RefDB from scratch. If a regular XML editor does not feel right for you, try this script. It shows valid elements at the current point, just like an XML editor would do, but provides additional help about the purpose of each element.</li> <li><code class="refdbapp">refdb-restore</code>: a tool to restore RefDB databases from backups</li> <li><code class="refdbapp">refdbjade</code>: a wrapper script which transforms DocBook SGML documents to a variety of output formats.</li> Index: doc.html =================================================================== RCS file: /cvsroot/refdb/homepage/doc.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -U2 -r1.7 -r1.8 --- doc.html 6 Oct 2005 22:15:25 -0000 1.7 +++ doc.html 7 Oct 2005 22:10:29 -0000 1.8 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: download.html =================================================================== RCS file: /cvsroot/refdb/homepage/download.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -U2 -r1.13 -r1.14 --- download.html 6 Oct 2005 22:15:25 -0000 1.13 +++ download.html 7 Oct 2005 22:10:29 -0000 1.14 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: emacs.html =================================================================== RCS file: /cvsroot/refdb/homepage/emacs.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- emacs.html 6 Oct 2005 22:16:54 -0000 1.1 +++ emacs.html 7 Oct 2005 22:10:29 -0000 1.2 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: examples.html =================================================================== RCS file: /cvsroot/refdb/homepage/examples.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -U2 -r1.7 -r1.8 --- examples.html 6 Oct 2005 22:15:25 -0000 1.7 +++ examples.html 7 Oct 2005 22:10:29 -0000 1.8 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: features.html =================================================================== RCS file: /cvsroot/refdb/homepage/features.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -U2 -r1.6 -r1.7 --- features.html 6 Oct 2005 22:15:25 -0000 1.6 +++ features.html 7 Oct 2005 22:10:29 -0000 1.7 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: index.html =================================================================== RCS file: /cvsroot/refdb/homepage/index.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -U2 -r1.8 -r1.9 --- index.html 6 Oct 2005 22:15:25 -0000 1.8 +++ index.html 7 Oct 2005 22:10:29 -0000 1.9 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: install.html =================================================================== RCS file: /cvsroot/refdb/homepage/install.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -U2 -r1.4 -r1.5 --- install.html 7 Oct 2005 11:10:15 -0000 1.4 +++ install.html 7 Oct 2005 22:10:29 -0000 1.5 @@ -5,5 +5,5 @@ <head> - <title>RefDB Software Install Instructions</title> + <title>RefDB Download: software install instructions</title> <meta name="author" content="Markus Hoenicka, David Nebauer" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> @@ -119,5 +117,5 @@ <!-- the main text area, fills most of the page --> <div id="main"> - <h1>RefDB Software Install Instructions</h1> + <h1>RefDB Download: software install instructions</h1> <p>There is more than one way to install RefDB and RefDB-related software. RefDB itself is currently available as source (pre-release and cvs), Debian packages (debs) and a FreeBSD port. Additional software is available as source and often as debs. Some dependencies are listed as available from a given internet address. Instructions for installing via any of these methods is given below.</p> @@ -148,16 +146,12 @@ <h2 id="source">Source</h2> - <p>These install instructions apply to autotools-generated source packages, which includes all source archives available from the RefDB website. Source packages come as a gzipped archive, usually named something like <code>foo-1.2.tar.gz</code>. These archives should be copied to an empty directory. Unix-like systems usually include the <code>tar</code> utility which can be used to extract the archive contents. For the example archive mentioned above the command for the GNU version of <code>tar</code> is - <pre> -tar zxvf foo-1.2.gz - </pre> - After changing to the newly created subdirectory, <em>read the <code>INSTALL</code> and <code>README</code> files</em> and follow any directions or advice they give. The <code>INSTALL</code> file, in particular, will have comprehensive instructions for the remaining install process.</p> - <p>In summary, the remainder of the install process consists of three steps, commonly written as + <p>These install instructions apply to autotools-generated source packages, which includes all source archives available from the RefDB website. Source packages come as a gzipped archive, usually named something like <code>foo-1.2.tar.gz</code>. These archives should be copied to an empty directory. Unix-like systems usually include the <code>tar</code> utility which can be used to extract the archive contents. For the example archive mentioned above the command for the GNU version of <code>tar</code> is <code>tar -zxvf foo-1.2.tar.gz</code>. After changing to the newly created subdirectory, <em>read the <code>INSTALL</code> and <code>README</code> files</em> and follow any directions or advice they give. The <code>INSTALL</code> file, in particular, will have comprehensive instructions for the remaining install process.</p> + <p>In summary, the remainder of the install process consists of three steps, commonly written as</p> <pre> ./configure && make && make install </pre> - First, configure the package. This is done by running the command <code>./configure</code> which checks your system for required software. It can accept a number of parameters. It is <em>very</em> important that you check whether you need to use any parameters. A summary of the available parameters can be viewed with <pre> ./configure --help | more </pre> (the output is piped through <code>more</code> as it is often more than a page in length). The <code>README</code> and <code>INSTALL</code> files my indicate any important parameters. Debian users, for example, will want to override the default prefix of <code>/usr/local</code> to the debian-appropriate <code>/usr</code> using <code>./configure --prefix=/usr</code>.</p> - <p>The next command <pre>make</pre> creates the files to be installed.</p> - <p>The final step <pre>make install</pre> copies the newly created files to their target locations on your system. This command must be executed as root. If you are not the root user you can temporarily obtain the required privileges with the <pre>su</pre> command (see <code>man su</code> for more details).</p> + <p>First, configure the package. This is done by running the command <code>./configure</code> which checks your system for required software. It can accept a number of parameters. It is <em>very</em> important that you check whether you need to use any parameters. A summary of the available parameters can be viewed with <code> ./configure --help | more </code> (the output is piped through <code>more</code> as it is often more than a page in length). The <code>README</code> and <code>INSTALL</code> files my indicate any important parameters. Debian users, for example, will want to override the default prefix of <code>/usr/local</code> to the debian-appropriate <code>/usr</code> using <code>./configure --prefix=/usr</code>.</p> + <p>The next command <code>make</code> creates the files to be installed.</p> + <p>The final step <code>make install</code> copies the newly created files to their target locations on your system. This command must be executed as root. If you are not the root user you can temporarily obtain the required privileges with the <code>su</code> command (see <code>man su</code> for more details).</p> <p>At this point, providing no errors have occurred, the source package is installed. The original source archive and the extracted files can all be safely deleted.</p> @@ -167,21 +161,20 @@ <p>To install from source packages rather than binary packages replace <em>deb</em> with <em>deb-src</em>. The only binary debs currently supplied are for the <em>i386</em> family of architectures. Users with other architectures will need to install from source.</p> <h3 id="deb-refdb-release">RefDB (pre-release)</h3> - <p>RefDB has not yet reached the magic "1.0" initial formal release. Stable versions of RefDB are periodically released as <em>pre-releases</em>. The most recent pre-release is made available using the following line in <code>/etc/apt/sources.list</code>: + <p>RefDB has not yet reached the magic "1.0" initial formal release. Stable versions of RefDB are periodically released as <em>pre-releases</em>. The most recent pre-release is made available using the following line in <code>/etc/apt/sources.list</code>:</p> <pre> deb http://refdb.sourceforge.net/debian/release <em>distro</em> main </pre> - </p> + <h3 id="deb-refdb-cvs">RefDB (CVS)</h3> - <p>RefDB is continuously undergoing development. A recent CVS version of RefDB is always available. Add the following line to <code>/etc/apt/sources.list:</code> + <p>RefDB is continuously undergoing development. A recent CVS version of RefDB is always available. Add the following line to <code>/etc/apt/sources.list:</code></p> <pre> deb http://refdb.sourceforge.net/debian/cvs <em>distro</em> main </pre> - The CVS version of RefDB currently requires more advanced versions of certain packages than are currently available from official Debian repositories. These more recent packages are included in the RefDB CVS repository. As a result, two versions of these packages will be visible to your package management tool. Different tools handle this situation differently. <code>aptitude</code>, for example, does not upgrade to the new version automatically but makes the new version available. You should examine the documentation for your package management tool to determine how it copes with multiple package versions.</p> + <p>The CVS version of RefDB currently requires more advanced versions of certain packages than are currently available from official Debian repositories. These more recent packages are included in the RefDB CVS repository. As a result, two versions of these packages will be visible to your package management tool. Different tools handle this situation differently. <code>aptitude</code>, for example, does not upgrade to the new version automatically but makes the new version available. You should examine the documentation for your package management tool to determine how it copes with multiple package versions.</p> <h3 id="deb-refdb-additional">Additional software</h3> - <p>Some additional software is supplied RefDB as Debian packages, including <a href="vim.html">vim-related</a> packages, <a href="addons.html#makestyle">makestyle</a> and various dependencies. To make this software available add the following line to <code>/etc/apt/sources.list</code> + <p>Some additional software is supplied RefDB as Debian packages, including <a href="vim.html">vim-related</a> packages, <a href="addons.html#makestyle">makestyle</a> and various dependencies. To make this software available add the following line to <code>/etc/apt/sources.list</code></p> <pre> deb http://refdb.sourceforge.net/debian/addons <em>distro</em> main </pre> - </p> <h2 id="freebsd">FreeBSD port</h2> Index: status.html =================================================================== RCS file: /cvsroot/refdb/homepage/status.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -U2 -r1.3 -r1.4 --- status.html 6 Oct 2005 22:15:25 -0000 1.3 +++ status.html 7 Oct 2005 22:10:29 -0000 1.4 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: sysreq.html =================================================================== RCS file: /cvsroot/refdb/homepage/sysreq.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -U2 -r1.5 -r1.6 --- sysreq.html 6 Oct 2005 22:15:25 -0000 1.5 +++ sysreq.html 7 Oct 2005 22:10:29 -0000 1.6 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: vim.html =================================================================== RCS file: /cvsroot/refdb/homepage/vim.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- vim.html 6 Oct 2005 22:16:54 -0000 1.1 +++ vim.html 7 Oct 2005 22:10:29 -0000 1.2 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> Index: web.html =================================================================== RCS file: /cvsroot/refdb/homepage/web.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- web.html 6 Oct 2005 22:16:54 -0000 1.1 +++ web.html 7 Oct 2005 22:10:29 -0000 1.2 @@ -59,4 +59,5 @@ <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> + <p class="level1"><a href="programming.html">Programming</a></p> </td> </tr> @@ -77,7 +78,4 @@ </td> </tr> - <tr> - <td class="nav"><a href="addons.html">Add-ons</a></td> - </tr> </tbody> </table> |
From: David N. <dav...@us...> - 2005-10-07 11:10:23
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17559 Modified Files: install.html Log Message: Change debian 'addons' to 'additional' Index: install.html =================================================================== RCS file: /cvsroot/refdb/homepage/install.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -U2 -r1.3 -r1.4 --- install.html 6 Oct 2005 22:15:25 -0000 1.3 +++ install.html 7 Oct 2005 11:10:15 -0000 1.4 @@ -5,5 +5,5 @@ <head> - <title>RefDB Addons (Debian Packages)</title> + <title>RefDB Software Install Instructions</title> <meta name="author" content="Markus Hoenicka, David Nebauer" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> @@ -121,5 +121,5 @@ <h1>RefDB Software Install Instructions</h1> - <p>There is more than one way to install RefDB and RefDB-related software. RefDB itself is currently available as source (pre-release and cvs), Debian packages (debs) and a FreeBSD port. Software available as <a href="addons.html">add-ons</a> is available as source and often as debs. Some dependencies are listed as available from a given internet address. Instructions for installing via any of these methods is given below.</p> + <p>There is more than one way to install RefDB and RefDB-related software. RefDB itself is currently available as source (pre-release and cvs), Debian packages (debs) and a FreeBSD port. Additional software is available as source and often as debs. Some dependencies are listed as available from a given internet address. Instructions for installing via any of these methods is given below.</p> <div class="localnav"> @@ -178,6 +178,6 @@ </pre> The CVS version of RefDB currently requires more advanced versions of certain packages than are currently available from official Debian repositories. These more recent packages are included in the RefDB CVS repository. As a result, two versions of these packages will be visible to your package management tool. Different tools handle this situation differently. <code>aptitude</code>, for example, does not upgrade to the new version automatically but makes the new version available. You should examine the documentation for your package management tool to determine how it copes with multiple package versions.</p> - <h3 id="deb-refdb-addons">Add-ons</h3> - <p><a href="addons.html">Add-on</a> software is made available by adding the following line to <code>/etc/apt/sources.list</code> + <h3 id="deb-refdb-additional">Additional software</h3> + <p>Some additional software is supplied RefDB as Debian packages, including <a href="vim.html">vim-related</a> packages, <a href="addons.html#makestyle">makestyle</a> and various dependencies. To make this software available add the following line to <code>/etc/apt/sources.list</code> <pre> deb http://refdb.sourceforge.net/debian/addons <em>distro</em> main |
From: Markus H. <mho...@us...> - 2005-10-06 22:17:04
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2941 Added Files: cli.html web.html emacs.html vim.html Log Message: initial version --- NEW FILE --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- $Id: cli.html,v 1.1 2005/10/06 22:16:54 mhoenicka Exp $ --> <head> <title>RefDB Features: command line interface</title> <meta name="author" content="Markus Hoenicka" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Homepage of the RefDB project, a reference manager and bibliography tool for structured texts" /> <link rel="stylesheet" type="text/css" href="refdbn.css" title="RefDB" media="screen, projection" /> <link rel="alternate stylesheet" type="text/css" href="refdbprint.css" title="Printer friendly" media="print, embossed, screen, projection" /> </head> <body> <!-- the page header, to be displayed across the top of the page --> <div id="head"> <div id="headleft"> <a href="http://refdb.sourceforge.net/"><img src="logo.jpg" alt="logo" border="0" /></a> </div> <div id="headright"> <table> <tbody> <tr> <td class="tag"><</td> <td class="graphic"> </td> <td class="tag">/></td> </tr> <tr> <td> </td> <td class="text">bibliographies beyond word processors</td> <td> </td> </tr> </tbody> </table> </div> </div> <div id="left"> <!-- the navigation box --> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Navigation</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="index.html">Home</a></td> </tr> <tr> <td class="navsel"> <p><a href="features.html">Features</a></p> <p class="level1"><a href="cli.html">CLI</a></p> <p class="level1"><a href="web.html">Web</a></p> <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> </td> </tr> <tr> <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> <td class="nav"><a href="doc.html">Documentation</a></td> </tr> <tr> <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> <td class="nav"> <p><a href="download.html">Download</a></p> <p class="level1"><a href="sysreq.html">Requirements</a></p> <p class="level1"><a href="install.html">Installation</a></p> </td> </tr> <tr> <td class="nav"><a href="addons.html">Add-ons</a></td> </tr> </tbody> </table> </div> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Links</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="http://www.sourceforge.net/projects/refdb">Project page</a></td> </tr> <tr> <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> </tr> <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> </tr> <tr> <td class="nav"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a></td> </tr> <tr> <td class="nav"><a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" border="0" /></a></td> </tr> </tbody> </table> </div> </div> <!-- the main text area, fills most of the page --> <div id="main"> <h1>RefDB Features: command line interface</h1> <p>The command line clients are probably the most versatile tools to access RefDB. They are useful for interactive use on the command line, for scripting purposes, and as applications behind graphical user interfaces.</p> <div class="localnav"> <table class="localnav"> <thead> <tr> <td class="localnav">On this page</td> </tr> </thead> <tbody> <tr> <td class="localnav"><a href="#general">General features</a></td> </tr> <tr> <td class="localnav"><a href="#applications">Applications</a></td> </tr> <tr> <td class="localnav"><a href="#screenshots">Screenshots</a></td> </tr> </tbody> </table> </div> <h2 id="general">General Features</h2> <ul> <li>The RefDB sources and binary packages offer three command-line clients for reference management, administration, and bibliography generation.</li> <li>All clients can generate log messages to monitor their operation.</li> <li>The reference management and administration clients can run in an interactive mode (much like a console FTP client) and in a batch mode for scripting purposes. The bibliography client does not have an interactive mode as it is most commonly used from within scripts that control the transformation of documents containing bibliographies.</li> <li>Wherever applicable, the clients allow to read from and write to stdin and stdout, respectively, and thus empower you to use Unix plumbing to your hearts content.</li> <li>In addition to the clients, RefDB contains a variety of reference data conversion scripts. These scripts allow the import of reference data that <code>refdbd</code> does not support natively.</li> </ul> <h2 id="applications">Applications</h2> <p>The following command line applications are shipped with RefDB:</p> <h3 id="clients">Command line clients</h3> <ul> <li><code class="refdbapp">refdbc</code>: the reference and notes management client. Use this tool to add and update notes and references, and to search for and export reference and note data in a variety of formats.</li> <li><code class="refdbapp">refdba</code>: the administration client. Use this tool to create and delete databases, to manage users, to add, retrieve and delete bibliography styles, and to perform a variety of maintenance tasks.</li> <li><code class="refdbapp">refdbib</code>: the bibliography client. Useful as it is, you will rarely run this tool directly, as RefDB contains both easier-to-use wrapper scripts as well as a Makefile-based document management tool.</li> </ul> <h3 id="converters">Reference data converters</h3> <ul> <li><code class="refdbapp">bib2ris</code>: converts BibTeX bibliography data to the RIS format</li> <li><code class="refdbapp">db2ris</code>: converts DocBook bibliography data to RIS data. This is a wrapper script for OpenJade which runs a program implemented in DSSSL to perform the actual conversion.</li> <li><code class="refdbapp">en2ris</code>: fixes a variety of known problems in the "RIS" data exported by EndNote</li> <li><code class="refdbapp">marc2ris</code>: extracts the relevant bibliographic data from MARC datasets and delivers them in RIS format.</li> <li><code class="refdbapp">med2ris</code>: converts tagged and XML bibliographic data from Medline/PubMed records and exports them in RIS format.</li> </ul> <h3 id="tools">Miscellaneous tools</h3> <ul> <li><code class="refdbapp">eenc</code>: a command-line password encryption tool. Uses the same method as the RefDB command line tools and the Perl client module. Useful for programmers only.</li> <li><code class="refdbapp">refdb-backup</code>: a tool to backup RefDB databases</li> <li><code class="refdbapp">refdb-restore</code>: a tool to restore RefDB databases from backups</li> <li><code class="refdbapp">refdbjade</code>: a wrapper script which transforms DocBook SGML documents to a variety of output formats.</li> <li><code class="refdbapp">refdbnd</code>: creates a skeleton document and a custom Makefile. It can also create a Makefile suitable for an existing DocBook or TEI document. Creating printable or HTML output with these files is as easy as typing <code>make pdf</code> or <code>make html</code>.</li> <li><code class="refdbapp">refdbxml</code>: a wrapper script which transforms DocBook and TEI XML documents to a variety of output formats.</li> <li><code class="refdbapp">runbib</code>: a wrapper script which generates the bibliography and transforms a document.</li> </ul> <h2 id="screenshots">Screenshots</h2> <h3 id="startuphelpscreen">Startup and help screen</h3> <p class="legend"><img alt="RefDB startup and help screen" src="screenshots/refdbc-help.png"/></p> <p class="legend"><strong>Fig. 1:</strong> RefDB startup and help screen. The command selects the initial database (you can switch the database anytime during an interactive session). After entering your password you'll see the command prompt. Hitting the "?" key invokes the command overview which shows all available interactive commands.</p> <h3 id="queryresults">Query results</h3> <p class="legend"><img alt="RefDB query results" src="screenshots/refdbc-query.png"/></p> <p class="legend"><strong>Fig. 2:</strong> RefDB query output. The <code>getref</code> command is probably the command you'll use most often. In this case it selects all references with an author that has the string "Miller" in his name and which were published later than 1998. References that were authored by "Myers, B.B.,Jr." are excluded from the result list (journal articles usually have more than one author). The "-s" option requests the reprint status (displaying this and other information, like the abstract or notes, can be made the default). By default, the references are returned in a terse format optimized for terminals, as shown here. You can request other formats like risx, DocBook, HTML, or RIS. Other switches allow you to write the results to a file. You can also hit the "up" key one or more times to reuse and edit previous query strings, just like in your shell.</p> <h3 id="batchmode">Batch mode</h3> <p class="legend"><img alt="RefDB batch mode" src="screenshots/refdbc-batch.png"/></p> <p class="legend"><strong>Fig. 3:</strong> Using RefDB clients in batch mode. You can invoke all internal client commands right from your shell. This is useful especially when you use the commands in your scripts. In the example shown here, a dataset is written to a file in RIS format.</p> </div> <!-- the footer, to be displayed across the page at the bottom --> <div id="foot"> <div id="footleft">$Date: 2005/10/06 22:16:54 $</div> <div id="footright">Copyright 2004 <a href="mailto:mho...@us...">Markus Hoenicka</a></div> </div> </body> </html> --- NEW FILE --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- $Id: web.html,v 1.1 2005/10/06 22:16:54 mhoenicka Exp $ --> <head> <title>RefDB Features: web interface</title> <meta name="author" content="Markus Hoenicka" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Homepage of the RefDB project, a reference manager and bibliography tool for structured texts" /> <link rel="stylesheet" type="text/css" href="refdbn.css" title="RefDB" media="screen, projection" /> <link rel="alternate stylesheet" type="text/css" href="refdbprint.css" title="Printer friendly" media="print, embossed, screen, projection" /> </head> <body> <!-- the page header, to be displayed across the top of the page --> <div id="head"> <div id="headleft"> <a href="http://refdb.sourceforge.net/"><img src="logo.jpg" alt="logo" border="0" /></a> </div> <div id="headright"> <table> <tbody> <tr> <td class="tag"><</td> <td class="graphic"> </td> <td class="tag">/></td> </tr> <tr> <td> </td> <td class="text">bibliographies beyond word processors</td> <td> </td> </tr> </tbody> </table> </div> </div> <div id="left"> <!-- the navigation box --> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Navigation</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="index.html">Home</a></td> </tr> <tr> <td class="navsel"> <p><a href="features.html">Features</a></p> <p class="level1"><a href="cli.html">CLI</a></p> <p class="level1"><a href="web.html">Web</a></p> <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> </td> </tr> <tr> <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> <td class="nav"><a href="doc.html">Documentation</a></td> </tr> <tr> <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> <td class="nav"> <p><a href="download.html">Download</a></p> <p class="level1"><a href="sysreq.html">Requirements</a></p> <p class="level1"><a href="install.html">Installation</a></p> </td> </tr> <tr> <td class="nav"><a href="addons.html">Add-ons</a></td> </tr> </tbody> </table> </div> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Links</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="http://www.sourceforge.net/projects/refdb">Project page</a></td> </tr> <tr> <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> </tr> <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> </tr> <tr> <td class="nav"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a></td> </tr> <tr> <td class="nav"><a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" border="0" /></a></td> </tr> </tbody> </table> </div> </div> <!-- the main text area, fills most of the page --> <div id="main"> <h1>RefDB Features: web interface</h1> <p>RefDB can be accessed through a PHP-based web interface. This interface is well suited to run simple queries in a pleasant graphical environment.</p> <div class="localnav"> <table class="localnav"> <thead> <tr> <td class="localnav">On this page</td> </tr> </thead> <tbody> <tr> <td class="localnav"><a href="#general">General features</a></td> </tr> <tr> <td class="localnav"><a href="#screenshots">Screenshots</a></td> </tr> </tbody> </table> </div> <h2 id="general">General Features</h2> <ul> <li>The RefDB web interface is implemented in PHP.</li> <li>Works with all modern web browsers (including text-oriented ones)</li> <li>The query page allows simple queries with up to four search strings which can be combined with booleans. It also allows entering complex queries which use the same syntax as the <a href="cli.html">command line clients</a>.</li> <li>There is also a simple administrative interface for the most common tasks like creating databases and adding users.</li> </ul> <h2 id="screenshots">Screenshots</h2> <h3 id="firefoxquery">The query form</h3> <p class="legend"><img alt="RefDB web query form" src="screenshots/web-firefox-query.png"/></p> <p class="legend"><strong>Fig. 1:</strong> A filled-in query form of the RefDB web interface.</p> <h3 id="queryresults">Query results</h3> <p class="legend"><img alt="RefDB query results" src="screenshots/web-firefox-result.png"/></p> <p class="legend"><strong>Fig. 2:</strong> The results of your queries are displayed in lists. Buttons and checkboxes allow to edit or delete references and to change the status in your personal reference list.</p> <h3 id="lynx">Text-oriented browsers</h3> <p class="legend"><img alt="RefDB web interface in lynx" src="screenshots/web-lynx.png"/></p> <p class="legend"><strong>Fig. 3:</strong> The query form of the RefDB web interface displayed in Lynx, one of the most popular text-oriented web browsers. The RefDB web interface is open to these browsers as well.</p> </div> <!-- the footer, to be displayed across the page at the bottom --> <div id="foot"> <div id="footleft">$Date: 2005/10/06 22:16:54 $</div> <div id="footright">Copyright 2004 <a href="mailto:mho...@us...">Markus Hoenicka</a></div> </div> </body> </html> --- NEW FILE --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- $Id: emacs.html,v 1.1 2005/10/06 22:16:54 mhoenicka Exp $ --> <head> <title>RefDB Features: Emacs support</title> <meta name="author" content="Markus Hoenicka" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Homepage of the RefDB project, a reference manager and bibliography tool for structured texts" /> <link rel="stylesheet" type="text/css" href="refdbn.css" title="RefDB" media="screen, projection" /> <link rel="alternate stylesheet" type="text/css" href="refdbprint.css" title="Printer friendly" media="print, embossed, screen, projection" /> </head> <body> <!-- the page header, to be displayed across the top of the page --> <div id="head"> <div id="headleft"> <a href="http://refdb.sourceforge.net/"><img src="logo.jpg" alt="logo" border="0" /></a> </div> <div id="headright"> <table> <tbody> <tr> <td class="tag"><</td> <td class="graphic"> </td> <td class="tag">/></td> </tr> <tr> <td> </td> <td class="text">bibliographies beyond word processors</td> <td> </td> </tr> </tbody> </table> </div> </div> <div id="left"> <!-- the navigation box --> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Navigation</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="index.html">Home</a></td> </tr> <tr> <td class="navsel"> <p><a href="features.html">Features</a></p> <p class="level1"><a href="cli.html">CLI</a></p> <p class="level1"><a href="web.html">Web</a></p> <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> </td> </tr> <tr> <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> <td class="nav"><a href="doc.html">Documentation</a></td> </tr> <tr> <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> <td class="nav"> <p><a href="download.html">Download</a></p> <p class="level1"><a href="sysreq.html">Requirements</a></p> <p class="level1"><a href="install.html">Installation</a></p> </td> </tr> <tr> <td class="nav"><a href="addons.html">Add-ons</a></td> </tr> </tbody> </table> </div> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Links</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="http://www.sourceforge.net/projects/refdb">Project page</a></td> </tr> <tr> <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> </tr> <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> </tr> <tr> <td class="nav"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a></td> </tr> <tr> <td class="nav"><a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" border="0" /></a></td> </tr> </tbody> </table> </div> </div> <!-- the main text area, fills most of the page --> <div id="main"> <h1>RefDB Features: Emacs support</h1> <p>RefDB integrates nicely into Emacs. Combined with editing modes for SGML, XML, and RIS documents, you'll get an integrated authoring environment with direct access to your bibliographic data. "Cite-while-you-write", document transformation, and previewing is just a few mouseclicks away for DocBook SGML and XML as well as for TEI XML documents. Emacs support is not included in the RefDB sources, but available separately.</p> <div class="localnav"> <table class="localnav"> <thead> <tr> <td class="localnav">On this page</td> </tr> </thead> <tbody> <tr> <td class="localnav"><a href="#rismode">ris mode</a></td> </tr> <tr> <td class="localnav"><a href="#refdbmode">refdb mode</a></td> </tr> </tbody> </table> </div> <h2 id="rismode">ris mode</h2> <p class="authors">Author: Markus Hoenicka <mho...@us...></p> <p><strong><a href="addons/ris.el">Download ris.el (1.9)</a></strong></p> <p>If your editor of choice should be <a href="http://directory.fsf.org/emacs.html">Emacs</a> or <a href="http://www.xemacs.org/">XEmacs</a>, the RIS major mode (ris.el) will make editing RIS datasets a little bit more comfortable. Font-locking will help you to spot syntax errors. Especially the end tag (ER - ) is prone to lack the trailing space if you're not careful. The ris-mode displays valid tags in blue, except the special type (TY - ) and end (ER - ) tags which are shown in red. The tag contents are colored according to several criteria. If the contents of a field is limited in length, the color will extend only up to that limit. Author/editor, publication date, and reprint fields are checked for a valid content. ris-mode also provides the following commands:</p> <ul> <li><strong><code>insert-set</code> (C-c-C-s):</strong> inserts a new skeleton dataset (a "reference"). The function will prompt you to enter the publication type. You can use either the auto-completion feature of the minibuffer to enter a valid type or the history feature to select a previously entered type. The function will create a newline, a type tag with the type you selected, default sets of tags for a selected range of types, as well as an end tag.</li> <li><strong><code>insert-tag</code> ( C-c-C-t):</strong> insert a new tag. Use either the auto-completion feature of the minibuffer to enter a valid tag or the history feature to select a previously entered tag.</li> <li><strong><code>duplicate-tag</code> (M-RET):</strong> insert a new line below the current line with the same tag as the current line. This command is convenient if you add multiple keywords or authors, each of which have to go on separate tag lines.</li> <li><strong><code>backward-set</code> (C-x[) and <code>forward-set</code> (C-x]):</strong> move between RIS datasets.</li> <li><strong><code>narrow-to-set</code> (C-xns) and <code>widen</code> (C-xnw):</strong> narrow the buffer to the current RIS set and widen to the full buffer contents.</li> </ul> <p>The mode currently does not check the length of author entries, nor does it handle continued lines in any way. It does not attempt to check whether a reference is complete (e.g. it won't notify you if there is no author)</p> <p>To install this mode on your system, follow the instructions in the manual or in the elisp code.</p> <p class="legend"><img alt="Emacs ris-mode" src="screenshots/rismode.png"/></p> <p class="legend"><strong>Fig. 1:</strong> Emacs ris-mode. Click on the image to see a <a href="rismode.png">larger version</a>. The reference shows the effects of a few common syntax errors: (1) the last author has a space after the period, (2) the secondary publication date lacks the mandatory slashes, (3) the JF tag is misspelled, and (4) the ER tag lacks the trailing space. Note also that fields with unlimited length (like AD) and fields with limited length (like KW) are colored differently.</p> <h2 id="refdbmode">Emacs refdb-mode</h2> <p class="authors">Current Author: Markus Hoenicka <mho...@us...></p> <p><strong><a href="addons/refdb-mode.el">Download refdb-mode.el (1.15)</a></strong></p> <p>This minor mode for <a href="http://directory.fsf.org/emacs.html">Emacs</a> and <a href="http://www.xemacs.org/">XEmacs</a> is a frontend, and then some, for RefDB.</p> <ul> <li>It works nicely alongside the major modes ris-mode, <a href="http://www.thaiopensource.com/nxml-mode/">nxml-mode</a>, and <a href="http://sourceforge.net/projects/psgml/">PSGML</a>. refdb-mode can be automatically activated in these modes, and commands that return data in either of these formats set the appropriate mode automatically.</li> <li>It provides menu entries to add, update, delete, and search for references and notes. Retrieved references and notes in either RIS or risx format can be edited in place and subsequently be updated in the database.</li> <li>Queries using author names, periodical names, or keywords are simplified by tab-completion.</li> <li>You can run queries on a selected region. E.g. you can highlight a word or a phrase in the title of a reference and see whether references exist that use this word or phrase as a keyword.</li> <li>Reference data in formats that RefDB cannot natively import or generate can be converted by Chris Putnam's <a href="http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html">bibutils</a> via menu commands.</li> <li>A menu shows the databases that the current user has permissions to access.</li> <li>DocBook SGML and XML as well as TEI XML files can be created via the refdbnd script</li> <li>A set of commands allows to add citation elements in DocBook or TEI formats to the kill ring, containing one or more references returned by a previous query. These elements can then be yanked into your DocBook or TEI documents.</li> <li>These documents can be transformed to various output formats via menu commands, and the output can be viewed immediately in external viewers via the menu</li> <li>A full range of administrative commands helps the RefDB administrator to get his work done. This includes the control of the application server and shortcuts to edit the RefDB configuration files.Administration is simplified by tab-completion for filenames and for character encodings.</li> <li>Bibliographic styles can be added, retrieved, and directly edited.</li> </ul> <p>To install this mode on your system, follow the instructions in the elisp code.</p> <h3 id="refdbmode-getref">Retrieving references with Emacs</h3> <p class="legend"><img alt="Emacs refdb-mode" src="screenshots/refdb-mode-getref1.png"/></p> <p class="legend"><strong>Fig. 2:</strong> Emacs refdb-mode, showing the available menu commands to retrieve references. The two buffers show the result of retrieving references in risx format. The output buffer contains the data proper, which can be edited and validated using the automatically invoked nXML mode. The messages buffer contains the command summaries of the most recent commands. Click on the image to see a <a href="refdb-mode-getref1.png">larger version</a>.</p> <h3 id="refdbmode-getref">Retrieving references</h3> <p class="legend"><img alt="Emacs refdb-mode" src="screenshots/refdb-mode-getref-region.png"/></p> <p class="legend"><strong>Fig. 2:</strong> Emacs refdb-mode, showing the available menu commands to retrieve references. The two buffers show the result of retrieving references in risx format. The output buffer contains the data proper, which can be edited and validated using the automatically invoked nXML mode. The messages buffer contains the command summaries of the most recent commands.</p> <h3 id="refdbmode-getref-region">Retrieving references from a region</h3> <p class="legend"><img alt="Emacs refdb-mode getref on region" src="screenshots/refdb-mode-getref-region.png"/></p> <p class="legend"><strong>Fig. 3:</strong> You can mark any word or phrase while editing your document and see whether there is a matching reference in your RefDB database.</p> <h3 id="refdbmode-cite">Inserting citations</h3> <p class="legend"><img alt="Emacs insert citations" src="screenshots/refdb-mode-cite.png"/></p> <p class="legend"><strong>Fig. 4:</strong> Put the cursor somewhere into the reference you want to cite, or select a region containing the relevant citations. Then use one of the menu commands to insert a RefDB citation for DocBook or TEI into the kill ring. Back in your document, yank the citation. </p> <h3 id="refdbmode-convert">Converting bibliographic data</h3> <p class="legend"><img alt="Emacs refdb-mode data conversion" src="screenshots/refdb-mode-convert.png"/></p> <p class="legend"><strong>Fig. 5:</strong> refdb-mode offers commands to run the bibutils tools on the contents of the current buffer. This makes import of reference data not directly supported by RefDB a breeze. Shown here is the import of MODS data.</p> <h3 id="refdbmode-selectdb">Selecting databases</h3> <p class="legend"><img alt="Emacs refdb-mode database selection" src="screenshots/refdb-mode-selectdb1.png"/></p> <p class="legend"><strong>Fig. 6:</strong> Select one of the databases which you have access to from a convenient menu.</p> <h3 id="refdbmode-admin">Administering your RefDB installation</h3> <p class="legend"><img alt="Emacs refdb-mode administration" src="screenshots/refdb-mode-admin1.png"/></p> <p class="legend"><strong>Fig. 7:</strong> refdb-mode contains a complete interface to all administrative tasks.</p> </div> <!-- the footer, to be displayed across the page at the bottom --> <div id="foot"> <div id="footleft">$Date: 2005/10/06 22:16:54 $</div> <div id="footright">Copyright 2004 <a href="mailto:mho...@us...">Markus Hoenicka</a></div> </div> </body> </html> --- NEW FILE --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- $Id: vim.html,v 1.1 2005/10/06 22:16:54 mhoenicka Exp $ --> <head> <title>RefDB Features: Vim support</title> <meta name="author" content="Markus Hoenicka" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Homepage of the RefDB project, a reference manager and bibliography tool for structured texts" /> <link rel="stylesheet" type="text/css" href="refdbn.css" title="RefDB" media="screen, projection" /> <link rel="alternate stylesheet" type="text/css" href="refdbprint.css" title="Printer friendly" media="print, embossed, screen, projection" /> </head> <body> <!-- the page header, to be displayed across the top of the page --> <div id="head"> <div id="headleft"> <a href="http://refdb.sourceforge.net/"><img src="logo.jpg" alt="logo" border="0" /></a> </div> <div id="headright"> <table> <tbody> <tr> <td class="tag"><</td> <td class="graphic"> </td> <td class="tag">/></td> </tr> <tr> <td> </td> <td class="text">bibliographies beyond word processors</td> <td> </td> </tr> </tbody> </table> </div> </div> <div id="left"> <!-- the navigation box --> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Navigation</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="index.html">Home</a></td> </tr> <tr> <td class="navsel"> <p><a href="features.html">Features</a></p> <p class="level1"><a href="cli.html">CLI</a></p> <p class="level1"><a href="web.html">Web</a></p> <p class="level1"><a href="emacs.html">Emacs</a></p> <p class="level1"><a href="vim.html">Vim</a></p> </td> </tr> <tr> <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> <td class="nav"><a href="doc.html">Documentation</a></td> </tr> <tr> <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> <td class="nav"> <p><a href="download.html">Download</a></p> <p class="level1"><a href="sysreq.html">Requirements</a></p> <p class="level1"><a href="install.html">Installation</a></p> </td> </tr> <tr> <td class="nav"><a href="addons.html">Add-ons</a></td> </tr> </tbody> </table> </div> <div class="leftcontent"> <table class="nav"> <thead> <tr> <td class="nav">Links</td> </tr> </thead> <tbody> <tr> <td class="nav"><a href="http://www.sourceforge.net/projects/refdb">Project page</a></td> </tr> <tr> <td class="nav"><a href="http://cvs.sourceforge.net/viewcvs.py/refdb/">Project CVS</a></td> </tr> <tr> <td class="nav"><a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=26091&type=1" width="88" height="31" border="0" alt="SourceForge Logo" /></a></td> </tr> <tr> <td class="nav"><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" border="0" /></a></td> </tr> <tr> <td class="nav"><a href="http://jigsaw.w3.org/css-validator/"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" border="0" /></a></td> </tr> </tbody> </table> </div> </div> <!-- the main text area, fills most of the page --> <div id="main"> <h1>RefDB Features: Vim support</h1> <p>RefDB plays well with Vim. You'll get support for both editing of RIS bibliographic data and for your DocBook XML documents. Vim support is not included in the RefDB sources, but available separately.</p> <div class="localnav"> <table class="localnav"> <thead> <tr> <td class="localnav">On this page</td> </tr> </thead> <tbody> <tr> <td class="localnav"><a href="#vimdbxml">Vim and Docbook XML editing</a></td> </tr> <tr> <td class="localnav"><a href="#vimris">Vim and RIS editing</a></td> </tr> </tbody> </table> </div> <h2 id="vimdbxml">Vim and DocBook XML editing</h2> <p class="authors">Author: David Nebauer <dav...@sw...></p> <p><strong>Package: vim-docbk-xml-refdb (1.0) [<a href="source/vim-docbk-xml-refdb-1.0.tar.gz">source</a>, <a href="install.html#debian">deb</a>].</strong></p> <p><strong>Requires: imagemagick [<a href="http://www.imagemagick.org">web</a>, <a href="install.html#debian">deb</a>]; fop [<a href="http://xmlgraphics.apache.org/fop/">web</a>, <a href="install.html#debian">deb</a>]; xmllint [<a href="http://xmlsoft.org/xmllint.html">web</a>, <a href="install.html#debian">deb</a>]; xsltproc [<a href="http://xmlsoft.org/XSLT/xsltproc2.html">web</a>, <a href="install.html#debian">deb</a>]; libgetopt-declare-perl <a href="http://search.cpan.org/~dconway/Getopt-Declare-1.11/lib/Getopt/Declare.pm">web</a>, <a href="install.html#debian">deb</a>]; refdb-cache (1.0) [<a href="source/refdb-cache-1.0.tar.gz">source</a>, <a href="install.html#debian">deb</a>]; libperl-refdb-cache (1.0) [<a href="source/libperl-refdb-cache-1.0.tar.gz">source</a>, <a href="install.html#debian">deb</a>].</strong></p> <p>If <a href="http://www.vim.org">Vim</a> is the editor of your choice, this package installs the syntax, filetype and plugin files that enable you to edit DocBook XML files.</p> <p>The plugin has a rather extensive list of dependencies as it interacts with a great many components in order to perform all its functions. For example, in order to create and view PDF and (X)HTML output it must use an XML validator (xmllint), an XSLT processor (xsltproc), a FO processor (fop), an HTML viewer and a PDF viewer. There are other dependencies which are not listed as they are commonly available on most *nix systems. For further information on dependencies unpack the source archive, read the README file and type <em>./configure --help</em>. Debian users need only select the primary package and the rest will happen automagically</p> <p>While this suite consists of a number of components, all its functionality is exposed as keystroke mappings. All mappings (except special characters) are available via the DocBook menu (menus can be accessed from console vim â see vim help topic 'console-menus').</p> <p>The source distribution can be built with support for multiple XSLT processors (xsltproc, Saxon, Xalan), FO processors (FOP, Xep), xml validators (xmllint, RXP) and, of course, RefDB.</p> <p>The Debian package has a minimal configuration with support for only one XSLT processor (xsltproc), one FO processor (Fop), one xml validator (xmllint) and RefDB.</p> <p>Here is an overview of the functionality supplied by the plugin:</p> <ul> <li>A skeleton document structure can be generated. The user will be prompted to supply some details such as author name and document title.</li> <li>There are mappings for major document divisions: chapter, section and sect1|2|3.</li> <li>Minor structures can also be generated: para, comment, (strong) emphasis, footnote, blockquote, filename, verbatim, note, index term, glossary term, warning, sidebar and example. The user is generally prompted to enter the text to be enclosed by the structure. Some of these mappings work in visual mode, where the selected text will be "wrapped" by the structure.</li> <li>A mapping is supplied to insert a filepath. The user selects the file from a file selector dialog box. The user can choose whether to insert an absolute or relative filepath.</li> <li>A number of mappings are supplied for certain characters that are represented by character entities: ampersand (&), quote marks ('|"), angle brackets (<|>), em and en dashes (—|–), ellipses (…) and non-breaking spaces ( ). When the user types a single or double quote mark ('|") the corresponding character entity (“|‘|’|”) is chosen intelligently. Alternative mappings are supplied for inserting single and double straight quote mark character entities, and for inserting raw single and double quote marks. A mapping is supplied for "raw" ampersands.</li> <li>Cross-references and hyperlinks can be inserted into the document. For cross-references the user is presented with a list of element IDs to choose from.</li> <li>Support for lists (itemised, ordered and variable type) is supplied.</li> <li>Tables and images can be inserted. The user is prompted to supply required information such as numbers of rows and columns for tables and image file, captions and titles for images.</li> <li>A mapping is supplied that enables users to jump to a selected element (chosen from a menu of available element IDs).</li> <li>Document validation is only a mapping away.</li> <li>Output as html, xhtml, pdf and text is generated by certain mappings. The resulting output is opened in an external viewer.</li> <li>Various RefDB functions are supported when editing RefDB-created documents. The user can create, edit and delete references from within Vim. References from the current document can be displayed (either all or a subset). The user can change the current document's associated database and/or stylesheet. Finally, citations from the current reference database can be selected and inserted.</li> <li>Various help is available via mappings. Help on mappings is available (<Leader>hh). In addition, help on individual docbook elements can be displayed. The user requests help on either the previous or next element and the relevant page from Walsh and Muellner's <em>DocBook: The Definitive Guide</em> is opened in an external html viewer. A summary of document structure can also be displayed.</li> </ul> <p class="legend"><a href="vimdbxml-menus-01.png"><img alt="Vim DocBook XML Menus" src="vimdbxml-menus-01-small.png"/></a></p> <p class="legend"><strong>Fig. 4:</strong> GVim editing a DocBook XML file. All the DocBook XML supplied menus are being displayed (they have been "torn off"). The left-most menu is the parent menu. The citations (RefDB) menu is seen on the far right. Note that users of console vim also have access to these menus (see vim help topic 'console-menus'. Click on the image to see a <a href="vimdbxml-menus-01-small.png">larger version</a>.</p> <h2 id="vimris">Vim and RIS editing</h2> <p class="authors">Author: David Nebauer <dav...@sw...></p> <p><strong>Package: vim-ris (1.1) [<a href="source/vim-ris-1.1.tar.gz">source</a>, <a href="install.html#debian">deb</a>].</strong></p> <p>If <a href="http://www.vim.org">Vim</a> is the editor of your choice, this package installs the syntax, filetype and plugin files that enable you to edit RIS files.</p> <ul> <li>The syntax file enables Vim to highlight legal tags and mark illegal tags as errors.</li> <li>It also highlights correct field values, thus helping users to avoid invalid field values.</li> <li>It checks the syntax of author names, dates and journal abbreviation fields.</li> <li>It checks the values in reprint and pubtype fields.</li> <li>It checks the length of length-limited fields and does some other rudimentary error checking.</li> </ul> <p>What the syntax file does <em>not</em> currently do is handle line continuations ('/$') -- it assumes all fields are a single line</p> <p>The plugin file supplies five convenience commands mapped to keyboard shortcuts:</p> <ul> <li>\a = insert RIS tag (select from menu)</li> <li>\p = insert publication type (select from menu)</li> <li>\r = insert reprint status</li> <li>\d = duplicate current/previous tag</li> <li>\t = add reference template (group of blank tags; choose from three templates: journal|book|other)</li> </ul> <p class="legend"><a href="vimris-01.png"><img alt="Vim editing RIS" src="vimris-01-small.jpg"/></a></p> <p class="legend"><strong>Fig. 5:</strong> Vim editing RIS. Click on the image to see a <a href="vimris-01.png">larger version</a>. The image shows how Vim spots a few common syntax errors: (1) the second author uses a space after the comma, (2) the publication date lacks the mandatory slashes, and (3) the end tag lacks the trailing space.</p> </div> <!-- the footer, to be displayed across the page at the bottom --> <div id="foot"> <div id="footleft">$Date: 2005/10/06 22:16:54 $</div> <div id="footright">Copyright 2004 <a href="mailto:mho...@us...">Markus Hoenicka</a></div> </div> </body> </html> |
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2119 Modified Files: addons.html doc.html download.html examples.html features.html index.html install.html refdbn.css status.html sysreq.html Log Message: rearranged stuff Index: addons.html =================================================================== RCS file: /cvsroot/refdb/homepage/addons.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -U2 -r1.10 -r1.11 --- addons.html 29 Sep 2005 13:56:29 -0000 1.10 +++ addons.html 6 Oct 2005 22:15:24 -0000 1.11 @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="features.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,11 +68,15 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="nav"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> - <td class="navsel">Add-ons</td> + <td class="navsel"><a href="addons.html">Add-ons</a></td> </tr> </tbody> @@ -113,6 +120,6 @@ <div id="main"> <h1>RefDB add-ons</h1> - <p>Useful software which is not packaged with RefDB but which greatly enhances your experience is available from this page. There are RIS editing modes for Emacs and for Vim (remember that you can use any run-of-the-mill XML mode or XML editor for editing risx files), a RefDB frontend for Emacs, a DocBook XML editing mode for Vim that includes numerous RefDB-related functions, a script to write bibliography styles from scratch, and a Client module for Perl programmers.</p> - <p>Note that most add-ons are available as <a id="install.html#debian">Debian packages</a>.</p> + <p>Useful software which is not packaged with RefDB but which greatly enhances your experience is available from this page. There are a script to write bibliography styles from scratch, and a Client module for Perl programmers.</p> + <p>Note that most add-ons are available as <a href="install.html#debian">Debian packages</a>.</p> <div class="localnav"> @@ -125,19 +132,7 @@ <tbody> <tr> - <td class="localnav"><a href="#ris-mode">Emacs ris-mode</a></td> - </tr> - <tr> - <td class="localnav"><a href="#refdb-mode">Emacs refdb-mode</a></td> - </tr> - <tr> <td class="localnav"><a href="#makestyle">Makestyle (bibliography style generator)</a></td> </tr> <tr> - <td class="localnav"><a href="#vimdbxml">Vim and DocBook XML editing</a></td> - </tr> - <tr> - <td class="localnav"><a href="#vimris">Vim and RIS editing</a></td> - </tr> - <tr> <td class="localnav"><a href="#perlmod">Perl client module</a></td> </tr> @@ -146,72 +141,4 @@ </div> - <h2 id="ris-mode">Emacs ris-mode</h2> - <p class="authors">Author: Markus Hoenicka <mho...@us...></p> - <p><strong><a href="addons/ris.el">Download ris.el (1.9)</a></strong></p> - <p>If your editor of choice should be <a href="http://directory.fsf.org/emacs.html">Emacs</a> or <a href="http://www.xemacs.org/">XEmacs</a>, the RIS major mode (ris.el) will make editing RIS datasets a little bit more comfortable. Font-locking will help you to spot syntax errors. Especially the end tag (ER - ) is prone to lack the trailing space if you're not careful. The ris-mode displays valid tags in blue, except the special type (TY - ) and end (ER - ) tags which are shown in red. The tag contents are colored according to several criteria. If the contents of a field is limited in length, the color will extend only up to that limit. Author/editor, publication date, and reprint fields are checked for a valid content. ris-mode also provides the following commands:</p> - - <ul> - <li><strong><code>insert-set</code> (C-c-C-s):</strong> inserts a new skeleton dataset (a "reference"). The function will prompt you to enter the publication type. You can use either the auto-completion feature of the minibuffer to enter a valid type or the history feature to select a previously entered type. The function will create a newline, a type tag with the type you selected, default sets of tags for a selected range of types, as well as an end tag.</li> - <li><strong><code>insert-tag</code> ( C-c-C-t):</strong> insert a new tag. Use either the auto-completion feature of the minibuffer to enter a valid tag or the history feature to select a previously entered tag.</li> - <li><strong><code>duplicate-tag</code> (M-RET):</strong> insert a new line below the current line with the same tag as the current line. This command is convenient if you add multiple keywords or authors, each of which have to go on separate tag lines.</li> - <li><strong><code>backward-set</code> (C-x[) and <code>forward-set</code> (C-x]):</strong> move between RIS datasets.</li> - <li><strong><code>narrow-to-set</code> (C-xns) and <code>widen</code> (C-xnw):</strong> narrow the buffer to the current RIS set and widen to the full buffer contents.</li> - </ul> - - <p>The mode currently does not check the length of author entries, nor does it handle continued lines in any way. It does not attempt to check whether a reference is complete (e.g. it won't notify you if there is no author)</p> - - <p>To install this mode on your system, follow the instructions in the manual or in the elisp code.</p> - - <p class="legend"><a href="rismode.png"><img alt="Emacs ris-mode" src="rismode-small.jpg"/></a></p> - <p class="legend"><strong>Fig. 1:</strong> Emacs ris-mode. Click on the image to see a <a href="rismode.png">larger version</a>. The reference shows the effects of a few common syntax errors: (1) the last author has a space after the period, (2) the secondary publication date lacks the mandatory slashes, (3) the JF tag is misspelled, and (4) the ER tag lacks the trailing space. Note also that fields with unlimited length (like AD) and fields with limited length (like KW) are colored differently.</p> - - - <h2 id="refdb-mode">Emacs refdb-mode</h2> - <p class="authors">Current Author: Markus Hoenicka <mho...@us...></p> - <p><strong><a href="addons/refdb-mode.el">Download refdb-mode.el (1.15)</a></strong></p> - <p>This minor mode for <a href="http://directory.fsf.org/emacs.html">Emacs</a> and <a href="http://www.xemacs.org/">XEmacs</a> is a frontend, and then some, for RefDB.</p> - <ul> - <li>It works nicely alongside the major modes ris-mode, <a href="http://www.thaiopensource.com/nxml-mode/">nxml-mode</a>, and <a href="http://sourceforge.net/projects/psgml/">PSGML</a>. refdb-mode can be automatically activated in these modes, and commands that return data in either of these formats set the appropriate mode automatically.</li> - <li>It provides menu entries to add, update, delete, and search for references and notes. Retrieved references and notes in either RIS or risx format can be edited in place and subsequently be updated in the database.</li> - <li>Queries using author names, periodical names, or keywords are simplified by tab-completion.</li> - <li>You can run queries on a selected region. E.g. you can highlight a word or a phrase in the title of a reference and see whether references exist that use this word or phrase as a keyword.</li> - <li>Reference data in formats that RefDB cannot natively import or generate can be converted by Chris Putnam's <a href="http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html">bibutils</a> via menu commands.</li> - <li>A menu shows the databases that the current user has permissions to access.</li> - <li>DocBook SGML and XML as well as TEI XML files can be created via the refdbnd script</li> - <li>A set of commands allows to add citation elements in DocBook or TEI formats to the kill ring, containing one or more references returned by a previous query. These elements can then be yanked into your DocBook or TEI documents.</li> - <li>These documents can be transformed to various output formats via menu commands, and the output can be viewed immediately in external viewers via the menu</li> - <li>A full range of administrative commands helps the RefDB administrator to get his work done. This includes the control of the application server and shortcuts to edit the RefDB configuration files.Administration is simplified by tab-completion for filenames and for character encodings.</li> - <li>Bibliographic styles can be added, retrieved, and directly edited.</li> - </ul> - - <p>To install this mode on your system, follow the instructions in the elisp code.</p> - - - - <p class="legend"><a href="refdb-mode-getref1.png"><img alt="Emacs refdb-mode" src="refdb-mode-getref1-small.jpg"/></a></p> - <p class="legend"><strong>Fig. 2a:</strong> Emacs refdb-mode, showing the available menu commands to retrieve references. The two buffers show the result of retrieving references in risx format. The output buffer contains the data proper, which can be edited and validated using the automatically invoked nXML mode. The messages buffer contains the command summaries of the most recent commands. Click on the image to see a <a href="refdb-mode-getref1.png">larger version</a>.</p> - - <table summary="refdb-mode screenshots"> - <tr valign="bottom"> - <td><a href="refdb-mode-getref-region.png"><img alt="Emacs refdb-mode" src="refdb-mode-getref-region-tiny.jpg"/></a> - </td> - <td><a href="refdb-mode-cite.png"><img alt="Emacs refdb-mode" src="refdb-mode-cite-tiny.jpg"/></a> - </td> - <td><a href="refdb-mode-selectdb1.png"><img alt="Emacs refdb-mode" src="refdb-mode-selectdb1-tiny.jpg"/></a> - </td> - <td><a href="refdb-mode-convert.png"><img alt="Emacs refdb-mode" src="refdb-mode-convert-tiny.jpg"/></a> - </td> - <td><a href="refdb-mode-admin1.png"><img alt="Emacs refdb-mode" src="refdb-mode-admin1-tiny.jpg"/></a> - </td> - </tr> - <tr valign="top"> - <td class="legend"><strong>Fig 2b: </strong>Use a marked region of text as a query string</td> - <td class="legend"><strong>Fig 2c: </strong>Create citation elements from the results of a query.</td> - <td class="legend"><strong>Fig 2d: </strong>Select from the list of available databases.</td> - <td class="legend"><strong>Fig 2e: </strong>Import external reference data, like the MODS dataset shown here.</td> - <td class="legend"><strong>Fig 2f: </strong>The administrative commands.</td> - </tr> - </table> - <h2 id="makestyle">Makestyle (bibliography style generator)</h2> <p class="authors">Author: David Nebauer <dav...@sw...></p> @@ -223,59 +150,4 @@ <p class="legend"><strong>Fig. 3:</strong> Creating a bibliography style with refdb-ms. Click on the image to see a <a href="makestyle-01.png">larger version</a>. The script walks you through the process of writing a style by providing valid entries at the current point along with an explanation of what each element is good for.</p> - <h2 id="vimdbxml">Vim and DocBook XML editing</h2> - <p class="authors">Author: David Nebauer <dav...@sw...></p> - <p><strong>Package: vim-docbk-xml-refdb (1.0) [<a href="source/vim-docbk-xml-refdb-1.0.tar.gz">source</a>, <a href="install.html#debian">deb</a>].</strong></p> - <p><strong>Requires: imagemagick [<a href="http://www.imagemagick.org">web</a>, <a href="install.html#debian">deb</a>]; fop [<a href="http://xmlgraphics.apache.org/fop/">web</a>, <a href="install.html#debian">deb</a>]; xmllint [<a href="http://xmlsoft.org/xmllint.html">web</a>, <a href="install.html#debian">deb</a>]; xsltproc [<a href="http://xmlsoft.org/XSLT/xsltproc2.html">web</a>, <a href="install.html#debian">deb</a>]; libgetopt-declare-perl <a href="http://search.cpan.org/~dconway/Getopt-Declare-1.11/lib/Getopt/Declare.pm">web</a>, <a href="install.html#debian">deb</a>]; refdb-cache (1.0) [<a href="source/refdb-cache-1.0.tar.gz">source</a>, <a href="install.html#debian">deb</a>]; libperl-refdb-cache (1.0) [<a href="source/libperl-refdb-cache-1.0.tar.gz">source</a>, <a href="install.html#debian">deb</a>].</strong></p> - <p>If <a href="http://www.vim.org">Vim</a> is the editor of your choice, this package installs the syntax, filetype and plugin files that enable you to edit DocBook XML files.</p> - <p>The plugin has a rather extensive list of dependencies as it interacts with a great many components in order to perform all its functions. For example, in order to create and view PDF and (X)HTML output it must use an XML validator (xmllint), an XSLT processor (xsltproc), a FO processor (fop), an HTML viewer and a PDF viewer. There are other dependencies which are not listed as they are commonly available on most *nix systems. For further information on dependencies unpack the source archive, read the README file and type <em>./configure --help</em>. Debian users need only select the primary package and the rest will happen automagically</p> - <p>While this suite consists of a number of components, all its functionality is exposed as keystroke mappings. All mappings (except special characters) are available via the DocBook menu (menus can be accessed from console vim â see vim help topic 'console-menus').</p> - <p>The source distribution can be built with support for multiple XSLT processors (xsltproc, Saxon, Xalan), FO processors (FOP, Xep), xml validators (xmllint, RXP) and, of course, RefDB.</p> - <p>The Debian package has a minimal configuration with support for only one XSLT processor (xsltproc), one FO processor (Fop), one xml validator (xmllint) and RefDB.</p> - <p>Here is an overview of the functionality supplied by the plugin:</p> - <ul> - <li>A skeleton document structure can be generated. The user will be prompted to supply some details such as author name and document title.</li> - <li>There are mappings for major document divisions: chapter, section and sect1|2|3.</li> - <li>Minor structures can also be generated: para, comment, (strong) emphasis, footnote, blockquote, filename, verbatim, note, index term, glossary term, warning, sidebar and example. The user is generally prompted to enter the text to be enclosed by the structure. Some of these mappings work in visual mode, where the selected text will be "wrapped" by the structure.</li> - <li>A mapping is supplied to insert a filepath. The user selects the file from a file selector dialog box. The user can choose whether to insert an absolute or relative filepath.</li> - <li>A number of mappings are supplied for certain characters that are represented by character entities: ampersand (&), quote marks ('|"), angle brackets (<|>), em and en dashes (—|–), ellipses (…) and non-breaking spaces ( ). When the user types a single or double quote mark ('|") the corresponding character entity (“|‘|’|”) is chosen intelligently. Alternative mappings are supplied for inserting single and double straight quote mark character entities, and for inserting raw single and double quote marks. A mapping is supplied for "raw" ampersands.</li> - <li>Cross-references and hyperlinks can be inserted into the document. For cross-references the user is presented with a list of element IDs to choose from.</li> - <li>Support for lists (itemised, ordered and variable type) is supplied.</li> - <li>Tables and images can be inserted. The user is prompted to supply required information such as numbers of rows and columns for tables and image file, captions and titles for images.</li> - <li>A mapping is supplied that enables users to jump to a selected element (chosen from a menu of available element IDs).</li> - <li>Document validation is only a mapping away.</li> - <li>Output as html, xhtml, pdf and text is generated by certain mappings. The resulting output is opened in an external viewer.</li> - <li>Various RefDB functions are supported when editing RefDB-created documents. The user can create, edit and delete references from within Vim. References from the current document can be displayed (either all or a subset). The user can change the current document's associated database and/or stylesheet. Finally, citations from the current reference database can be selected and inserted.</li> - <li>Various help is available via mappings. Help on mappings is available (<Leader>hh). In addition, help on individual docbook elements can be displayed. The user requests help on either the previous or next element and the relevant page from Walsh and Muellner's <em>DocBook: The Definitive Guide</em> is opened in an external html viewer. A summary of document structure can also be displayed.</li> - </ul> - - <p class="legend"><a href="vimdbxml-menus-01.png"><img alt="Vim DocBook XML Menus" src="vimdbxml-menus-01-small.png"/></a></p> - <p class="legend"><strong>Fig. 4:</strong> GVim editing a DocBook XML file. All the DocBook XML supplied menus are being displayed (they have been "torn off"). The left-most menu is the parent menu. The citations (RefDB) menu is seen on the far right. Note that users of console vim also have access to these menus (see vim help topic 'console-menus'. Click on the image to see a <a href="vimdbxml-menus-01-small.png">larger version</a>.</p> - - <h2 id="vimris">Vim and RIS editing</h2> - <p class="authors">Author: David Nebauer <dav...@sw...></p> - <p><strong>Package: vim-ris (1.1) [<a href="source/vim-ris-1.1.tar.gz">source</a>, <a href="install.html#debian">deb</a>].</strong></p> - <p>If <a href="http://www.vim.org">Vim</a> is the editor of your choice, this package installs the syntax, filetype and plugin files that enable you to edit RIS files.</p> - <ul> - <li>The syntax file enables Vim to highlight legal tags and mark illegal tags as errors.</li> - <li>It also highlights correct field values, thus helping users to avoid invalid field values.</li> - <li>It checks the syntax of author names, dates and journal abbreviation fields.</li> - <li>It checks the values in reprint and pubtype fields.</li> - <li>It checks the length of length-limited fields and does some other rudimentary error checking.</li> - </ul> - - <p>What the syntax file does <em>not</em> currently do is handle line continuations ('/$') -- it assumes all fields are a single line</p> - - <p>The plugin file supplies five convenience commands mapped to keyboard shortcuts:</p> - <ul> - <li>\a = insert RIS tag (select from menu)</li> - <li>\p = insert publication type (select from menu)</li> - <li>\r = insert reprint status</li> - <li>\d = duplicate current/previous tag</li> - <li>\t = add reference template (group of blank tags; choose from three templates: journal|book|other)</li> - </ul> - - <p class="legend"><a href="vimris-01.png"><img alt="Vim editing RIS" src="vimris-01-small.jpg"/></a></p> - <p class="legend"><strong>Fig. 5:</strong> Vim editing RIS. Click on the image to see a <a href="vimris-01.png">larger version</a>. The image shows how Vim spots a few common syntax errors: (1) the second author uses a space after the comma, (2) the publication date lacks the mandatory slashes, and (3) the end tag lacks the trailing space.</p> - <h2 id="perlmod">Perl client module</h2> <p class="authors">Author: Markus Hoenicka <mho...@us...></p> Index: doc.html =================================================================== RCS file: /cvsroot/refdb/homepage/doc.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -U2 -r1.6 -r1.7 --- doc.html 25 Jun 2005 23:38:46 -0000 1.6 +++ doc.html 6 Oct 2005 22:15:25 -0000 1.7 @@ -53,20 +53,27 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> - <td class="navsel">Documentation</td> + <td class="navsel"><a href="doc.html">Documentation</a></td> </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="nav"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> Index: download.html =================================================================== RCS file: /cvsroot/refdb/homepage/download.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -U2 -r1.12 -r1.13 --- download.html 3 Oct 2005 12:17:42 -0000 1.12 +++ download.html 6 Oct 2005 22:15:25 -0000 1.13 @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="navsel">Download</td> + <td class="navsel"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> @@ -170,5 +177,5 @@ <h2 id="debian">Debian packages</h2> - <p>Debian repositories for RefDB deb packages are now available at <a href="http://refdb.sourceforge.net">refdb.sourceforge.net</a>. Instructions for installing from them are available <a id="install.html#debian">here</a>.</p> + <p>Debian repositories for RefDB deb packages are now available at <a href="http://refdb.sourceforge.net">refdb.sourceforge.net</a>. Instructions for installing from them are available <a href="install.html#debian">here</a>.</p> <h2 id="freebsd">FreeBSD port</h2> Index: examples.html =================================================================== RCS file: /cvsroot/refdb/homepage/examples.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -U2 -r1.6 -r1.7 --- examples.html 25 Jun 2005 23:38:46 -0000 1.6 +++ examples.html 6 Oct 2005 22:15:25 -0000 1.7 @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="navsel"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="navsel">Examples</td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="nav"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> Index: features.html =================================================================== RCS file: /cvsroot/refdb/homepage/features.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -U2 -r1.5 -r1.6 --- features.html 25 Jun 2005 23:38:46 -0000 1.5 +++ features.html 6 Oct 2005 22:15:25 -0000 1.6 @@ -53,11 +53,14 @@ </tr> <tr> - <td class="navsel">Features</td> + <td class="navsel"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="nav"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> @@ -151,5 +158,6 @@ <li>RefDB is a reference/notes database and bibliography tool for SGML, XML, and LaTeX documents.</li> <li>RefDB is mainly implemented in C, with a few Perl scripts inbetween, as well as shell scripts as "glue". It can be compiled on all platforms with a decent C compiler (a small amount of porting may be required). It builds and runs out of the box on Linux, FreeBSD, NetBSD, Solaris, OSX, Darwin, and Windows/<a href="http://www.cygwin.com">Cygwin</a>.</li> - <li>The <a href="doc.html#manual">RefDB handbook</a> (more than 250 printed pages) helps you to get RefDB up and running quickly and explains how to use the software for both administrators and users in great detail. In addition there is a <a href="doc.html#tutorial">tutorial</a> targeted at plain users.</li> + <li>RefDB is modular and accessible. You can plug in a variety of database engines to store your data, and you can choose between a variety of interfaces for interactive work. You can use RefDB in your projects through shell scripts or from Perl programs.</li> + <li>The <a href="doc.html#manual">RefDB handbook</a> (more than 300 printed pages) helps you to get RefDB up and running quickly and explains how to use the software for both administrators and users in great detail. In addition there is a <a href="doc.html#tutorial">tutorial</a> targeted at plain users.</li> </ul> @@ -159,9 +167,6 @@ <li>Both reference and bibliography style databases use the relational features of SQL databases extensively to consolidate information and to save storage space.</li> <li>RefDB employs a three-tier architecture with lots of flexibility: clients, an application server that can run as a daemon, and the database server. If you prefer the embedded SQL engine, there'll be a two-tier setup. In both cases, all tiers may run on a single workstation for individual use.</li> - <li>All clients and the application server can generate log messages to monitor their operation.</li> - <li>There are three command-line clients for reference management, administration, and bibliography generation.</li> - <li>All clients can run in an interactive mode (much like a console FTP client) and in a batch mode for scripting purposes.</li> - <li>In addition there is a built-in web interface for the most common reference management operations. A far better PHP-based interface is currently under development, see <a href="http://sourceforge.net/forum/forum.php?forum_id=428195">this announcement</a></li> - <li>RefDB is extensible in terms of clients: clients (even graphical ones) can be written in any language that supports talking in plain text to a port. A Perl module for rapid development of custom clients is available.</li> + <li>The application server can generate log messages to monitor its operation.</li> + <li>RefDB contains two standard interfaces: a <a href="cli.html">command line interface</a> for terminal addicts and for use in scripts, and a PHP-based <a href="web.html">web interface</a> for a more visual approach. In addition, both <a href="emacs.html">Emacs</a> and <a href="vim.html">Vim</a> users can access RefDB from the editing environment they're used to. Finally, there is also a <a href="addons.html">Perl client module</a> to integrate RefDB functionality into your own Perl programs.</li> </ul> @@ -192,5 +197,5 @@ <ul> <li>Due to the client/server design, RefDB is very well suited as a shared reference database for a workgroup or a department. However, it runs just fine on a single standalone workstation.</li> - <li>Users can share databases and still have their personal reference lists.</li> + <li>Users can share databases and still have their personal reference lists. They can share their notes or keep them private on a per-note base.</li> <li>Concurrent read and write access of several users is supported. There is no need to restrict access of other users to read-only. However, if your database engine supports access control (MySQL and PostgreSQL), you <em>can</em> restrict access of some users to read-only.</li> <li>A simple method to access electronic offprints (e.g. in PDF or PostScript format) is provided in the HTML output and in the web interface. This also works across networks using mounted shares.</li> @@ -206,5 +211,5 @@ <p>The following embedded database engines are supported:</p> <ul> - <li><a href="http://www.sqlite.org">SQLite</a></li> + <li><a href="http://www.sqlite.org">SQLite</a> (versions 2.x and 3.x)</li> </ul> <p>RefDB versions prior to 0.9 use <a href="http://www.mysql.com">MySQL</a> as the SQL engine.</p> Index: index.html =================================================================== RCS file: /cvsroot/refdb/homepage/index.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -U2 -r1.7 -r1.8 --- index.html 25 Jun 2005 23:38:46 -0000 1.7 +++ index.html 6 Oct 2005 22:15:25 -0000 1.8 @@ -2,5 +2,5 @@ <html xmlns="http://www.w3.org/1999/xhtml"> - <!-- $Id --> + <!-- $Id$ --> <head> @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="nav"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> Index: install.html =================================================================== RCS file: /cvsroot/refdb/homepage/install.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -U2 -r1.2 -r1.3 --- install.html 3 Oct 2005 12:21:40 -0000 1.2 +++ install.html 6 Oct 2005 22:15:25 -0000 1.3 @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="navsel">Download</td> + <td class="navsel"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> Index: refdbn.css =================================================================== RCS file: /cvsroot/refdb/homepage/refdbn.css,v retrieving revision 1.3 retrieving revision 1.4 diff -u -U2 -r1.3 -r1.4 --- refdbn.css 13 Jun 2005 19:55:48 -0000 1.3 +++ refdbn.css 6 Oct 2005 22:15:25 -0000 1.4 @@ -122,7 +122,8 @@ border-width: 2px; border-color: #275e97; - line-height: 120%; +/* line-height: 50%; */ background-color: #0eecf1; margin-bottom: 10px; + font-size: small; } thead td.nav { @@ -146,4 +147,10 @@ color: #01052a; } +tbody td p { + line-height: 30%; +} +tbody td p.level1 { + padding-left:10pt; +} div.localnav { width: 25%; @@ -193,4 +200,8 @@ font-family: "Courier New",Courier,Lucidatypewriter,"Lucida Console","Bitstream Vera Sans Mono",Terminal, Fixed, mono; } +code.refdbapp { + color: #275e97; + font-weight: bold; +} pre.source { font-family: "Courier New",Courier,Lucidatypewriter,"Lucida Console","Bitstream Vera Sans Mono",Terminal, Fixed, mono; Index: status.html =================================================================== RCS file: /cvsroot/refdb/homepage/status.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -U2 -r1.2 -r1.3 --- status.html 8 May 2005 21:24:33 -0000 1.2 +++ status.html 6 Oct 2005 22:15:25 -0000 1.3 @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="nav"><a href="sysreq.html">System requirements</a></td> - </tr> - <tr> - <td class="navsel">Current Status</td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="navsel"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="nav"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> Index: sysreq.html =================================================================== RCS file: /cvsroot/refdb/homepage/sysreq.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -U2 -r1.4 -r1.5 --- sysreq.html 25 Jun 2005 23:38:46 -0000 1.4 +++ sysreq.html 6 Oct 2005 22:15:25 -0000 1.5 @@ -5,5 +5,5 @@ <head> - <title>RefDB System Requirements</title> + <title>RefDB Download: system requirements</title> <meta name="author" content="Markus Hoenicka" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> @@ -53,11 +53,14 @@ </tr> <tr> - <td class="nav"><a href="features.html">Features</a></td> + <td class="nav"> + <p><a href="features.html">Features</a></p> + <p class="level1"><a href="cli.html">CLI</a></p> + <p class="level1"><a href="web.html">Web</a></p> + <p class="level1"><a href="emacs.html">Emacs</a></p> + <p class="level1"><a href="vim.html">Vim</a></p> + </td> </tr> <tr> - <td class="navsel">System requirements</td> - </tr> - <tr> - <td class="nav"><a href="status.html">Current Status</a></td> + <td class="nav"><a href="examples.html">Examples</a></td> </tr> <tr> @@ -65,8 +68,12 @@ </tr> <tr> - <td class="nav"><a href="examples.html">Examples</a></td> + <td class="nav"><a href="status.html">Current Status</a></td> </tr> <tr> - <td class="nav"><a href="download.html">Download</a></td> + <td class="navsel"> + <p><a href="download.html">Download</a></p> + <p class="level1"><a href="sysreq.html">Requirements</a></p> + <p class="level1"><a href="install.html">Installation</a></p> + </td> </tr> <tr> @@ -112,5 +119,5 @@ <!-- the main text area, fills most of the page --> <div id="main"> - <h1>RefDB System Requirements</h1> + <h1>RefDB Download: system requirements</h1> <p>RefDB is designed to run on Unix-like operating systems. <a href="http://www.linux.org">Linux</a>, <a href="http://www.freebsd.org">FreeBSD</a>, <a href="http://www.netbsd.org">NetBSD</a>, <a href="http://www.sun.com/software/solaris/">SunOS/Solaris</a>, <a href="http://www.apple.com/macosx/">OSX</a>/<a href="http://developer.apple.com/darwin/">Darwin</a>, and <a href="http://www.microsoft.com/windows/default.mspx">Windows</a>/<a href="http://www.cygwin.com">Cygwin</a> are supported out of the tarball, and other BSD or SysV-derived systems may work just fine. It relies on a few external programs and libraries. The following list explains what else you'll need and where to get it from. Please refer to the <a href="doc.html#manual">manual</a> for specific installation and setup instructions.</p> |
From: David N. <dav...@us...> - 2005-10-03 12:27:23
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18262 Removed Files: addons-debian.html Log Message: Moved Debian instructions to 'install.html' --- addons-debian.html DELETED --- |
From: David N. <dav...@us...> - 2005-10-03 12:21:47
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16851 Modified Files: install.html Log Message: Debian repositories now include support for stable distribution Index: install.html =================================================================== RCS file: /cvsroot/refdb/homepage/install.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -U2 -r1.1 -r1.2 --- install.html 29 Sep 2005 13:55:43 -0000 1.1 +++ install.html 3 Oct 2005 12:21:40 -0000 1.2 @@ -157,5 +157,5 @@ <h2 id="debian">Debian</h2> <p>The Debian packages ("debs") supplied for the RefDB project are made available from repositories hosted on the RefDB website. These repositories are made known to Debian's package management tools by adding lines to the <code>/etc/apt/sources.list</code> file (requires root access). Users unfamiliar with this process should examine the manpages for their package management tool as well as the output from <code>man sources.list</code>.</p> - <p>In the following examples you must replace <em>distro</em> with either <em>testing</em> or <em>unstable</em> depending on the Debian distribution you are using. The <em>stable</em> distribution is not supported.</p> + <p>In the following examples you must replace <em>distro</em> with <em>stable</em>, <em>testing</em> or <em>unstable</em> depending on the Debian distribution you are using.</p> <p>To install from source packages rather than binary packages replace <em>deb</em> with <em>deb-src</em>. The only binary debs currently supplied are for the <em>i386</em> family of architectures. Users with other architectures will need to install from source.</p> <h3 id="deb-refdb-release">RefDB (pre-release)</h3> |
From: David N. <dav...@us...> - 2005-10-03 12:17:58
|
Update of /cvsroot/refdb/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16288 Modified Files: download.html Log Message: Corrected link to install page Index: download.html =================================================================== RCS file: /cvsroot/refdb/homepage/download.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -U2 -r1.11 -r1.12 --- download.html 29 Sep 2005 13:56:29 -0000 1.11 +++ download.html 3 Oct 2005 12:17:42 -0000 1.12 @@ -170,5 +170,5 @@ <h2 id="debian">Debian packages</h2> - <p>Repositories for RefDB deb packages are now available at <a href="http://refdb.sourceforge.net">refdb.sourceforge.net</a>. Instructions for installing from these Debian repositories are available <a id="install.html">here</a>.</p> + <p>Debian repositories for RefDB deb packages are now available at <a href="http://refdb.sourceforge.net">refdb.sourceforge.net</a>. Instructions for installing from them are available <a id="install.html#debian">here</a>.</p> <h2 id="freebsd">FreeBSD port</h2> |
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32648/src Modified Files: Tag: Release_0_9_5_stable backend-dbib.c backend-dbib.h backend-dbiba.c backend.c backend.h refdbdbib.c Log Message: added support for title-instead-of-missing-author Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v retrieving revision 1.28.2.10 retrieving revision 1.28.2.11 diff -u -U2 -r1.28.2.10 -r1.28.2.11 --- backend-dbib.c 29 Sep 2005 22:35:59 -0000 1.28.2.10 +++ backend-dbib.c 2 Oct 2005 23:38:14 -0000 1.28.2.11 @@ -1463,5 +1463,5 @@ ref_buffer = new_ref_buffer; - if ((new_ref_buffer = format_title(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 0, n_intext)) == NULL) { + if ((new_ref_buffer = format_title(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 0, n_intext, 0 /* not title as author */)) == NULL) { error = 811; break; @@ -1494,5 +1494,5 @@ ref_buffer = new_ref_buffer; - if ((new_ref_buffer = format_title(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 1, n_intext)) == NULL) { + if ((new_ref_buffer = format_title(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 1, n_intext, 0 /* not title as author */)) == NULL) { error = 812; break; @@ -1524,5 +1524,5 @@ ref_buffer = new_ref_buffer; - if ((new_ref_buffer = format_title(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 2, n_intext)) == NULL) { + if ((new_ref_buffer = format_title(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 2, n_intext, 0 /* not title as author */)) == NULL) { error = 813; break; Index: backend-dbib.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.h,v retrieving revision 1.9.2.4 retrieving revision 1.9.2.5 diff -u -U2 -r1.9.2.4 -r1.9.2.5 --- backend-dbib.h 29 Sep 2005 22:35:59 -0000 1.9.2.4 +++ backend-dbib.h 2 Oct 2005 23:38:15 -0000 1.9.2.5 @@ -34,5 +34,5 @@ int format_authorlist(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, int type, const char* database, int n_intext, struct bibinfo* ptr_biblio_info, short title_as_author); char* format_pubdate(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, dbi_result dbirescit, int type, int n_intext, const char* year_unique_suffix); -char* format_title(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, int n_intext); +char* format_title(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, int n_intext, int n_title_as_author); char* format_journalname(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, const char* database, int n_intext); char* format_pages(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, int n_intext); Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.14 retrieving revision 1.26.2.15 diff -u -U2 -r1.26.2.14 -r1.26.2.15 --- backend-dbiba.c 29 Sep 2005 22:35:59 -0000 1.26.2.14 +++ backend-dbiba.c 2 Oct 2005 23:38:15 -0000 1.26.2.15 @@ -236,4 +236,5 @@ enum refdb_col n_abbreviate_display_subseq_index; enum refdb_col n_authorempty_index; + enum refdb_col n_alternatetext_index; enum refdb_col n_asame_index; enum refdb_col n_twoseps_index; @@ -264,4 +265,5 @@ n_abbreviate_display_subseq_index = AUTHORLISTABBREVIATESUBSEQDISPLAYAUTHOR; n_authorempty_index = AUTHORLISTAEMPTY; + n_alternatetext_index = AUTHORLISTALTERNATETEXT; n_asame_index = AUTHORLISTASAME; n_twoseps_index = AUTHORLISTAUTHORSEPSTWOSEPS; @@ -289,4 +291,5 @@ n_abbreviate_display_subseq_index = EDITORLISTABBREVIATESUBSEQDISPLAYAUTHOR; n_authorempty_index = EDITORLISTAEMPTY; + n_alternatetext_index = EDITORLISTALTERNATETEXT; n_asame_index = EDITORLISTASAME; n_twoseps_index = EDITORLISTAUTHORSEPSTWOSEPS; @@ -314,4 +317,5 @@ n_abbreviate_display_subseq_index = SEDITORLISTABBREVIATESUBSEQDISPLAYAUTHOR; n_authorempty_index = SEDITORLISTAEMPTY; + n_alternatetext_index = SEDITORLISTALTERNATETEXT; n_asame_index = SEDITORLISTASAME; n_twoseps_index = SEDITORLISTAUTHORSEPSTWOSEPS; @@ -339,4 +343,5 @@ n_abbreviate_display_subseq_index = ALLALISTABBREVIATESUBSEQDISPLAYAUTHOR; n_authorempty_index = ALLALISTAEMPTY; + n_alternatetext_index = ALLALISTALTERNATETEXT; n_asame_index = ALLALISTASAME; n_twoseps_index = ALLALISTAUTHORSEPSTWOSEPS; @@ -542,4 +547,6 @@ if (title_as_author) { /* use title here if style requires it */ + + /* todo: use alternatetext here */ if (!dbires) { /* when asking only for the authorlist, we don't have a result with the contents of t_refdb */ @@ -687,5 +694,5 @@ } - if ((new_ref = format_title(ptr_ref, ptr_ref_len, ptr_bibconns, dbires, dbires_ref, title_as_author-1, n_intext)) == NULL) { + if ((new_ref = format_title(ptr_ref, ptr_ref_len, ptr_bibconns, dbires, dbires_ref, title_as_author-1, n_intext, 1 /* title as author */)) == NULL) { free(alist_preceeding); clean_request(dbires_author); @@ -1563,6 +1570,8 @@ intext citation subsequent + int n_title_as_author if 1, title is printed instead of authors + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -char* format_title(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, int n_intext) { +char* format_title(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, int n_intext, int n_title_as_author) { char* new_ref; char role[7]; @@ -1707,31 +1716,43 @@ /* all types go into a title element. */ - if ((new_ref = mstrcat(*ptr_ref, "<title role=\"", ptr_ref_len, 0)) == NULL) { - LOG_PRINT(LOG_WARNING, outomem.text); - free(real_item_title); - return NULL; - } - else { - *ptr_ref = new_ref; - } - - if ((new_ref = mstrcat(*ptr_ref, role, ptr_ref_len, 0)) == NULL) { - LOG_PRINT(LOG_WARNING, outomem.text); - free(real_item_title); - return NULL; + if (n_title_as_author) { + if ((new_ref = mstrcat(*ptr_ref, "<title>", ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + free(real_item_title); + return NULL; + } + else { + *ptr_ref = new_ref; + } } else { - *ptr_ref = new_ref; - } + if ((new_ref = mstrcat(*ptr_ref, "<title role=\"", ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + free(real_item_title); + return NULL; + } + else { + *ptr_ref = new_ref; + } + + if ((new_ref = mstrcat(*ptr_ref, role, ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + free(real_item_title); + return NULL; + } + else { + *ptr_ref = new_ref; + } - if ((new_ref = mstrcat(*ptr_ref, "\">", ptr_ref_len, 0)) == NULL) { - LOG_PRINT(LOG_WARNING, outomem.text); - free(real_item_title); - return NULL; - } - else { - *ptr_ref = new_ref; + if ((new_ref = mstrcat(*ptr_ref, "\">", ptr_ref_len, 0)) == NULL) { + LOG_PRINT(LOG_WARNING, outomem.text); + free(real_item_title); + return NULL; + } + else { + *ptr_ref = new_ref; + } } - + if (n_uplow == 1) { /* want uppercase */ strup(real_item_title); Index: backend.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.c,v retrieving revision 1.27.2.11 retrieving revision 1.27.2.12 diff -u -U2 -r1.27.2.11 -r1.27.2.12 --- backend.c 29 Sep 2005 22:35:59 -0000 1.27.2.11 +++ backend.c 2 Oct 2005 23:38:16 -0000 1.27.2.12 @@ -2575,243 +2575,248 @@ /* - 0 ID - 1 AUTHORLISTSTYLE - 2 EDITORLISTSTYLE - 3 SEDITORLISTSTYLE - 4 ALLALISTSTYLE - 5 AUTHORLISTABBREVIATEFIRST - 6 EDITORLISTABBREVIATEFIRST - 7 SEDITORLISTABBREVIATEFIRST - 8 ALLALISTABBREVIATEFIRST - 9 AUTHORLISTABBREVIATESUBSEQ - 10 EDITORLISTABBREVIATESUBSEQ - 11 SEDITORLISTABBREVIATESUBSEQ - 12 ALLALISTABBREVIATESUBSEQ - 13 AUTHORLISTABBREVIATEFIRSTMAXAUTHOR - 14 EDITORLISTABBREVIATEFIRSTMAXAUTHOR - 15 SEDITORLISTABBREVIATEFIRSTMAXAUTHOR - 16 ALLALISTABBREVIATEFIRSTMAXAUTHOR - 17 AUTHORLISTABBREVIATESUBSEQMAXAUTHOR - 18 EDITORLISTABBREVIATESUBSEQMAXAUTHOR - 19 SEDITORLISTABBREVIATESUBSEQMAXAUTHOR - 20 ALLALISTABBREVIATESUBSEQMAXAUTHOR - 21 AUTHORLISTABBREVIATEFIRSTDISPLAYAUTHOR - 22 EDITORLISTABBREVIATEFIRSTDISPLAYAUTHOR - 23 SEDITORLISTABBREVIATEFIRSTDISPLAYAUTHOR - 24 ALLALISTABBREVIATEFIRSTDISPLAYAUTHOR - 25 AUTHORLISTABBREVIATESUBSEQDISPLAYAUTHOR - 26 EDITORLISTABBREVIATESUBSEQDISPLAYAUTHOR - 27 SEDITORLISTABBREVIATESUBSEQDISPLAYAUTHOR - 28 ALLALISTABBREVIATESUBSEQDISPLAYAUTHOR - 29 AUTHORLISTAEMPTY - 30 EDITORLISTAEMPTY - 31 SEDITORLISTAEMPTY - 32 ALLALISTAEMPTY - 33 AUTHORLISTASAME - 34 EDITORLISTASAME - 35 SEDITORLISTASAME - 36 ALLALISTASAME - 37 AUTHORLISTPRECEEDING - 38 EDITORLISTPRECEEDING - 39 SEDITORLISTPRECEEDING - 40 ALLALISTPRECEEDING - 41 AUTHORLISTFOLLOWING - 42 EDITORLISTFOLLOWING - 43 SEDITORLISTFOLLOWING - 44 ALLALISTFOLLOWING - 45 AUTHORLISTAUTHORSEPSTWOSEPS - 46 EDITORLISTAUTHORSEPSTWOSEPS - 47 SEDITORLISTAUTHORSEPSTWOSEPS - 48 ALLALISTAUTHORSEPSTWOSEPS - 49 AUTHORLISTAUTHORSEPSTHREESEPSTHREESEPSEACH - 50 EDITORLISTAUTHORSEPSTHREESEPSTHREESEPSEACH - 51 SEDITORLISTAUTHORSEPSTHREESEPSTHREESEPSEACH - 52 ALLALISTAUTHORSEPSTHREESEPSTHREESEPSEACH - 53 AUTHORLISTAUTHORSEPSTHREESEPSTHREESEPSLAST - 54 EDITORLISTAUTHORSEPSTHREESEPSTHREESEPSLAST - 55 SEDITORLISTAUTHORSEPSTHREESEPSTHREESEPSLAST - 56 ALLALISTAUTHORSEPSTHREESEPSTHREESEPSLAST - 57 AUTHORLISTAUTHORNAMESNAMEFIRSTNAMEORDER - 58 EDITORLISTAUTHORNAMESNAMEFIRSTNAMEORDER - 59 SEDITORLISTAUTHORNAMESNAMEFIRSTNAMEORDER - 60 ALLALISTAUTHORNAMESNAMEFIRSTNAMEORDER - 61 AUTHORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE - 62 EDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE - 63 SEDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE - 64 ALLALISTAUTHORNAMESNAMEFIRSTINITIALSTYLE - 65 AUTHORLISTAUTHORNAMESNAMEFIRSTUPPERCASE - 66 EDITORLISTAUTHORNAMESNAMEFIRSTUPPERCASE - 67 SEDITORLISTAUTHORNAMESNAMEFIRSTUPPERCASE - 68 ALLALISTAUTHORNAMESNAMEFIRSTUPPERCASE - 69 AUTHORLISTAUTHORNAMESNAMEOTHERNAMEORDER - 70 EDITORLISTAUTHORNAMESNAMEOTHERNAMEORDER - 71 SEDITORLISTAUTHORNAMESNAMEOTHERNAMEORDER - 72 ALLALISTAUTHORNAMESNAMEOTHERNAMEORDER - 73 AUTHORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE - 74 EDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE - 75 SEDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE - 76 ALLALISTAUTHORNAMESNAMEOTHERINITIALSTYLE - 77 AUTHORLISTAUTHORNAMESNAMEOTHERUPPERCASE - 78 EDITORLISTAUTHORNAMESNAMEOTHERUPPERCASE - 79 SEDITORLISTAUTHORNAMESNAMEOTHERUPPERCASE - 80 ALLALISTAUTHORNAMESNAMEOTHERUPPERCASE - 81 AUTHORLISTTEXTTEXTSINGLEPRECEEDING - 82 EDITORLISTTEXTTEXTSINGLEPRECEEDING - 83 SEDITORLISTTEXTTEXTSINGLEPRECEEDING - 84 ALLALISTTEXTTEXTSINGLEPRECEEDING - 85 AUTHORLISTTEXTTEXTSINGLEFOLLOWING - 86 EDITORLISTTEXTTEXTSINGLEFOLLOWING - 87 SEDITORLISTTEXTTEXTSINGLEFOLLOWING - 88 ALLALISTTEXTTEXTSINGLEFOLLOWING - 89 AUTHORLISTTEXTTEXTMULTIPLEPRECEEDING - 90 EDITORLISTTEXTTEXTMULTIPLEPRECEEDING - 91 SEDITORLISTTEXTTEXTMULTIPLEPRECEEDING - 92 ALLALISTTEXTTEXTMULTIPLEPRECEEDING - 93 AUTHORLISTTEXTTEXTMULTIPLEFOLLOWING - 94 EDITORLISTTEXTTEXTMULTIPLEFOLLOWING - 95 SEDITORLISTTEXTTEXTMULTIPLEFOLLOWING - 96 ALLALISTTEXTTEXTMULTIPLEFOLLOWING - 97 PUBDATEPRECEEDING - 98 PUBDATEFOLLOWING - 99 PUBDATEFORMAT - 100 PUBDATESEQUENCE - 101 PUBDATEMONTHFORMAT - 102 PUBDATEDAYFORMAT - 103 PUBDATEYEARFORMAT - 104 PUBDATEPADLEADINGZERO - 105 PUBDATESTYLE - 106 PUBDATESECPRECEEDING - 107 PUBDATESECFOLLOWING - 108 PUBDATESECFORMAT - 109 PUBDATESECSEQUENCE - 110 PUBDATESECMONTHFORMAT - 111 PUBDATESECDAYFORMAT - 112 PUBDATESECYEARFORMAT - 113 PUBDATESECPADLEADINGZERO - 114 PUBDATESECSTYLE - 115 PUBDATEALLPRECEEDING - 116 PUBDATEALLFOLLOWING - 117 PUBDATEALLFORMAT - 118 PUBDATEALLSEQUENCE - 119 PUBDATEALLMONTHFORMAT - 120 PUBDATEALLDAYFORMAT - 121 PUBDATEALLYEARFORMAT - 122 PUBDATEALLPADLEADINGZERO - 123 PUBDATEALLSTYLE - 124 TITLEPRECEEDING - 125 TITLEFOLLOWING - 126 TITLECASE - 127 TITLESTYLE - 128 BOOKTITLEPRECEEDING - 129 BOOKTITLEFOLLOWING - 130 BOOKTITLECASE - 131 BOOKTITLESTYLE - 132 SERIESTITLEPRECEEDING - 133 SERIESTITLEFOLLOWING - 134 SERIESTITLECASE - 135 SERIESTITLESTYLE - 136 ALLTITLEPRECEEDING - 137 ALLTITLEFOLLOWING - 138 ALLTITLECASE - 139 ALLTITLESTYLE - 140 JOURNALNAMEPRECEEDING - 141 JOURNALNAMEFOLLOWING - 142 JOURNALNAMECASE - 143 JOURNALNAMEDEFAULTTEXT - 144 JOURNALNAMEALTERNATETEXT - 145 JOURNALNAMEPUNCTUATION - 146 JOURNALNAMESTYLE - 147 VOLUMEPRECEEDING - 148 VOLUMEFOLLOWING - 149 VOLUMESTYLE - 150 ISSUEPRECEEDING - 151 ISSUEFOLLOWING - 152 ISSUESTYLE - 153 PAGESSTYLE - 154 PAGESSINGLEPAGEPRECEEDING - 155 PAGESSINGLEPAGEFOLLOWING - 156 PAGESPAGERANGEPRECEEDING - 157 PAGESPAGERANGEFOLLOWING - 158 PAGESPAGERANGETYPE - 159 PUBLISHERPRECEEDING - 160 PUBLISHERFOLLOWING - 161 PUBLISHERSTYLE - 162 PUBPLACEPRECEEDING - 163 PUBPLACEFOLLOWING - 164 PUBPLACESTYLE - 165 PAGESPRECEEDING - 166 PAGESFOLLOWING - 167 REFNUMBERPRECEEDING - 168 REFNUMBERFOLLOWING - 169 REFNUMBERSTYLE - 170 PUBDATEFIRSTSEP - 171 PUBDATESECONDSEP - 172 PUBDATESECFIRSTSEP - 173 PUBDATESECSECONDSEP - 174 PUBDATEALLFIRSTSEP - 175 PUBDATEALLSECONDSEP - 176 PAGESPAGERANGERANGESEPARATOR - 177 SERIALPRECEEDING - 178 SERIALFOLLOWING - 179 SERIALSTYLE - 180 ADDRESSPRECEEDING - 181 ADDRESSFOLLOWING - 182 ADDRESSSTYLE - deleted 183 URLPRECEEDING - deleted 184 URLFOLLOWING - deleted 185 URLSTYLE - 183 USERDEF1PRECEEDING - 184 USERDEF1FOLLOWING - 185 USERDEF1STYLE - 186 USERDEF2PRECEEDING - 187 USERDEF2FOLLOWING - 188 USERDEF2STYLE - 189 USERDEF3PRECEEDING - 190 USERDEF3FOLLOWING - 191 USERDEF3STYLE - 192 USERDEF4PRECEEDING - 193 USERDEF4FOLLOWING - 194 USERDEF4STYLE - 195 USERDEF5PRECEEDING - 196 USERDEF5FOLLOWING - 197 USERDEF5STYLE - 198 MISC1PRECEEDING - 199 MISC1FOLLOWING - 200 MISC1STYLE - 201 MISC2PRECEEDING - 202 MISC2FOLLOWING - 203 MISC2STYLE - 204 MISC3PRECEEDING - 205 MISC3FOLLOWING - 206 MISC3STYLE - 207 NOTESPRECEEDING - 208 NOTESFOLLOWING - 209 NOTESSTYLE - 210 ABSTRACTPRECEEDING - 211 ABSTRACTFOLLOWING - 212 ABSTRACTSTYLE - 213 LINK0PRECEEDING - 214 LINK0FOLLOWING - 215 LINK0STYLE - 216 LINK1PRECEEDING - 217 LINK1FOLLOWING - 218 LINK1STYLE - 219 LINK2PRECEEDING - 220 LINK2FOLLOWING - 221 LINK2STYLE - 222 LINK3PRECEEDING - 223 LINK3FOLLOWING - 224 LINK3STYLE - 225 LINK4PRECEEDING - 226 LINK4FOLLOWING - 227 LINK4STYLE +0 ID +1 AUTHORLISTSTYLE +2 EDITORLISTSTYLE +3 SEDITORLISTSTYLE +4 ALLALISTSTYLE +5 AUTHORLISTALTERNATESTYLE +6 EDITORLISTALTERNATESTYLE +7 SEDITORLISTALTERNATESTYLE +8 ALLALISTALTERNATESTYLE +9 AUTHORLISTALTERNATETEXT +10 EDITORLISTALTERNATETEXT +11 SEDITORLISTALTERNATETEXT +12 ALLALISTALTERNATETEXT +13 AUTHORLISTABBREVIATEFIRST +14 EDITORLISTABBREVIATEFIRST +15 SEDITORLISTABBREVIATEFIRST +16 ALLALISTABBREVIATEFIRST +17 AUTHORLISTABBREVIATESUBSEQ +18 EDITORLISTABBREVIATESUBSEQ +19 SEDITORLISTABBREVIATESUBSEQ +20 ALLALISTABBREVIATESUBSEQ +21 AUTHORLISTABBREVIATEFIRSTMAXAUTHOR +22 EDITORLISTABBREVIATEFIRSTMAXAUTHOR +23 SEDITORLISTABBREVIATEFIRSTMAXAUTHOR +24 ALLALISTABBREVIATEFIRSTMAXAUTHOR +25 AUTHORLISTABBREVIATESUBSEQMAXAUTHOR +26 EDITORLISTABBREVIATESUBSEQMAXAUTHOR +27 SEDITORLISTABBREVIATESUBSEQMAXAUTHOR +28 ALLALISTABBREVIATESUBSEQMAXAUTHOR +29 AUTHORLISTABBREVIATEFIRSTDISPLAYAUTHOR +30 EDITORLISTABBREVIATEFIRSTDISPLAYAUTHOR +31 SEDITORLISTABBREVIATEFIRSTDISPLAYAUTHOR +32 ALLALISTABBREVIATEFIRSTDISPLAYAUTHOR +33 AUTHORLISTABBREVIATESUBSEQDISPLAYAUTHOR +34 EDITORLISTABBREVIATESUBSEQDISPLAYAUTHOR +35 SEDITORLISTABBREVIATESUBSEQDISPLAYAUTHOR +36 ALLALISTABBREVIATESUBSEQDISPLAYAUTHOR +37 AUTHORLISTAEMPTY +38 EDITORLISTAEMPTY +39 SEDITORLISTAEMPTY +40 ALLALISTAEMPTY +41 AUTHORLISTASAME +42 EDITORLISTASAME +43 SEDITORLISTASAME +44 ALLALISTASAME +45 AUTHORLISTPRECEEDING +46 EDITORLISTPRECEEDING +47 SEDITORLISTPRECEEDING +48 ALLALISTPRECEEDING +49 AUTHORLISTFOLLOWING +50 EDITORLISTFOLLOWING +51 SEDITORLISTFOLLOWING +52 ALLALISTFOLLOWING +53 AUTHORLISTAUTHORSEPSTWOSEPS +54 EDITORLISTAUTHORSEPSTWOSEPS +55 SEDITORLISTAUTHORSEPSTWOSEPS +56 ALLALISTAUTHORSEPSTWOSEPS +57 AUTHORLISTAUTHORSEPSTHREESEPSTHREESEPSEACH +58 EDITORLISTAUTHORSEPSTHREESEPSTHREESEPSEACH +59 SEDITORLISTAUTHORSEPSTHREESEPSTHREESEPSEACH +60 ALLALISTAUTHORSEPSTHREESEPSTHREESEPSEACH +61 AUTHORLISTAUTHORSEPSTHREESEPSTHREESEPSLAST +62 EDITORLISTAUTHORSEPSTHREESEPSTHREESEPSLAST +63 SEDITORLISTAUTHORSEPSTHREESEPSTHREESEPSLAST +64 ALLALISTAUTHORSEPSTHREESEPSTHREESEPSLAST +65 AUTHORLISTAUTHORNAMESNAMEFIRSTNAMEORDER +66 EDITORLISTAUTHORNAMESNAMEFIRSTNAMEORDER +67 SEDITORLISTAUTHORNAMESNAMEFIRSTNAMEORDER +68 ALLALISTAUTHORNAMESNAMEFIRSTNAMEORDER +69 AUTHORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE +70 EDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE +71 SEDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE +72 ALLALISTAUTHORNAMESNAMEFIRSTINITIALSTYLE +73 AUTHORLISTAUTHORNAMESNAMEFIRSTUPPERCASE +74 EDITORLISTAUTHORNAMESNAMEFIRSTUPPERCASE +75 SEDITORLISTAUTHORNAMESNAMEFIRSTUPPERCASE +76 ALLALISTAUTHORNAMESNAMEFIRSTUPPERCASE +77 AUTHORLISTAUTHORNAMESNAMEOTHERNAMEORDER +78 EDITORLISTAUTHORNAMESNAMEOTHERNAMEORDER +79 SEDITORLISTAUTHORNAMESNAMEOTHERNAMEORDER +80 ALLALISTAUTHORNAMESNAMEOTHERNAMEORDER +81 AUTHORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE +82 EDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE +83 SEDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE +84 ALLALISTAUTHORNAMESNAMEOTHERINITIALSTYLE +85 AUTHORLISTAUTHORNAMESNAMEOTHERUPPERCASE +86 EDITORLISTAUTHORNAMESNAMEOTHERUPPERCASE +87 SEDITORLISTAUTHORNAMESNAMEOTHERUPPERCASE +88 ALLALISTAUTHORNAMESNAMEOTHERUPPERCASE +89 AUTHORLISTTEXTTEXTSINGLEPRECEEDING +90 EDITORLISTTEXTTEXTSINGLEPRECEEDING +91 SEDITORLISTTEXTTEXTSINGLEPRECEEDING +92 ALLALISTTEXTTEXTSINGLEPRECEEDING +93 AUTHORLISTTEXTTEXTSINGLEFOLLOWING +94 EDITORLISTTEXTTEXTSINGLEFOLLOWING +95 SEDITORLISTTEXTTEXTSINGLEFOLLOWING +96 ALLALISTTEXTTEXTSINGLEFOLLOWING +97 AUTHORLISTTEXTTEXTMULTIPLEPRECEEDING +98 EDITORLISTTEXTTEXTMULTIPLEPRECEEDING +99 SEDITORLISTTEXTTEXTMULTIPLEPRECEEDING +100 ALLALISTTEXTTEXTMULTIPLEPRECEEDING +101 AUTHORLISTTEXTTEXTMULTIPLEFOLLOWING +102 EDITORLISTTEXTTEXTMULTIPLEFOLLOWING +103 SEDITORLISTTEXTTEXTMULTIPLEFOLLOWING +104 ALLALISTTEXTTEXTMULTIPLEFOLLOWING +105 PUBDATEPRECEEDING +106 PUBDATEFOLLOWING +107 PUBDATEFORMAT +108 PUBDATESEQUENCE +109 PUBDATEMONTHFORMAT +110 PUBDATEDAYFORMAT +111 PUBDATEYEARFORMAT +112 PUBDATEPADLEADINGZERO +113 PUBDATESTYLE +114 PUBDATESECPRECEEDING +115 PUBDATESECFOLLOWING +116 PUBDATESECFORMAT +117 PUBDATESECSEQUENCE +118 PUBDATESECMONTHFORMAT +119 PUBDATESECDAYFORMAT +120 PUBDATESECYEARFORMAT +121 PUBDATESECPADLEADINGZERO +122 PUBDATESECSTYLE +123 PUBDATEALLPRECEEDING +124 PUBDATEALLFOLLOWING +125 PUBDATEALLFORMAT +126 PUBDATEALLSEQUENCE +127 PUBDATEALLMONTHFORMAT +128 PUBDATEALLDAYFORMAT +129 PUBDATEALLYEARFORMAT +130 PUBDATEALLPADLEADINGZERO +131 PUBDATEALLSTYLE +132 TITLEPRECEEDING +133 TITLEFOLLOWING +134 TITLECASE +135 TITLESTYLE +136 BOOKTITLEPRECEEDING +137 BOOKTITLEFOLLOWING +138 BOOKTITLECASE +139 BOOKTITLESTYLE +140 SERIESTITLEPRECEEDING +141 SERIESTITLEFOLLOWING +142 SERIESTITLECASE +143 SERIESTITLESTYLE +144 ALLTITLEPRECEEDING +145 ALLTITLEFOLLOWING +146 ALLTITLECASE +147 ALLTITLESTYLE +148 JOURNALNAMEPRECEEDING +149 JOURNALNAMEFOLLOWING +150 JOURNALNAMECASE +151 JOURNALNAMEDEFAULTTEXT +152 JOURNALNAMEALTERNATETEXT +153 JOURNALNAMEPUNCTUATION +154 JOURNALNAMESTYLE +155 VOLUMEPRECEEDING +156 VOLUMEFOLLOWING +157 VOLUMESTYLE +158 ISSUEPRECEEDING +159 ISSUEFOLLOWING +160 ISSUESTYLE +161 PAGESSTYLE +162 PAGESSINGLEPAGEPRECEEDING +163 PAGESSINGLEPAGEFOLLOWING +164 PAGESPAGERANGEPRECEEDING +165 PAGESPAGERANGEFOLLOWING +166 PAGESPAGERANGETYPE +167 PUBLISHERPRECEEDING +168 PUBLISHERFOLLOWING +169 PUBLISHERSTYLE +170 PUBPLACEPRECEEDING +171 PUBPLACEFOLLOWING +172 PUBPLACESTYLE +173 PAGESPRECEEDING +174 PAGESFOLLOWING +175 REFNUMBERPRECEEDING +176 REFNUMBERFOLLOWING +177 REFNUMBERSTYLE +178 PUBDATEFIRSTSEP +179 PUBDATESECONDSEP +180 PUBDATESECFIRSTSEP +181 PUBDATESECSECONDSEP +182 PUBDATEALLFIRSTSEP +183 PUBDATEALLSECONDSEP +184 PAGESPAGERANGERANGESEPARATOR +185 SERIALPRECEEDING +186 SERIALFOLLOWING +187 SERIALSTYLE +188 ADDRESSPRECEEDING +189 ADDRESSFOLLOWING +190 ADDRESSSTYLE +191 USERDEF1PRECEEDING +192 USERDEF1FOLLOWING +193 USERDEF1STYLE +194 USERDEF2PRECEEDING +195 USERDEF2FOLLOWING +196 USERDEF2STYLE +197 USERDEF3PRECEEDING +198 USERDEF3FOLLOWING +199 USERDEF3STYLE +200 USERDEF4PRECEEDING +201 USERDEF4FOLLOWING +202 USERDEF4STYLE +203 USERDEF5PRECEEDING +204 USERDEF5FOLLOWING +205 USERDEF5STYLE +206 MISC1PRECEEDING +207 MISC1FOLLOWING +208 MISC1STYLE +209 MISC2PRECEEDING +210 MISC2FOLLOWING +211 MISC2STYLE +212 MISC3PRECEEDING +213 MISC3FOLLOWING +214 MISC3STYLE +215 NOTESPRECEEDING +216 NOTESFOLLOWING +217 NOTESSTYLE +218 ABSTRACTPRECEEDING +219 ABSTRACTFOLLOWING +220 ABSTRACTSTYLE +221 LINK0PRECEEDING +222 LINK0FOLLOWING +223 LINK0STYLE +224 LINK1PRECEEDING +225 LINK1FOLLOWING +226 LINK1STYLE +227 LINK2PRECEEDING +228 LINK2FOLLOWING +229 LINK2STYLE +230 LINK3PRECEEDING +231 LINK3FOLLOWING +232 LINK3STYLE +233 LINK4PRECEEDING +234 LINK4FOLLOWING +235 LINK4STYLE */ /* now retrieve matching style information from REFSTYLE into*/ if (!strcmp(my_dbi_conn_get_cap(conn, "multiple_db"), "t")) { - sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from %s.REFSTYLE where PUBTYPE='%s' and CITSTYLEID=%u", MAIN_DB, pubtype, citstyle_id); + sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QALTERNATESTYLE, XALTERNATESTYLE, YALTERNATESTYLE, ZALTERNATESTYLE, QALTERNATETEXT, XALTERNATETEXT, YALTERNATETEXT, ZALTERNATETEXT, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from %s.REFSTYLE where PUBTYPE='%s' and CITSTYLEID=%u", MAIN_DB, pubtype, citstyle_id); } else { - sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from REFSTYLE where PUBTYPE='%s' and CITSTYLEID=%u", pubtype, citstyle_id); + sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QALTERNATESTYLE, XALTERNATESTYLE, YALTERNATESTYLE, ZALTERNATESTYLE, QALTERNATETEXT, XALTERNATETEXT, YALTERNATETEXT, ZALTERNATETEXT, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from REFSTYLE where PUBTYPE='%s' and CITSTYLEID=%u", pubtype, citstyle_id); } @@ -2831,8 +2836,8 @@ dbi_result_free(dbi_style_res); if (!strcmp(my_dbi_conn_get_cap(conn, "multiple_db"), "t")) { - sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from %s.REFSTYLE where PUBTYPE='GEN' and CITSTYLEID=%u", MAIN_DB, citstyle_id); + sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QALTERNATESTYLE, XALTERNATESTYLE, YALTERNATESTYLE, ZALTERNATESTYLE, QALTERNATETEXT, XALTERNATETEXT, YALTERNATETEXT, ZALTERNATETEXT, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from %s.REFSTYLE where PUBTYPE='GEN' and CITSTYLEID=%u", MAIN_DB, citstyle_id); } else { - sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRECEEDING, ALLTITLEFOLLOWING, ALLTITLECASE, ALLTITLESTYLE, JOURNALNAMEPRECEEDING, JOURNALNAMEFOLLOWING, JOURNALNAMECASE, JOURNALNAMEDEFAULTTEXT, JOURNALNAMEALTERNATETEXT, JOURNALNAMEPUNCTUATION, JOURNALNAMESTYLE, VOLUMEPRECEEDING, VOLUMEFOLLOWING, VOLUMESTYLE, ISSUEPRECEEDING, ISSUEFOLLOWING, ISSUESTYLE, PAGESSTYLE, PAGESSINGLEPAGEPRECEEDING, PAGESSINGLEPAGEFOLLOWING, PAGESPAGERANGEPRECEEDING, PAGESPAGERANGEFOLLOWING, PAGESPAGERANGETYPE, PUBLISHERPRECEEDING, PUBLISHERFOLLOWING, PUBLISHERSTYLE, PUBPLACEPRECEEDING, PUBPLACEFOLLOWING, PUBPLACESTYLE, PAGESPRECEEDING, PAGESFOLLOWING, REFNUMBERPRECEEDING, REFNUMBERFOLLOWING, REFNUMBERSTYLE, PUBDATEFIRSTSEP, PUBDATESECONDSEP, PUBDATESECFIRSTSEP, PUBDATESECSECONDSEP, PUBDATEALLFIRSTSEP, PUBDATEALLSECONDSEP, PAGESPAGERANGERANGESEPARATOR, SERIALPRECEEDING, SERIALFOLLOWING, SERIALSTYLE, ADDRESSPRECEEDING, ADDRESSFOLLOWING, ADDRESSSTYLE, USERDEF1PRECEEDING, USERDEF1FOLLOWING, USERDEF1STYLE, USERDEF2PRECEEDING, USERDEF2FOLLOWING, USERDEF2STYLE, USERDEF3PRECEEDING, USERDEF3FOLLOWING, USERDEF3STYLE, USERDEF4PRECEEDING, USERDEF4FOLLOWING, USERDEF4STYLE, USERDEF5PRECEEDING, USERDEF5FOLLOWING, USERDEF5STYLE, MISC1PRECEEDING, MISC1FOLLOWING, MISC1STYLE, MISC2PRECEEDING, MISC2FOLLOWING, MISC2STYLE, MISC3PRECEEDING, MISC3FOLLOWING, MISC3STYLE, NOTESPRECEEDING, NOTESFOLLOWING, NOTESSTYLE, ABSTRACTPRECEEDING, ABSTRACTFOLLOWING, ABSTRACTSTYLE, LINK0PRECEEDING, LINK0FOLLOWING, LINK0STYLE, LINK1PRECEEDING, LINK1FOLLOWING, LINK1STYLE, LINK2PRECEEDING, LINK2FOLLOWING, LINK2STYLE, LINK3PRECEEDING, LINK3FOLLOWING, LINK3STYLE, LINK4PRECEEDING, LINK4FOLLOWING, LINK4STYLE from REFSTYLE where PUBTYPE='GEN' and CITSTYLEID=%u", citstyle_id); + sprintf(sql_command, "SELECT ID, QSTYLE, XSTYLE, YSTYLE, ZSTYLE, QALTERNATESTYLE, XALTERNATESTYLE, YALTERNATESTYLE, ZALTERNATESTYLE, QALTERNATETEXT, XALTERNATETEXT, YALTERNATETEXT, ZALTERNATETEXT, QABBREVIATEFIRST, XABBREVIATEFIRST, YABBREVIATEFIRST, ZABBREVIATEFIRST, QABBREVIATESUBSEQ, XABBREVIATESUBSEQ, YABBREVIATESUBSEQ, ZABBREVIATESUBSEQ, QABBREVIATEFIRSTMAXAUTHOR, XABBREVIATEFIRSTMAXAUTHOR, YABBREVIATEFIRSTMAXAUTHOR, ZABBREVIATEFIRSTMAXAUTHOR, QABBREVIATESUBSEQMAXAUTHOR, XABBREVIATESUBSEQMAXAUTHOR, YABBREVIATESUBSEQMAXAUTHOR, ZABBREVIATESUBSEQMAXAUTHOR, QABBREVIATEFIRSTDISPLAYAUTHOR, XABBREVIATEFIRSTDISPLAYAUTHOR, YABBREVIATEFIRSTDISPLAYAUTHOR, ZABBREVIATEFIRSTDISPLAYAUTHOR, QABBREVIATESUBSEQDISPLAYAUTHOR, XABBREVIATESUBSEQDISPLAYAUTHOR, YABBREVIATESUBSEQDISPLAYAUTHOR, ZABBREVIATESUBSEQDISPLAYAUTHOR, QAEMPTY, XAEMPTY, YAEMPTY, ZAEMPTY, QASAME, XASAME, YASAME, ZASAME, QPRECEEDING, XPRECEEDING, YPRECEEDING, ZPRECEEDING, QFOLLOWING, XFOLLOWING, YFOLLOWING, ZFOLLOWING, QAUTHORSEPSTWOSEPS, XAUTHORSEPSTWOSEPS, YAUTHORSEPSTWOSEPS, ZAUTHORSEPSTWOSEPS, QAUTHORSEPSTHREESEPSTHREESEPSEACH, XAUTHORSEPSTHREESEPSTHREESEPSEACH, YAUTHORSEPSTHREESEPSTHREESEPSEACH, ZAUTHORSEPSTHREESEPSTHREESEPSEACH, QAUTHORSEPSTHREESEPSTHREESEPSLAST, XAUTHORSEPSTHREESEPSTHREESEPSLAST, YAUTHORSEPSTHREESEPSTHREESEPSLAST, ZAUTHORSEPSTHREESEPSTHREESEPSLAST, QAUTHORNAMESNAMEFIRSTNAMEORDER, XAUTHORNAMESNAMEFIRSTNAMEORDER, YAUTHORNAMESNAMEFIRSTNAMEORDER, ZAUTHORNAMESNAMEFIRSTNAMEORDER, QAUTHORNAMESNAMEFIRSTINITIALSTYLE, XAUTHORNAMESNAMEFIRSTINITIALSTYLE, YAUTHORNAMESNAMEFIRSTINITIALSTYLE, ZAUTHORNAMESNAMEFIRSTINITIALSTYLE, QAUTHORNAMESNAMEFIRSTUPPERCASE, XAUTHORNAMESNAMEFIRSTUPPERCASE, YAUTHORNAMESNAMEFIRSTUPPERCASE, ZAUTHORNAMESNAMEFIRSTUPPERCASE, QAUTHORNAMESNAMEOTHERNAMEORDER, XAUTHORNAMESNAMEOTHERNAMEORDER, YAUTHORNAMESNAMEOTHERNAMEORDER, ZAUTHORNAMESNAMEOTHERNAMEORDER, QAUTHORNAMESNAMEOTHERINITIALSTYLE, XAUTHORNAMESNAMEOTHERINITIALSTYLE, YAUTHORNAMESNAMEOTHERINITIALSTYLE, ZAUTHORNAMESNAMEOTHERINITIALSTYLE, QAUTHORNAMESNAMEOTHERUPPERCASE, XAUTHORNAMESNAMEOTHERUPPERCASE, YAUTHORNAMESNAMEOTHERUPPERCASE, ZAUTHORNAMESNAMEOTHERUPPERCASE, QTEXTTEXTSINGLEPRECEEDING, XTEXTTEXTSINGLEPRECEEDING, YTEXTTEXTSINGLEPRECEEDING, ZTEXTTEXTSINGLEPRECEEDING, QTEXTTEXTSINGLEFOLLOWING, XTEXTTEXTSINGLEFOLLOWING, YTEXTTEXTSINGLEFOLLOWING, ZTEXTTEXTSINGLEFOLLOWING, QTEXTTEXTMULTIPLEPRECEEDING, XTEXTTEXTMULTIPLEPRECEEDING, YTEXTTEXTMULTIPLEPRECEEDING, ZTEXTTEXTMULTIPLEPRECEEDING, QTEXTTEXTMULTIPLEFOLLOWING, XTEXTTEXTMULTIPLEFOLLOWING, YTEXTTEXTMULTIPLEFOLLOWING, ZTEXTTEXTMULTIPLEFOLLOWING, PUBDATEPRECEEDING, PUBDATEFOLLOWING, PUBDATEFORMAT, PUBDATESEQUENCE, PUBDATEMONTHFORMAT, PUBDATEDAYFORMAT, PUBDATEYEARFORMAT, PUBDATEPADLEADINGZERO, PUBDATESTYLE, PUBDATESECPRECEEDING, PUBDATESECFOLLOWING, PUBDATESECFORMAT, PUBDATESECSEQUENCE, PUBDATESECMONTHFORMAT, PUBDATESECDAYFORMAT, PUBDATESECYEARFORMAT, PUBDATESECPADLEADINGZERO, PUBDATESECSTYLE, PUBDATEALLPRECEEDING, PUBDATEALLFOLLOWING, PUBDATEALLFORMAT, PUBDATEALLSEQUENCE, PUBDATEALLMONTHFORMAT, PUBDATEALLDAYFORMAT, PUBDATEALLYEARFORMAT, PUBDATEALLPADLEADINGZERO, PUBDATEALLSTYLE, TITLEPRECEEDING, TITLEFOLLOWING, TITLECASE, TITLESTYLE, BOOKTITLEPRECEEDING, BOOKTITLEFOLLOWING, BOOKTITLECASE, BOOKTITLESTYLE, SERIESTITLEPRECEEDING, SERIESTITLEFOLLOWING, SERIESTITLECASE, SERIESTITLESTYLE, ALLTITLEPRE... [truncated message content] |
From: Markus H. <mho...@us...> - 2005-10-02 23:38:24
|
Update of /cvsroot/refdb/refdb/dsssl/refdb/print In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32648/dsssl/refdb/print Modified Files: Tag: Release_0_9_5_stable docbook-refdb.dsl Log Message: added support for title-instead-of-missing-author Index: docbook-refdb.dsl =================================================================== RCS file: /cvsroot/refdb/refdb/dsssl/refdb/print/docbook-refdb.dsl,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -U2 -r1.5.2.2 -r1.5.2.3 --- docbook-refdb.dsl 29 Sep 2005 22:26:02 -0000 1.5.2.2 +++ docbook-refdb.dsl 2 Oct 2005 23:38:14 -0000 1.5.2.3 @@ -608,4 +608,6 @@ ((equal? rel (normalize "chapter")) (refdb-process-inline "CHAPTITLESTYLE")) + ((equal? rel (normalize "series")) + (refdb-process-inline "SERIESTITLESTYLE")) ((equal? rel (normalize "author")) (refdb-process-inline "AUTHORLISTSTYLE")) |
From: Markus H. <mho...@us...> - 2005-10-02 23:38:22
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32648/scripts Modified Files: Tag: Release_0_9_5_stable libgen.pl vargen.pl Log Message: added support for title-instead-of-missing-author Index: libgen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/libgen.pl,v retrieving revision 1.5.2.3 retrieving revision 1.5.2.4 diff -u -U2 -r1.5.2.3 -r1.5.2.4 --- libgen.pl 27 Nov 2004 23:13:47 -0000 1.5.2.3 +++ libgen.pl 2 Oct 2005 23:38:14 -0000 1.5.2.4 @@ -26,8 +26,8 @@ "issn" => "SERIAL", "publishername" => "PUBLISHER", - "ulink" => "URL"); + "ulink" => "LINK0"); # this list holds all "elements" that are created as a seg with an attribute -my @tei_seg_elements = ("userdef1", "userdef2", "userdef3", "userdef4", "userdef5", "misc1", "misc2", "misc3", "link1", "link2", "link3", "link4", "notes"); +my @tei_seg_elements = ("userdef1", "userdef2", "userdef3", "userdef4", "userdef5", "misc1", "misc2", "misc3", "link0", "link1", "link2", "link3", "link4", "notes"); # this list holds all "elements" that are created as a biblScope with @@ -59,4 +59,5 @@ "misc2" => "MISC2", "misc3" => "MISC3", + "link0" => "LINK0", "link1" => "LINK1", "link2" => "LINK2", @@ -254,4 +255,23 @@ } + # title as author in bibliography + # todo: bibliomset[@role='bibliography']/???/bibliomset[@relation='author']/title + print "<!-- title as author in bibliography -->\n\n"; + + print "<xsl:template match=\"bibliomset[\@role=\'bibliography\']/bibliomset/bibliomset[\@relation=\'author\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibliomixed/\@role\"/>\n <xsl:choose>\n"; + + foreach $type (@types) { + print " <xsl:when test=\"\$reftype=\'$type\'\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "AUTHORLISTALTERNATESTYLE\"/>\n </xsl:call-template>\n </xsl:when>\n"; + } + + print " </xsl:choose>\n</xsl:template>\n\n"; + + # title as author in intext citation + print "<!-- title as author in intext citation -->\n\n"; + + foreach $type (@intext_types) { + print "<xsl:template match=\"bibliomset[\@relation=\'author\'][title]\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "AUTHORLISTALTERNATESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + } + # folded multiple citation print "<!-- folded multiple citation -->\n\n"; @@ -497,4 +517,22 @@ } + # title as author in bibliography + print "<!-- title as author in bibliography -->\n\n"; + + print "<xsl:template match=\"seg[\@type=\'author\']/title\" mode=\"refdb\">\n <xsl:variable name=\"reftype\" select=\"ancestor::bibl/\@rend\"/>\n <xsl:choose>"; + + foreach $type (@types) { + print " <xsl:when test=\"\$reftype=\'$type\'\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "AUTHORLISTALTERNATESTYLE\"/>\n </xsl:call-template>\n </xsl:when>\n"; + } + + print " </xsl:choose>\n</xsl:template>\n\n"; + + # title as author in intext citation + print "<!-- title as author in intext citation -->\n\n"; + + foreach $type (@intext_types) { + print "<xsl:template match=\"seg[\@type=\'author\'][title]\" mode=\"$type\">\n <xsl:call-template name=\"refdb-process-inline\">\n <xsl:with-param name=\"style\" select=\"\$$type" . "AUTHORLISTALTERNATESTYLE\"/>\n </xsl:call-template>\n</xsl:template>\n\n"; + } + print "<!-- folded multiple citation -->\n\n"; Index: vargen.pl =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/vargen.pl,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -U2 -r1.2 -r1.2.2.1 --- vargen.pl 12 Sep 2003 00:11:37 -0000 1.2 +++ vargen.pl 2 Oct 2005 23:38:14 -0000 1.2.2.1 @@ -9,5 +9,5 @@ # this list holds all citation/reference part styles -my @styles = ("ALLALISTSTYLE", "AUTHORLISTSTYLE", "EDITORLISTSTYLE", "SEDITORLISTSTYLE", "ALLALISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "AUTHORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "EDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "SEDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "ALLALISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "AUTHORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "EDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "SEDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "PUBDATESTYLE", "PUBDATESECSTYLE", "PUBDATEALLSTYLE", "TITLESTYLE", "BOOKTITLESTYLE", "SERIESTITLESTYLE", "ALLTITLESTYLE", "JOURNALNAMESTYLE", "VOLUMESTYLE", "ISSUESTYLE", "PAGESSTYLE", "PUBLISHERSTYLE", "PUBPLACESTYLE", "SERIALSTYLE", "ADDRESSSTYLE", "URLSTYLE", "USERDEF1STYLE", "USERDEF2STYLE", "USERDEF3STYLE", "USERDEF4STYLE", "USERDEF5STYLE", "MISC1STYLE", "MISC2STYLE", "MISC3STYLE", "NOTESSTYLE", "ABSTRACTSTYLE", "LINK1STYLE", "LINK2STYLE", "LINK3STYLE", "LINK4STYLE", "REFNUMBERSTYLE", "PAGESPAGERANGESTYLE", "ALLALISTABBREVIATEFIRSTSTYLE", "ALLALISTABBREVIATESUBSEQSTYLE", "AUTHORLISTABBREVIATEFIRSTSTYLE", "EDITORLISTABBREVIATEFIRSTSTYLE", "SEDITORLISTABBREVIATEFIRSTSTYLE", "AUTHORLISTABBREVIATESUBSEQSTYLE", "EDITORLISTABBREVIATESUBSEQSTYLE", "SEDITORLISTABBREVIATESUBSEQSTYLE"); +my @styles = ("ALLALISTSTYLE", "AUTHORLISTSTYLE", "EDITORLISTSTYLE", "SEDITORLISTSTYLE", "ALLALISTALTERNATESTYLE", "AUTHORLISTALTERNATESTYLE", "EDITORLISTALTERNATESTYLE", "SEDITORLISTALTERNATESTYLE", "ALLALISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "AUTHORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "EDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "SEDITORLISTAUTHORNAMESNAMEFIRSTINITIALSTYLE", "ALLALISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "AUTHORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "EDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "SEDITORLISTAUTHORNAMESNAMEOTHERINITIALSTYLE", "PUBDATESTYLE", "PUBDATESECSTYLE", "PUBDATEALLSTYLE", "TITLESTYLE", "BOOKTITLESTYLE", "SERIESTITLESTYLE", "ALLTITLESTYLE", "JOURNALNAMESTYLE", "VOLUMESTYLE", "ISSUESTYLE", "PAGESSTYLE", "PUBLISHERSTYLE", "PUBPLACESTYLE", "SERIALSTYLE", "ADDRESSSTYLE", "URLSTYLE", "USERDEF1STYLE", "USERDEF2STYLE", "USERDEF3STYLE", "USERDEF4STYLE", "USERDEF5STYLE", "MISC1STYLE", "MISC2STYLE", "MISC3STYLE", "NOTESSTYLE", "ABSTRACTSTYLE", "LINK1STYLE", "LINK2STYLE", "LINK3STYLE", "LINK4STYLE", "REFNUMBERSTYLE", "PAGESPAGERANGESTYLE", "ALLALISTABBREVIATEFIRSTSTYLE", "ALLALISTABBREVIATESUBSEQSTYLE", "AUTHORLISTABBREVIATEFIRSTSTYLE", "EDITORLISTABBREVIATEFIRSTSTYLE", "SEDITORLISTABBREVIATEFIRSTSTYLE", "AUTHORLISTABBREVIATESUBSEQSTYLE", "EDITORLISTABBREVIATESUBSEQSTYLE", "SEDITORLISTABBREVIATESUBSEQSTYLE"); |
From: Markus H. <mho...@us...> - 2005-10-02 23:38:22
|
Update of /cvsroot/refdb/refdb/dsssl/refdb/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32648/dsssl/refdb/html Modified Files: Tag: Release_0_9_5_stable docbook-refdb.dsl Log Message: added support for title-instead-of-missing-author Index: docbook-refdb.dsl =================================================================== RCS file: /cvsroot/refdb/refdb/dsssl/refdb/html/docbook-refdb.dsl,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -u -U2 -r1.8.2.1 -r1.8.2.2 --- docbook-refdb.dsl 29 Sep 2005 22:26:02 -0000 1.8.2.1 +++ docbook-refdb.dsl 2 Oct 2005 23:38:14 -0000 1.8.2.2 @@ -726,8 +726,10 @@ ((equal? rel (normalize "chapter")) (refdb-process-inline "CHAPTITLESTYLE")) + ((equal? rel (normalize "series")) + (refdb-process-inline "SERIESTITLESTYLE")) ((equal? rel (normalize "author")) - (refdb-process-inline "AUTHORLISTSTYLE")) + (refdb-process-inline "AUTHORLISTALTERNATESTYLE")) (else (make element gi: "B" - (process-children)))))) + (process-children)))))) (element bibliomset |
From: Markus H. <mho...@us...> - 2005-10-02 23:34:29
|
Update of /cvsroot/refdb/refdb/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32228/doc Modified Files: Tag: Release_0_9_5_stable Makefile.am Log Message: fix html build problem Index: Makefile.am =================================================================== RCS file: /cvsroot/refdb/refdb/doc/Attic/Makefile.am,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -U2 -r1.1.2.3 -r1.1.2.4 --- Makefile.am 7 Sep 2005 23:18:37 -0000 1.1.2.3 +++ Makefile.am 2 Oct 2005 23:34:20 -0000 1.1.2.4 @@ -38,4 +38,5 @@ refdb-manual/*: $(manual_sources) $(png_images) refdb-manual-statustable.sgml include/doc-html.dsl @echo "Creating HTML manual..."; + rm -rf refdb-manual/* mkdir -p refdb-manual && cd refdb-manual && openjade -t sgml -d ../include/doc-html.dsl $(sgml_decl) ../refdb-manual.sgml cp $(html_extra_files) refdb-manual/ |
From: David N. <dav...@us...> - 2005-10-02 22:44:19
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv368 Modified Files: Tag: Release_0_9_5_stable refdb-backup Log Message: Remove dependence on bash string chopping; general tidying Index: refdb-backup =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdb-backup,v retrieving revision 1.3.2.4 retrieving revision 1.3.2.5 diff -u -U2 -r1.3.2.4 -r1.3.2.5 --- refdb-backup 3 Feb 2005 11:45:20 -0000 1.3.2.4 +++ refdb-backup 1 Oct 2005 11:17:14 -0000 1.3.2.5 @@ -11,10 +11,12 @@ # VARIABLES -references_backup="references" # base of references backup file name -notes_backup="xnotes.xml" # notes backup file name -styles_directory="styles" # name of styles directory (intra-archive) + +self="$( basename ${0} )" +ref_base="references" # base of references backup file name +note_filename="xnotes.xml" # notes backup file name +style_dir="styles" # name of styles directory (intra-archive) logfile="log_backup" # name of log file -archive="refdb_backup_`date '+%Y%m%d_%H%M'`.tar.gz" # archive name -start_dir=`pwd` # directory in which utility is run +archive="refdb_backup_$( date '+%Y%m%d_%H%M' ).tar.gz" # archive name +start_dir=$( pwd ) # directory in which utility is run backup_dir=${start_dir} # overridden by '-d' option format="ris" # overridden by '-f' option @@ -23,4 +25,5 @@ parameters="[-u USER] [-w PWD] [-f FORMAT] [-d DIR] [-s]" # cmd-line args feedback="true" # whether user receives screen feedback +divider="----------------------------------------------------------------" @@ -32,13 +35,14 @@ # 3 - copy to log? ( 0 = true, 1 = false ) # 4 - terminate with newline? ( 0 = true, 1 = false ) +# prints: nil # return: nil feedback () { # decide on use of newline flag - if [ $4 -ne 0 ] ; then use_newline="-n" ; else use_newline="" ; fi + if [ ${4} -ne 0 ] ; then use_newline="-n" ; else use_newline="" ; fi # add indents as required - msg=$1 + msg="${1}" loop=1 while [ 1 ] ; do - [ ${loop} -gt $2 ] && break + [ ${loop} -gt ${2} ] && break [ ${feedback} ] && echo -n " " loop=$(( ${loop} + 1 )) @@ -47,5 +51,5 @@ [ ${feedback} ] && echo ${use_newline} ${msg} # log feedback - [ $3 -eq 0 ] && echo ${use_newline} ${msg} >> ${logfile} + [ ${3} -eq 0 ] && echo ${use_newline} ${msg} >> ${logfile} } # Report success of operation @@ -54,9 +58,9 @@ # return: nil report () { - if [ $1 -eq 0 ] ; then - [ "$2" = "log" ] && echo "OK." >> ${logfile} + if [ ${1} -eq 0 ] ; then + [ "${2}" = "log" ] && echo "OK." >> ${logfile} feedback " OK." 0 1 0 else - [ "$2" = "log" ] && echo "Failed." >> ${logfile} + [ "${2}" = "log" ] && echo "Failed." >> ${logfile} feedback " Failed." 0 1 0 fi @@ -64,19 +68,24 @@ # Report failure and abort # params: 1 - message -# 2 - success flag ( "succeeded" = yes | "*" = no ) +# 2 - success flag (0|* = success|failure) # return: nil endScript () { + # set status message + local result="failed" + [ ${2} -eq 0 ] && result="succeeded" # attempt to change back to initial directory - cd ${start_dir} || \ - feedback "Error: Unable to cd to start dir '${start_dir}'." 0 1 0 + err_msg="Error: Unable to cd to start dir '${start_dir}'." + cd ${start_dir} || feedback "${err_msg}" 0 1 0 # attempt to delete temporary files - err_msg="Error: Unable to delete temporary directory '${tempdir}'." - [ -d ${tempdir} ] && rm -fr ${tempdir} || feedback ${err_msg} 0 1 0 + err_msg="Error: Unable to delete temporary directory '${tmp_dir}'." + [ -d ${tmp_dir} ] && rm -fr ${tmp_dir} || feedback ${err_msg} 0 1 0 # provide feedback regarding success of backup - feedback " " 0 1 0 ; feedback "$1" 0 1 0 - feedback " " 0 1 0 ; feedback "refdb backup $2." 0 1 0 - feedback "`basename $0` is finished." 0 1 0 + if [ ${2} -ne 0 ] ; then err_msg="Error: " ; else err_msg="" ; fi + err_msg="${err_msg}${1}" + feedback " " 0 1 0 ; feedback "${err_msg}" 0 1 0 + feedback " " 0 1 0 ; feedback "refdb backup ${result}." 0 1 0 + feedback "${self} is finished." 0 1 0 # provide exit status to shell - if [ "$2" = "succeeded" ] ; then exit 0 ; else exit 1 ; fi + exit ${2} } # Show usage @@ -84,10 +93,10 @@ # return: nil displayUsage () { - echo "`basename $0`: Backs up RefDB data." + echo "${self}: Backs up RefDB data." echo echo "Backs up references, notes and styles from RefDB." echo - echo "Usage: `basename $0` ${parameters}" - echo " `basename $0` [ -h ]" + echo "Usage: ${self} ${parameters}" + echo " ${self} [-h]" echo echo "Options: -u USER = username for RefDB clients ('refdba'|'refdbc')" @@ -105,4 +114,48 @@ echo "'refdb_backup_YYYYMMDD_HHMM.tar.gz'." } +# Remove terminal slash from string +# params: 1 - string +# prints: altered string +# return: nil +removeTerminalSlash () { + echo "$( echo "${1}" | sed -e 's/\(.*\)\/$/\1/' )" +} +# Normalise path (make absolute) +# params: 1 - path +# prints: normalised path +# return: nil +normalisePath () { + local path="${1}" + # deal with shorthand for home directory + path="$( echo ${path} | sed -e "s?^~?${HOME}?" )" + # deal with relative path + [ $( echo ${path} | grep -c -- "^/" ) -eq 0 ] && path="$( pwd )/${path}" + # remove relative "parent" directories + while [ $( echo "${path}" | grep -c -- "\.\.\/.*\?\/" ) -gt 0 ] ; do + path="$( echo "${path}" \ + | perl -pe 's:(.*\/)[^\.\.].*?\/\.\.\/(.*):\1\2:' )" + done + # remove terminal slash from directory + path="$( removeTerminalSlash "${path}" )" + # return result + echo "${path}" +} +# Contains space? +# params: 1 - string +# prints: nil +# return: 0|1 (no space|space) +noSpace () { + return $( echo "${1}" | grep -c -- " " ) +} +# Directory exists and is readable and writable +# params: 1 - directory +# prints: nil +# return: 0|1 (exists|does not exist) +# invoke: if dirValid "${dir_name}" ; then ... +# needs: functions [noSpace] +dirValid () { + test -d "${1}" -a -r "${1}" -a -w "${1}" && noSpace "${1}" && return 0 + return 1 +} @@ -113,6 +166,6 @@ case ${opt} in h ) displayUsage && exit 0;; - f ) format=${OPTARG};; - d ) backup_dir=${OPTARG};; + f ) format="${OPTARG}";; + d ) backup_dir="${OPTARG}";; u ) refdba="${refdba} -u \"${OPTARG}\"" refdbc="${refdbc} -u \"${OPTARG}\"";; @@ -121,11 +174,11 @@ s ) feedback="";; \? ) echo "Error: Invalid flag '${OPTARG}' detected" - echo "Usage: `basename $0` ${parameters}" - echo "Try '`basename $0` -h' for help" + echo "Usage: ${self} ${parameters}" + echo "Try '${self} -h' for help" echo -ne "\a" exit 1;; \: ) echo "Error: No argument supplied for flag '${OPTARG}'" - echo "Usage: `basename $0` ${parameters}" - echo "Try '`basename $0` -h' for help" + echo "Usage: ${self} ${parameters}" + echo "Try '${self} -h' for help" echo -ne "\a" exit 1;; @@ -137,43 +190,31 @@ # - format ('ris'|'risx') case ${format} in - ris ) extension="ris";; - risx ) extension="xml";; - * ) endScript \ - "Error: '${format}' is an invalid reference storage format." \ - "failed";; + ris ) ext="ris";; + risx ) ext="xml";; + * ) endScript "Invalid storage format '${format}'." 1;; esac # - directory must be writable - # remove terminal slash '/' -[ `echo ${backup_dir} | grep "\/$"` ] && backup_dir=${backup_dir%%/} - # convert relative to absolute dirpath -[ `echo ${backup_dir} | grep -v "^\/"` ] && \ - backup_dir="${start_dir}/${backup_dir}" - # now can test -if [ ! -d ${backup_dir} -o ! -w ${backup_dir} ] ; then - endScript "Error: '${backup_dir}' is not a writable directory." "failed" -fi +backup_dir="$( normalisePath "${backup_dir}" )" +dirValid "${backup_dir}" || endScript "'${backup_dir}' is not writable." 1 # Test for RefDB access ${refdba} -C listdb &> /dev/null || \ - endScript "Error: Unable to access RefDB using client 'refdba'." "failed" + endScript "Unable to access RefDB using client 'refdba'." 1 ${refdbc} -C listdb &> /dev/null || \ - endScript "Error: Unable to access RefDB using client 'refdbc'." "failed" + endScript "Unable to access RefDB using client 'refdbc'." 1 # Will use temporary directory for working # - ensure deletion on exit and change to working directory -tempdir_base="`basename $0`.XXXXXX" -tempdir=`mktemp -dq ${tempdir_base}` \ - || endScript "Error: Unable to create temporary directory." "failed" -trap "rm -fr ${tempdir}" 0 1 2 3 5 15 # delete on exit -cd ${tempdir} || \ - endScript "Error: Unable to cd to temporary directory '${tempdir}'." \ - "failed" +tmp_dir="$( mktemp -dq )" \ + || endScript "Unable to create temporary directory." 1 +trap "rm -fr ${tmp_dir}" 0 1 2 3 5 15 # delete on exit +cd ${tmp_dir} || endScript "Unable to cd to temp dir '${tmp_dir}'." 1 # Informational message -feedback "`basename $0` is running..." 0 1 0 ; feedback " " 0 1 0 +feedback "${self} is running..." 0 1 0 ; feedback " " 0 1 0 # Record date/time of backup -echo "RefDB backup performed by '`basename $0`'." > ${logfile} -echo "Performed: `date '+%Y-%m-%d, %H:%M:%S'`." >> ${logfile} +echo "RefDB backup performed by '${self}'." > ${logfile} +echo "Performed: $( date '+%Y-%m-%d, %H:%M:%S' )." >> ${logfile} feedback "Storage format: ${format}." 0 0 0 feedback " " 0 1 0 @@ -181,41 +222,40 @@ # Cycle through databases in turn and backup references and notes -for db in `${refdba} -C listdb | cut -d ' ' -f 1` ; do +for db in $( ${refdba} -C listdb 2> /dev/null | cut -d ' ' -f 1 ) ; do feedback "Processing database: ${db}" 0 0 0 - dirname="db_${db}" - feedback "Creating subdirectory '${dirname}' ..." 1 0 1 - mkdir ${dirname} &> /dev/null - report $? log + dir_name="db_${db}" + feedback "Creating subdirectory '${dir_name}' ..." 1 0 1 + mkdir ${dir_name} &> /dev/null + report ${?} log # dump references - reffile="${dirname}/${references_backup}.${extension}" + ref_file="${dir_name}/${ref_base}.${ext}" feedback "Backing up references ..." 1 0 1 - ${refdbc} -C getref -d ${db} -t ${format} -o ${reffile} ":ID:>0" \ + ${refdbc} -C getref -d ${db} -t ${format} -o ${ref_file} ":ID:>0" \ &> /dev/null - report $? log + report ${?} log # dump notes - notefile="${dirname}/${notes_backup}" + note_file="${dir_name}/${note_filename}" feedback "Backing up notes ..." 1 0 1 - ${refdbc} -C getnote -d ${db} -t xnote -o ${notefile} ":NID:>0" \ + ${refdbc} -C getnote -d ${db} -t xnote -o ${note_file} ":NID:>0" \ &> /dev/null - report $? log + report ${?} log done +unset ref_base note_filename format refdbc ext dir_name note_file # Cycle through styles in turn and back them up feedback "Processing styles" 0 0 0 -feedback "Creating styles directory '${styles_directory}' ..." 1 0 1 -mkdir ${styles_directory} &> /dev/null -report $? log -for style in `${refdba} -C liststyle` ; do +feedback "Creating styles directory '${style_dir}' ..." 1 0 1 +mkdir ${style_dir} &> /dev/null +report ${?} log +styles="$( ${refdba} -C liststyle 2> /dev/null )" +for style in ${styles} ; do feedback "Backing up style: ${style} ..." 1 0 1 # remove terminal period from file name if present - if [ `echo ${style} | grep "\.$" | wc -l` -eq 1 ] ; then - stylefile=${style%*.} - else - stylefile=${style} - fi - stylefile="${styles_directory}/${stylefile}.xml" + stylefile="$( echo "${style}" | sed -e 's:\(.*\)\.$:\1:' )" + stylefile="${style_dir}/${stylefile}.xml" ${refdba} -C getstyle -o ${stylefile} ${style} &> /dev/null - report $? log + report ${?} log done +unset style_dir refdba styles # Now done @@ -226,19 +266,18 @@ feedback "Create archive" 0 1 0 feedback "Writing archive ..." 1 1 1 -tar -czf ${archive} * -exit_status=$? && report ${exit_status} -[ ${exit_status} -ne 0 ] \ - && endScript "Error: Unable to write archive." "failed" +tar -czf ${archive} * &> /dev/null +exit_status=${?} +report ${exit_status} +[ ${exit_status} -eq 0 ] || endScript "Unable to write archive." 1 # Move archive to backup directory feedback "Copying archive to target directory..." 1 1 1 mv -f ${archive} ${backup_dir} &> /dev/null -exit_status=$? && report ${exit_status} +exit_status=${?} && report ${exit_status} [ ${exit_status} -ne 0 ] \ - && endScript "Error: Unable to move archive to backup directory." \ - "failed" + && endScript "Unable to move archive to backup dir." 1 # Finished [ "${backup_dir}" != "${start_dir}" ] && archive="${backup_dir}/${archive}" feedback " " 0 1 0 ; feedback "Backup archive: '${archive}'." 0 1 0 -endScript "Backup finished." "succeeded" +endScript "Backup finished." 0 |
From: David N. <dav...@us...> - 2005-09-30 19:44:43
|
Update of /cvsroot/refdb/refdb/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6170 Modified Files: Tag: Release_0_9_5_stable refdb-restore Log Message: Removed reliance on bash-specific string chopping, added error feedback, skip empty notes files (caused major run-time error) Index: refdb-restore =================================================================== RCS file: /cvsroot/refdb/refdb/scripts/refdb-restore,v retrieving revision 1.3.2.5 retrieving revision 1.3.2.6 diff -u -U2 -r1.3.2.5 -r1.3.2.6 --- refdb-restore 3 Feb 2005 13:07:02 -0000 1.3.2.5 +++ refdb-restore 30 Sep 2005 16:55:21 -0000 1.3.2.6 @@ -13,12 +13,16 @@ # VARIABLES -references_backup="references" # base of references backup file name -notes_backup="xnotes.xml" # notes backup file name -styles_directory="styles" # name of styles directory (intra-archive) -start_dir=`pwd` # directory in which utility is run + +self="$( basename ${0} )" +ref_base="references" # base of references backup file name +note_filename="xnotes.xml" # notes backup file name +style_dir="styles" # name of styles directory (intra-archive) +start_dir="$( pwd )" # directory in which utility is run refdba="refdba" # refdba command refdbc="refdbc" # refdbc command -archive=$1 # name of backup archive +archive="${1}" # name of backup archive parameters="[-u USER] [-w PWD] <backup_archive>" # cmd-line options +divider="----------------------------------------------------------------" + # PROCEDURES @@ -26,35 +30,43 @@ # Report success of operation # params: 1 - exit status +# prints: feedback ('OK'|'Failed') # return: nil report () { - if [ $1 -eq 0 ] ; then echo "OK." ; else echo "Failed." ; fi + if [ ${1} -eq 0 ] ; then echo "OK." ; else echo "Failed." ; fi } # Report failure and abort # params: 1 - exit message -# 2 - success indicator ( 'succeeded'|* ) -# retuns: nil +# 2 - exit status ( 0|* ) +# prints: feedback (not for capture) +# return: nil endScript () { + # set variables + local msg="${1}" local status="failed" + if [ ${2} -eq 0 ] ; then status="succeeded" + else msg="Error: ${msg}" + fi # attempt to change back to initial directory cd ${start_dir} || \ echo "Error: Unable to cd to start dir '${start_dir}'." # attempt to delete temporary files - [ -d ${tempdir} ] && rm -fr ${tempdir} || \ - echo "Error: Unable to delete temporary directory '${tempdir}'." + [ -d ${tmp_dir} ] && rm -fr ${tmp_dir} || \ + echo "Error: Unable to delete temporary directory '${tmp_dir}'." # provide feedback regarding success of backup - echo ; echo "$1" - echo ; echo "refdb restore $2." - echo "`basename $0` is finished." + echo ; echo "${1}" + echo ; echo "refdb restore ${status}." + echo "${self} is finished." # provide exit status to shell - if [ "$2" = "succeeded" ] ; then exit 0 ; else exit 1 ; fi + exit ${2} } # Show usage # params: nil +# prints: message (not for capture) # return: nil displayUsage () { - echo "`basename $0`: Restores RefDb data from backup." + echo "${self}: Restores RefDb data from backup." echo echo "Restores references, notes and styles from backup archive." echo - echo "Usage: `basename $0` ${parameters}" + echo "Usage: ${self} ${parameters}" echo echo "Must be archive created by 'refdb-backup' utility." @@ -69,28 +81,126 @@ # 2 - database name # 3 - backup file basename -# return: filename ('db_DBNAME/BACKUPFILE.EXTENSION') -get_filename () { - archive=$1 - db=$2 - base=$3 - filelist=`tar -tzf $1 | grep -v "/$" | grep "^db_"` - [ `echo "${filelist}" | grep "^db_${db}/${references_backup}.xml"` ] \ - && extension="xml" - [ `echo "${filelist}" | grep "^db_${db}/${references_backup}.ris"` ] \ - && extension="ris" - echo "db_${db}/${references_backup}.${extension}" +# prints: filename ('db_DBNAME/BACKUPFILE.EXTENSION') +# return: nil +getFilename () { + local archive="${1}" db="${2}" base="${3}" file="" ext="" + files="$( tar -tzf ${archive} | grep -v -- "/$" | grep -- "^db_" )" + file="$( echo "${files}" | grep -- "^db_${db}/${base}\." )" + ext="$( echo "${file}" | sed -e "s:^db_${db}\/${base}\.\(.*\)$:\1:" )" + echo "db_${db}/${base}.${ext}" } # Determines format of backup reference file # params: 1 - backup filepath -# return: format ('ris'|'risx') -get_format () { - filepath=$1 - filename=${filepath##*/} # strip path - extension=${filename##*.} # strip basename - case ${extension} in +# prints: format ('ris'|'risx') +# return: nil +getFormat () { + local path="${1}" + local name="$( basename "${path}" )" + local ext="$( echo "${name}" | awk -F "." '{ print $NF }' )" + case ${ext} in ris ) echo "ris";; xml ) echo "risx";; * ) echo "ERROR";; esac +} +# Remove terminal slash from string +# params: 1 - string +# prints: altered string +# return: nil +removeTerminalSlash () { + echo "$( echo "${1}" | sed -e 's/\(.*\)\/$/\1/' )" +} +# Normalise path (make absolute) +# params: 1 - path +# prints: normalised path +# return: nil +normalisePath () { + local path="${1}" + # deal with shorthand for home directory + path="$( echo ${path} | sed -e "s?^~?${HOME}?" )" + # deal with relative path + [ $( echo ${path} | grep -c -- "^/" ) -eq 0 ] && path="$( pwd )/${path}" + # remove relative "parent" directories + while [ $( echo "${path}" | grep -c -- "\.\.\/.*\?\/" ) -gt 0 ] ; do + path="$( echo "${path}" \ + | perl -pe 's:(.*\/)[^\.\.].*?\/\.\.\/(.*):\1\2:' )" + done + # remove terminal slash from directory + path="$( removeTerminalSlash "${path}" )" + # return result + echo "${path}" +} +# Provide feedback after shell command execution +# params: 1 - shell exit value +# 2 - shell messages +# prints: feedback (not for capture) +# return: nil +# needs: variables [divider] +# assume: shell operation preceded by msg requiring 'report' completion +shellCmdResult () { + # set variables + local exit_value=${1} err_msg="${2}" + # finish off previous message + report ${exit_value} + # print error message(s) if command failed + if [ ${exit_value} -ne 0 ] ; then # give error feedback + if [ -n "${err_msg}" ] ; then # error messages captured + echo "The following error messages were generated:" + echo "${divider}" + echo "${err_msg}" + echo "${divider}" + else # no error messages captured + echo "No error messages were generated." + fi + fi +} +# Get file size +# params: 1 - filepath +# prints: file size +# return: nil +getFileSize () { + local path="${1}" + path="$( normalisePath "${path}" )" + echo $( dir -l ${path} | sed -e 's/ \+/ /g' | cut -d ' ' -f 5 ) +} +# Is file of zero size? +# params: 1 - filepath +# prints: nil +# return: boolean (0|*) +zeroFileSize () { + return $( getFileSize "${1}" ) +} +# Contains space? +# params: 1 - string +# prints: nil +# return: 0|1 (no space|space) +noSpace () { + return $( echo "${1}" | grep -c -- " " ) +} +# File exists and readable +# params: 1 - file +# prints: nil +# return: 0|1 (exists|does not exist) +# invoke: if dnFileValid "${filename}" ; then ... +# needs: functions [dnNoSpace] +fileValid () { + if test -f "${1}" -a -r "${1}" && noSpace "${1}" ; then return 0 + else return 1 + fi +} +# Checks whether archive is a valid tarzip +# params: 1 - archive filepath +# prints: nil +# return: 0|1 (valid|not valid) +validTarzip () { + # check it exists + local archive="$( normalisePath "${1}" )" + fileValid "${archive}" || return 1 + # check it has correct extension + [ $( echo "${archive}" | grep -c -- "\.tar\.gz$" ) -gt 0 ] || return 1 + # check it is in correct format + tar --gunzip --list --file "${archive}" &> /dev/null || return 1 + # done + return 0 } @@ -107,11 +217,11 @@ refdbc="${refdbc} -w \"${OPTARG}\"";; \? ) echo "Error: Invalid flag '${OPTARG}' detected" - echo "Usage: `basename $0` ${parameters}" - echo "Try '`basename $0` -h' for help" + echo "Usage: ${self} ${parameters}" + echo "Try '${self} -h' for help" echo -ne "\a" exit 1;; \: ) echo "Error: No argument supplied for flag '${OPTARG}'" - echo "Usage: `basename $0` ${parameters}" - echo "Try '`basename $0` -h' for help" + echo "Usage: ${self} ${parameters}" + echo "Try '${self} -h' for help" echo -ne "\a" exit 1;; @@ -121,94 +231,90 @@ -# Check for valid arguments -# - run tests on archive - # - first, convert relative to absolute filepath -[ `echo ${archive} | grep -v "^\/"` ] && archive="${start_dir}/${archive}" - # - must exist and be readable -[ -r ${archive} ] || \ - endScript "Cannot read backup archive '${archive}'." "failed" - # - must be valid archive (this test is a bit crude - just list - # archive contents and check exit status) -tar -tzf ${archive} &> /dev/null || \ - endScript "'${archive}' is not a valid archive." "failed" +# Check for valid argument +# 1 - archive +archive="$( normalisePath "${archive}" )" +validTarzip "${archive}" || endScript "'${archive}' is not a valid archive." 1 # Test for RefDB access -${refdba} -C listdb &> /dev/null || \ - endScript "Error: Unable to access RefDB using client 'refdba'." "failed" -${refdbc} -C listdb &> /dev/null || \ - endScript "Error: Unable to access RefDB using client 'refdbc'." "failed" +${refdba} -C listdb &> /dev/null \ + || endScript "Unable to access RefDB using client 'refdba'." 1 +${refdbc} -C listdb &> /dev/null \ + || endScript "Unable to access RefDB using client 'refdbc'." 1 # Will use temporary directory for working # - ensure deletion on exit and change to working directory -tempdir_base="`basename $0`.XXXXXX" -tempdir=`mktemp -dq ${tempdir_base}` \ - || endScript "Error: Unable to create temporary directory." "failed" -[ `echo ${tempdir} | grep -v "^\/"` ] && tempdir="${start_dir}/${tempdir}" -trap "rm -fr ${tempdir}" 0 1 2 3 5 15 # delete on exit -cd ${tempdir} || \ - endScript "Error: Unable to cd to temporary directory '${tempdir}'." \ - "failed" +tmp_dir="$( mktemp -p ${start_dir} -dq )" \ + || endScript "Unable to create temporary directory." 1 +trap "rm -fr ${tmp_dir}" 0 1 2 3 5 15 # delete on exit +cd ${tmp_dir} \ + || endScript "Unable to cd to temporary directory '${tmp_dir}'." 1 # Informational message -echo "`basename $0` is running..." ; echo +echo "${self} is running..." ; echo # Cycle through databases in turn and restore references and notes -for dbdir in `tar -tzf ${archive} | grep "/$"` ; do +for dbdir in $( tar -tzf ${archive} | grep "/$" ) ; do # get db name - if [ ${dbdir} != "styles/" ] ; then - db=${dbdir##db_} # remove prefix - db=${db%%/} # remove trailing slash + if [ ${dbdir} != "${style_dir}/" ] ; then + db="$( echo "${dbdir}" | sed 's:^db_\(.*\)$:\1:' )" # remove prefix + db="$( removeTerminalSlash "${db}" )" # remove trailing slash echo "Restoring database: ${db}" # restore references - reffile=`get_filename ${archive} ${db} ${references_backup}` + ref_file="$( getFilename ${archive} ${db} ${ref_base} )" echo " Restore references" # - extract file echo -n " Extracting temporary file ... " - tar -xzf ${archive} ${reffile} &> /dev/null - report $? + fb="$( tar -xzf ${archive} ${ref_file} 2>&1 )" + shellCmdResult ${?} "${fb}" # - create database echo -n " Create database ... " - refdba -C createdb ${db} &> /dev/null - report $? + fb="$( ${refdba} -C createdb ${db} 2>&1 )" + shellCmdResult ${?} "${fb}" # - add references echo -n " Adding references ... " - format=`get_format ${reffile}` - refdbc -C addref -d ${db} -t ${format} ${reffile} &> /dev/null - report $? + format="$( getFormat ${ref_file} )" + fb="$( ${refdbc} -C addref -d ${db} -t ${format} ${ref_file} 2>&1 )" + shellCmdResult ${?} "${fb}" # restore notes - notefile="db_${db}/${notes_backup}" + notefile="db_${db}/${note_filename}" echo " Restore notes" # - extract file echo -n " Extracting temporary file ... " - tar -xzf ${archive} ${notefile} &> /dev/null - report $? + fb="$( tar -xzf ${archive} ${notefile} 2>&1 )" + shellCmdResult ${?} "${fb}" # - add notes - echo -n " Adding notes ... " - refdbc -C addnote -d ${db} ${notefile} &> /dev/null - report $? + if zeroFileSize ${notefile} ; then + echo " No notes to add." + else + echo -n " Adding notes ... " + fb="$( ${refdbc} -C addnote -d ${db} ${notefile} 2>&1 )" + shellCmdResult ${?} "${fb}" + fi fi done +unset ref_base note_filename db ref_file format fb notefile # Restore styles echo "Restoring styles" -for stylefile in `tar -tzf ${archive} | grep "^styles/[[:print:]]\+"` ; do +stylefiles="$( tar -tzf ${archive} | grep "^${style_dir}/[[:print:]]\+" )" +for stylefile in ${stylefiles} ; do # extract style file echo -n " Extracting style: " - tar -xzf ${archive} ${stylefile} &> /dev/null - if [ $? -eq 0 ] ; then + fb="$( tar -xzf ${archive} ${stylefile} 2>&1 )" + if [ ${?} -eq 0 ] ; then # extract style name - stylename=`grep "^[[:print:]]*<STYLENAME>" ${stylefile}` - stylename=${stylename#[[:print:]]*<STYLENAME>} - stylename=${stylename%<\/STYLENAME>} - echo ${stylename} + style="$( grep "^[[:print:]]*<STYLENAME>" ${stylefile} | \ + sed 's?^[[:print:]]*<STYLENAME>\(.*\)<\/STYLENAME>?\1?' )" + echo ${style} # add style echo -n " Adding style ... " - refdba -C addstyle ${stylefile} &> /dev/null - report $? + fb="$( ${refdba} -C addstyle ${stylefile} 2>&1 )" + shellCmdResult ${?} "${fb}" else - report 1 + shellCmdResult 1 "${fb}" fi done +unset style_dir archive divider stylefiles style fb # Finished -endScript "Restore finished." "succeeded" +endScript "Restore finished." 0 |
From: Markus H. <mho...@us...> - 2005-09-29 22:36:09
|
Update of /cvsroot/refdb/refdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5765 Modified Files: Tag: Release_0_9_5_stable backend-dbib.c backend-dbib.h backend-dbiba.c backend.c backend.h refdbda.c refdbdbib.c xmlhandler.c xmlhandler.h Log Message: first shot at title-instead-of-missing-authors support in bibliographies and citations Index: backend-dbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.c,v retrieving revision 1.28.2.9 retrieving revision 1.28.2.10 diff -u -U2 -r1.28.2.9 -r1.28.2.10 --- backend-dbib.c 11 Sep 2005 19:55:11 -0000 1.28.2.9 +++ backend-dbib.c 29 Sep 2005 22:35:59 -0000 1.28.2.10 @@ -229,4 +229,5 @@ int n_status; short int n_pubyear; + short int title_as_author; unsigned long long n_sorted_pos1; unsigned long long n_citation_pos; @@ -360,5 +361,5 @@ /* select all datasets in temp table with an xref_pos == 1. This gives us a list of all citation_pos with multiple citations. Walk through this list and create a bibliomset element for each citation, containing all xrefs of that citation. Use the sorted_pos column for numeric citations */ - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos FROM %s WHERE xref_pos=1 ORDER BY citation_pos", table_name); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, title_as_author FROM %s WHERE xref_pos=1 ORDER BY citation_pos", table_name); LOG_PRINT(LOG_DEBUG, sql_command); @@ -387,14 +388,14 @@ /* request all xrefs of this citation and sort them according to the required format */ if (strcmp(item_intextseq, "ASIS") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix FROM %s WHERE citation_pos="ULLSPEC" ORDER BY xref_pos", table_name, (unsigned long long)n_citation_pos); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix, title_as_author FROM %s WHERE citation_pos="ULLSPEC" ORDER BY xref_pos", table_name, (unsigned long long)n_citation_pos); } else if (strcmp(item_intextseq, "AUTHORDATE") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix FROM %s WHERE citation_pos="ULLSPEC" ORDER BY author_concat, pubyear, periodical, volume, issue, startpage", table_name, (unsigned long long)n_citation_pos); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix, title_as_author FROM %s WHERE citation_pos="ULLSPEC" ORDER BY author_concat, pubyear, periodical, volume, issue, startpage", table_name, (unsigned long long)n_citation_pos); } else if (strcmp(item_intextseq, "DATEASC") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix FROM %s WHERE citation_pos="ULLSPEC" ORDER BY pubyear, author_concat, periodical, volume, issue, startpage", table_name, (unsigned long long)n_citation_pos); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix, title_as_author FROM %s WHERE citation_pos="ULLSPEC" ORDER BY pubyear, author_concat, periodical, volume, issue, startpage", table_name, (unsigned long long)n_citation_pos); } else if (strcmp(item_intextseq, "DATEDESC") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix FROM %s WHERE citation_pos="ULLSPEC" ORDER BY pubyear DESC, author_concat, periodical, volume, issue, startpage", table_name, (unsigned long long)n_citation_pos); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, citation_pos, xref_pos, multi_id, sorted_pos, year_uni_suffix, title_as_author FROM %s WHERE citation_pos="ULLSPEC" ORDER BY pubyear DESC, author_concat, periodical, volume, issue, startpage", table_name, (unsigned long long)n_citation_pos); } @@ -626,10 +627,10 @@ - + title_as_author = dbi_result_get_short(dbires2, "title_as_author"); /* if we are supposed to display consecutive sequences of numerical citations as a numerical range, we have to format the first in a possible series and then look ahead if at least two more citations are consecutive (as defined by their sorted order in the bibliography) */ if (ndo_range) { - if ((n_status = format_entry(ptr_ref, ptr_ref_len, intext_string, ptr_bibconns, dbires, dbires3, item_dbname, ptr_clrequest->username, n_sorted_pos, current_mset, ptr_biblio_info)) != 0) { + if ((n_status = format_entry(ptr_ref, ptr_ref_len, intext_string, ptr_bibconns, dbires, dbires3, item_dbname, ptr_clrequest->username, n_sorted_pos, current_mset, ptr_biblio_info, title_as_author)) != 0) { delete_all_lilimem(&sentinel); dbi_result_free(dbires); @@ -684,5 +685,5 @@ /* don't use ranges. We have to format each entry */ else { - if ((n_status = format_entry(ptr_ref, ptr_ref_len, intext_string, ptr_bibconns, dbires, dbires3, item_dbname, ptr_clrequest->username, n_sorted_pos, current_mset, ptr_biblio_info)) != 0) { + if ((n_status = format_entry(ptr_ref, ptr_ref_len, intext_string, ptr_bibconns, dbires, dbires3, item_dbname, ptr_clrequest->username, n_sorted_pos, current_mset, ptr_biblio_info, title_as_author)) != 0) { delete_all_lilimem(&sentinel); dbi_result_free(dbires); @@ -797,6 +798,9 @@ style and if the bibliography needs to be numbered + short title_as_author if yes, the reference has no authors and the style + wants the title to be printed instead + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int render_dbib(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, const char* database, struct bibinfo* ptr_biblio_info, char* username, char* pdfroot, int nref_counter) { +int render_dbib(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, const char* database, struct bibinfo* ptr_biblio_info, char* username, char* pdfroot, int nref_counter, short title_as_author) { int error; int i; /* the tried-and-true counter */ @@ -966,5 +970,5 @@ } - if ((n_status = format_entry(ptr_ref, ptr_ref_len, format_spec[i], ptr_bibconns, dbires_cit, dbires, database, username, nref_counter, current_mset, ptr_biblio_info)) != 0) { + if ((n_status = format_entry(ptr_ref, ptr_ref_len, format_spec[i], ptr_bibconns, dbires_cit, dbires, database, username, nref_counter, current_mset, ptr_biblio_info, title_as_author)) != 0) { dbi_result_free(dbires_cit); delete_all_lilimem(&sentinel); @@ -1025,5 +1029,5 @@ } - if ((n_status = format_entry(ptr_ref, ptr_ref_len, buffer, ptr_bibconns, dbires_cit, dbires, database, username, nref_counter, current_mset, ptr_biblio_info)) != 0) { /* format bibliography entry body according to PUBTYPE */ + if ((n_status = format_entry(ptr_ref, ptr_ref_len, buffer, ptr_bibconns, dbires_cit, dbires, database, username, nref_counter, current_mset, ptr_biblio_info, title_as_author)) != 0) { /* format bibliography entry body according to PUBTYPE */ dbi_result_free(dbires_cit); delete_all_lilimem(&sentinel); @@ -1094,6 +1098,8 @@ info + short title_as_author if 1, the reference has no authors and the style + wants the title to be printed instead ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int format_entry(char** ptr_ref, size_t* ptr_ref_len, char* pubtype, struct BIBCONNS* ptr_bibconns, dbi_result dbires_cit, dbi_result dbires, const char* database, const char* username, int nref_counter, char* current_mset, struct bibinfo* ptr_biblio_info) { +int format_entry(char** ptr_ref, size_t* ptr_ref_len, char* pubtype, struct BIBCONNS* ptr_bibconns, dbi_result dbires_cit, dbi_result dbires, const char* database, const char* username, int nref_counter, char* current_mset, struct bibinfo* ptr_biblio_info, short title_as_author) { int error = 0; size_t nref_buffer_len; @@ -1104,4 +1110,5 @@ unsigned int n_refstyle_id; unsigned int n_separator_id; + short my_title_as_author; char *new_ref; char *ref_buffer; @@ -1159,7 +1166,14 @@ } + if (title_as_author) { + my_title_as_author = (!strcmp(pubtype, "BOOK")) ? 2:1; + } + else { + my_title_as_author = 0; + } + /* only need authorlist (used for finding citations with same author/year) */ if (!dbires) { - if ((n_status = format_authorlist(ptr_ref, ptr_ref_len, ptr_bibconns, dbires, dbi_style_res, 0, database, 1, ptr_biblio_info)) != 0) { + if ((n_status = format_authorlist(ptr_ref, ptr_ref_len, ptr_bibconns, dbires, dbi_style_res, 0, database, 1, ptr_biblio_info, my_title_as_author)) != 0) { error = 1; } @@ -1267,5 +1281,5 @@ ref_buffer = new_ref_buffer; - if ((n_status = format_authorlist(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 0, database, n_intext, ptr_biblio_info)) != 0) { + if ((n_status = format_authorlist(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 0, database, n_intext, ptr_biblio_info, title_as_author)) != 0) { error = n_status; break; @@ -1299,5 +1313,5 @@ ref_buffer = new_ref_buffer; - if ((n_status = format_authorlist(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 1, database, n_intext, ptr_biblio_info)) != 0) { + if ((n_status = format_authorlist(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 1, database, n_intext, ptr_biblio_info, 0 /* never use title */)) != 0) { error = n_status; break; @@ -1330,5 +1344,5 @@ ref_buffer = new_ref_buffer; - if ((n_status = format_authorlist(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 2, database, n_intext, ptr_biblio_info)) != 0) { + if ((n_status = format_authorlist(&ref_buffer, &nref_buffer_len, ptr_bibconns, dbires, dbi_style_res, 2, database, n_intext, ptr_biblio_info, 0 /* never use title */)) != 0) { error = n_status; break; @@ -1426,5 +1440,6 @@ } /*---------------------------------------------------------------*/ - else if (strcmp(item_type, "TITLE") == 0) { + else if (strcmp(item_type, "TITLE") == 0 + && !title_as_author) { if (!n_intext) { if (strcmp(pubtype, "CHAP") == 0 Index: backend-dbib.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbib.h,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -u -U2 -r1.9.2.3 -r1.9.2.4 --- backend-dbib.h 7 Sep 2005 23:45:00 -0000 1.9.2.3 +++ backend-dbib.h 29 Sep 2005 22:35:59 -0000 1.9.2.4 @@ -28,9 +28,9 @@ int prepare_render_dbib(char* ref, struct bibinfo* ptr_biblio_info, dbi_result dbires, int n_ref_format); int finish_render_dbib(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, struct bibinfo* ptr_biblio_info, char* table_name, struct CLIENT_REQUEST* ptr_clrequest); -int render_dbib(char** ptr_ref, size_t* ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, const char* database, struct bibinfo* ptr_biblio_info, char* username, char* pdfroot, int nref_counter); -int format_entry(char** ptr_ref, size_t* ptr_ref_len, char* pubtype, struct BIBCONNS* ptr_bibconns, dbi_result dbiresref, dbi_result dbires, const char* database, const char* username, int nref_counter, char* current_mset, struct bibinfo* ptr_biblio_info); +int render_dbib(char** ptr_ref, size_t* ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, const char* database, struct bibinfo* ptr_biblio_info, char* username, char* pdfroot, int nref_counter, short title_as_author); +int format_entry(char** ptr_ref, size_t* ptr_ref_len, char* pubtype, struct BIBCONNS* ptr_bibconns, dbi_result dbiresref, dbi_result dbires, const char* database, const char* username, int nref_counter, char* current_mset, struct bibinfo* ptr_biblio_info, short title_as_author); char* format_refnumber(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, int nref_counter, int n_intext); -int format_authorlist(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, int type, const char* database, int n_intext, struct bibinfo* ptr_biblio_info); +int format_authorlist(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, int type, const char* database, int n_intext, struct bibinfo* ptr_biblio_info, short title_as_author); char* format_pubdate(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbiresref, dbi_result dbirescit, int type, int n_intext, const char* year_unique_suffix); char* format_title(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, int n_intext); Index: backend-dbiba.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend-dbiba.c,v retrieving revision 1.26.2.13 retrieving revision 1.26.2.14 diff -u -U2 -r1.26.2.13 -r1.26.2.14 --- backend-dbiba.c 11 Sep 2005 19:55:11 -0000 1.26.2.13 +++ backend-dbiba.c 29 Sep 2005 22:35:59 -0000 1.26.2.14 @@ -191,6 +191,10 @@ info + short title_as_author if >0 the reference has no authors and the style + expects the title to be printed instead + 1=title, 2=booktitle + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int format_authorlist(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, const char* database, int n_intext, struct bibinfo* ptr_biblio_info) { +int format_authorlist(char** ptr_ref, size_t* ptr_ref_len, struct BIBCONNS* ptr_bibconns, dbi_result dbires, dbi_result dbires_ref, int type, const char* database, int n_intext, struct bibinfo* ptr_biblio_info, short title_as_author) { int num_authors; int nauthor_count = 0; @@ -199,5 +203,7 @@ int nhave_content = 0; int n_status; + int must_free_dbires = 0; unsigned long long n_id; + size_t author_anonymous_len = 256; /* const char* authors; */ const char *authorsep; @@ -532,35 +538,55 @@ } else if (num_authors == 0) { - author_anonymous = my_dbi_result_get_string_copy_idx(dbires_ref, n_authorempty_index); - if (author_anonymous && *author_anonymous && !dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { - if (sgml_entitize(&author_anonymous, NULL) == NULL) { - free(author_anonymous); - free(alist_preceeding); - clean_request(dbires_author); - return 801; - } - - author_preceeding = my_dbi_result_get_string_copy_idx(dbires_ref, n_singlepreceeding_index); - if (author_preceeding && dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { - free(author_preceeding); - author_preceeding = NULL; - } + char sql_command[512]; - author_following = my_dbi_result_get_string_copy_idx(dbires_ref, n_singlefollowing_index); - if (author_following && dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { - free(author_following); - author_following = NULL; + if (title_as_author) { + /* use title here if style requires it */ + if (!dbires) { + /* when asking only for the authorlist, we don't have a result with the contents of t_refdb */ + sprintf(sql_command, "SELECT refdb_id, refdb_type, refdb_pubyear, refdb_startpage, refdb_endpage, refdb_abstract, refdb_title, refdb_volume, refdb_issue, refdb_booktitle, refdb_city, refdb_publisher, refdb_title_series, refdb_address, refdb_issn, refdb_periodical_id, refdb_pyother_info, refdb_secyear, refdb_secother_info, refdb_user1, refdb_user2, refdb_user3, refdb_user4, refdb_user5, refdb_misc1, refdb_misc2, refdb_misc3 FROM t_refdb WHERE refdb_id="ULLSPEC, (unsigned long long)n_id); + + LOG_PRINT(LOG_DEBUG, sql_command); + dbires = dbi_conn_query(ptr_bibconns->conn_source, sql_command); + + if (!dbires || dbi_result_next_row(dbires) == 0) { + /* todo: exit gracefully */ + LOG_PRINT(LOG_WARNING, "retrieve title instead of author failed"); + } + must_free_dbires++; } } - else { /* no authors, go home */ - if (author_anonymous) { - free(author_anonymous); + else { + author_anonymous = my_dbi_result_get_string_copy_idx(dbires_ref, n_authorempty_index); + if (author_anonymous && *author_anonymous && !dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { + if (sgml_entitize(&author_anonymous, NULL) == NULL) { + free(author_anonymous); + free(alist_preceeding); + clean_request(dbires_author); + return 801; + } + + author_preceeding = my_dbi_result_get_string_copy_idx(dbires_ref, n_singlepreceeding_index); + if (author_preceeding && dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { + free(author_preceeding); + author_preceeding = NULL; + } + + author_following = my_dbi_result_get_string_copy_idx(dbires_ref, n_singlefollowing_index); + if (author_following && dbi_conn_error_flag(ptr_bibconns->conn_refdb)) { + free(author_following); + author_following = NULL; + } } - clean_request(dbires_author); - if (alist_preceeding) { - free(alist_preceeding); + else { /* no authors, go home */ + if (author_anonymous) { + free(author_anonymous); + } + clean_request(dbires_author); + if (alist_preceeding) { + free(alist_preceeding); + } + return 0; } - return 0; - } + } /* end if title as author */ } else { /* num_authors == 1 */ @@ -652,4 +678,34 @@ free(author_anonymous); } + else if (title_as_author) { + /* todo: kosherize output of format_title under these conditions */ + if ((new_ref = mstrcat(*ptr_ref, "<bibliomset relation=\"author\">", ptr_ref_len, 0)) == NULL) { + return 801; + } + else { + *ptr_ref = new_ref; + } + + if ((new_ref = format_title(ptr_ref, ptr_ref_len, ptr_bibconns, dbires, dbires_ref, title_as_author-1, n_intext)) == NULL) { + free(alist_preceeding); + clean_request(dbires_author); + return 801; + } + else { + *ptr_ref = new_ref; + } + + if ((new_ref = mstrcat(*ptr_ref, "</bibliomset>", ptr_ref_len, 0)) == NULL) { + return 801; + } + else { + *ptr_ref = new_ref; + } + + nhave_content = 1; + if (must_free_dbires) { + dbi_result_free(dbires); + } + } else { while (get_author_parts(dbires_author, &ainfo) != NULL) { @@ -807,5 +863,5 @@ clean_request(dbires_author); - } /* end if have authors */ + } /* end if author query ok */ /* text following */ Index: backend.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.c,v retrieving revision 1.27.2.10 retrieving revision 1.27.2.11 diff -u -U2 -r1.27.2.10 -r1.27.2.11 --- backend.c 22 Sep 2005 21:40:08 -0000 1.27.2.10 +++ backend.c 29 Sep 2005 22:35:59 -0000 1.27.2.11 @@ -1833,4 +1833,17 @@ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + get_num_authors(): retrieves the number of authors + + int get_num_authors returns the number of requested authors + + dbi_result dbires database query result, pointing to the current + dataset + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +unsigned long long get_num_authors(dbi_result dbires) { + return dbi_result_get_numrows(dbires); +} + +/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ get_author(): retrieves an author @@ -2371,5 +2384,5 @@ returned by the mysql driver including a trailing \0 */ result = dbi_result_get_binary(Result, fieldname); - if (!result || dbi_conn_error_flag(dbi_result_get_conn(Result))) { + if (!result && dbi_conn_error_flag(dbi_result_get_conn(Result))) { return NULL; } Index: backend.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/backend.h,v retrieving revision 1.23.2.6 retrieving revision 1.23.2.7 diff -u -U2 -r1.23.2.6 -r1.23.2.7 --- backend.h 22 Sep 2005 21:40:08 -0000 1.23.2.6 +++ backend.h 29 Sep 2005 22:35:59 -0000 1.23.2.7 @@ -137,4 +137,5 @@ char* get_periodical(dbi_conn conn, char* periodical, const char* db, int type, int* errcode, unsigned long long id); dbi_result request_authors(dbi_conn conn, int type, const char* db, unsigned long long n_id); +unsigned long long get_num_authors(dbi_result dbires); const char* get_author(dbi_result dbires); struct AUTHOR_INFO* get_author_parts(dbi_result dbires, struct AUTHOR_INFO* ptr_ainfo); Index: refdbda.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbda.c,v retrieving revision 1.41.2.19 retrieving revision 1.41.2.20 diff -u -U2 -r1.41.2.19 -r1.41.2.20 --- refdbda.c 17 Sep 2005 21:35:37 -0000 1.41.2.19 +++ refdbda.c 29 Sep 2005 22:35:59 -0000 1.41.2.20 @@ -414,4 +414,5 @@ dbi_conn_set_option_numeric(conn, "compression", 1); dbi_conn_set_option(conn, "host", ptr_clrequest->server_ip); + dbi_conn_set_option_numeric(conn, "mysql_include_trailing_null", 1); } else if (!strcmp(ptr_clrequest->dbserver, "pgsql")) { Index: refdbdbib.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/refdbdbib.c,v retrieving revision 1.36.2.25 retrieving revision 1.36.2.26 diff -u -U2 -r1.36.2.25 -r1.36.2.26 --- refdbdbib.c 17 Sep 2005 21:36:53 -0000 1.36.2.25 +++ refdbdbib.c 29 Sep 2005 22:35:59 -0000 1.36.2.26 @@ -136,4 +136,5 @@ size_t result_len; short int n_pubyear; + short int title_as_author; unsigned long long nref_counter; unsigned long long n_id; @@ -383,4 +384,5 @@ "author_abbrevlist BLOB," "year_uni_suffix VARCHAR(16)," + "title_as_author SMALLINT DEFAULT 0," "PRIMARY KEY (id))", table_name); } @@ -405,4 +407,5 @@ "author_abbrevlist TEXT," "year_uni_suffix VARCHAR(16)," + "title_as_author SMALLINT DEFAULT 0," "PRIMARY KEY (id))", table_name); } @@ -426,4 +429,5 @@ "sorted_pos INTEGER DEFAULT 1," "author_abbrevlist TEXT," + "title_as_author SMALLINT DEFAULT 0," "year_uni_suffix TEXT)", table_name); } @@ -447,4 +451,5 @@ "sorted_pos INTEGER DEFAULT 1," "author_abbrevlist TEXT," + "title_as_author SMALLINT DEFAULT 0," "year_uni_suffix TEXT)", table_name); } @@ -472,9 +477,11 @@ /* make data available for handlers */ gbdata.ptr_default_db = ptr_clrequest->current_db; - gbdata.conn = bibconns.conn; /* connection to the temp table */ + gbdata.conn = bibconns.conn; /* connection to the temp table db */ + gbdata.conn_refdb = bibconns.conn_refdb; /* connection to the style db */ gbdata.ptr_citation_count = &citation_count; gbdata.ptr_xref_count = &xref_count; gbdata.ptr_table_name = table_name; gbdata.ptr_curr_multi_id = curr_multi_id; + gbdata.quoted_journal = myjournal; gbdata.ptr_cmid_len = &curr_multi_id_len; gbdata.ptr_sfirst = ptr_sfirst; @@ -593,24 +600,24 @@ sorting order of multiple in-text citations */ if (strcmp(intextsequence, "ASIS") == 0) { - sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos FROM %s WHERE sorted_pos>0 ORDER BY id", table_name); + sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, title_as_author FROM %s WHERE sorted_pos>0 ORDER BY id", table_name); } else if (strcmp(intextsequence, "AUTHORDATE") == 0) { - sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos FROM %s WHERE sorted_pos>0 ORDER BY citation_pos, author_concat, pubyear, monthday, periodical, volume, issue, startpage", table_name); + sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, title_as_author FROM %s WHERE sorted_pos>0 ORDER BY citation_pos, author_concat, pubyear, monthday, periodical, volume, issue, startpage", table_name); } else if (strcmp(intextsequence, "DATEASC") == 0) { - sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos FROM %s WHERE sorted_pos>0 ORDER BY citation_pos, pubyear, monthday, author_concat, periodical, volume, issue, startpage", table_name); + sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, title_as_author FROM %s WHERE sorted_pos>0 ORDER BY citation_pos, pubyear, monthday, author_concat, periodical, volume, issue, startpage", table_name); } else if (strcmp(intextsequence, "DATEDESC") == 0) { - sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos FROM %s WHERE sorted_pos>0 ORDER BY citation_pos, pubyear DESC, monthday DESC, author_concat, periodical, volume, issue, startpage", table_name); + sprintf(sql_command, "SELECT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, title_as_author FROM %s WHERE sorted_pos>0 ORDER BY citation_pos, pubyear DESC, monthday DESC, author_concat, periodical, volume, issue, startpage", table_name); } } else if (strcmp(bibsequence, "BAUTHORDATE") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, monthday FROM %s ORDER BY author_concat, pubyear, monthday, volume, issue, article_title, periodical, startpage", table_name); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, monthday, title_as_author FROM %s ORDER BY author_concat, pubyear, monthday, volume, issue, article_title, periodical, startpage", table_name); } else if (strcmp(bibsequence, "BDATEASC") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, monthday FROM %s ORDER BY pubyear, monthday, author_concat, volume, issue, article_title, periodical, startpage", table_name); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, monthday, title_as_author FROM %s ORDER BY pubyear, monthday, author_concat, volume, issue, article_title, periodical, startpage", table_name); } else if (strcmp(bibsequence, "BDATEDESC") == 0) { - sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, monthday FROM %s ORDER BY pubyear DESC, monthday DESC, author_concat, volume, issue, article_title, periodical, startpage", table_name); + sprintf(sql_command, "SELECT DISTINCT dbname, orig_id, author_concat, pubyear, article_title, periodical, volume, issue, startpage, entry_id, year_uni_suffix, sorted_pos, monthday, title_as_author FROM %s ORDER BY pubyear DESC, monthday DESC, author_concat, volume, issue, article_title, periodical, startpage", table_name); } @@ -722,4 +729,5 @@ /* loop over all distinct references for the actual formatting */ while (dbi_result_next_row(dbires)) { + /* the following loop has already run if !nis_numeric */ if (nis_numeric) { @@ -819,4 +827,5 @@ the string is empty */ item = my_dbi_result_get_string_copy(dbires, "author_concat"); +/* printf("author_concat went to: %s<<\n", item); */ if ((!item && dbi_conn_error_flag(bibconns.conn)) || (item && !strcmp(item, "ERROR"))) { ptr_addresult->failure++; @@ -865,7 +874,8 @@ item = dbi_result_get_string(dbires, "dbname"); + title_as_author = dbi_result_get_short(dbires, "title_as_author"); /* todo: break instead of exit on error? */ - if ((n_status = render_dbib(&outbuffer, &outbuffer_len, &bibconns, dbires1 /* reference info */, item /* database */, ptr_biblio_info, ptr_clrequest->username, "", nref_counter)) != 0) { + if ((n_status = render_dbib(&outbuffer, &outbuffer_len, &bibconns, dbires1 /* reference info */, item /* database */, ptr_biblio_info, ptr_clrequest->username, "", nref_counter, title_as_author)) != 0) { send_status(ptr_clrequest->fd, n_status, TERM_NO); append_return_msg(ptr_addresult, n_status, id_string, bibconns.conn); @@ -1214,4 +1224,5 @@ int sql_command_len = 0; int n_status; + short title_as_author; char *id_string; char *authorlist_buffer; @@ -1294,5 +1305,7 @@ } - if ((n_status = format_entry(&authorlist_buffer, &authorlist_buffer_len, pubtype, ptr_bibconns, dbires_cit, NULL /* authorlist only */, item, ptr_clrequest->username, 0, current_mset, biblio_info)) != 0) { + title_as_author = dbi_result_get_short(dbires, "title_as_author"); + + if ((n_status = format_entry(&authorlist_buffer, &authorlist_buffer_len, pubtype, ptr_bibconns, dbires_cit, NULL /* authorlist only */, item, ptr_clrequest->username, 0, current_mset, biblio_info, title_as_author)) != 0) { append_return_msg(ptr_addresult, n_status, NULL, ptr_bibconns->conn); free(id_string); @@ -2632,10 +2645,10 @@ while (dbi_result_next_row(dbires_ref)) { item_pubtype = dbi_result_get_string_idx(dbires_ref, 1); /* 1-base index */ - LOG_PRINT(LOG_DEBUG, item_pubtype); +/* LOG_PRINT(LOG_DEBUG, item_pubtype); */ /* loop over all columns except pubtype which is a constant prefix */ for (i = 1; i < dbi_result_get_numfields(dbires_ref); i++) { item = dbi_result_get_string_idx(dbires_ref, i+1); /* 1-base index */ if (item && *item) { - LOG_PRINT(LOG_DEBUG, item); +/* LOG_PRINT(LOG_DEBUG, item); */ /* we assemble the variable name from the publication type and the column name. The variable value is the value of the column */ if (n_ref_format == REFDOCBK) { @@ -2707,10 +2720,10 @@ item_pubtype = dbi_result_get_string_idx(dbires_ref, 1); /* 1-base index */ - LOG_PRINT(LOG_DEBUG, item_pubtype); +/* LOG_PRINT(LOG_DEBUG, item_pubtype); */ /* loop over all columns except pubtype which is a constant prefix*/ for (i = 1; i < dbi_result_get_numfields(dbires_ref); i++) { item = dbi_result_get_string_idx(dbires_ref, i+1); /* 1-base index */ if (item && *item) { - LOG_PRINT(LOG_DEBUG, item); +/* LOG_PRINT(LOG_DEBUG, item); */ /* we assemble the variable name from the publication type and the column name. The variable value is the value of the column */ sprintf(outbuffer, "(define %s%s \"%s\")\n", item_pubtype, tags[i-1], item); Index: xmlhandler.c =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.c,v retrieving revision 1.22.2.19 retrieving revision 1.22.2.20 diff -u -U2 -r1.22.2.19 -r1.22.2.20 --- xmlhandler.c 11 Sep 2005 19:55:12 -0000 1.22.2.19 +++ xmlhandler.c 29 Sep 2005 22:35:59 -0000 1.22.2.20 @@ -470,4 +470,5 @@ if (*((ptr_asdata->ptr_first)->elname) == 'U' + || ptr_attr == NULL /* 0 is implied default */ || strcmp(ptr_attr, "0") == 0) { strcpy(concat, "LINK0"); @@ -1349,6 +1350,12 @@ char* new_attrvalue; char* item; + char* reftype = NULL; + char* my_xaempty = NULL; + char *my_refdb_title = NULL; + char titlespec[16]; char periodical[256] = ""; const char *drivername; /* name of the libdbi driver */ + int use_qtitle = 0; + int use_ztitle = 0; unsigned long long temp_id; unsigned long long real_orig_id; @@ -1407,5 +1414,5 @@ /* retrieve corresponding ID for this citekey */ if (!strcmp(my_dbi_conn_get_cap(ptr_gbdata->conn, "multiple_db"), "t")) { - sprintf(sql_command, "SELECT refdb_id FROM %s.t_refdb WHERE refdb_citekey='%s' AND refdb_type!='DUMMY'", database, id_string); + sprintf(sql_command, "SELECT refdb_id, refdb_type FROM %s.t_refdb WHERE refdb_citekey='%s' AND refdb_type!='DUMMY'", database, id_string); dbires = dbi_conn_query(ptr_gbdata->conn, sql_command); } @@ -1416,5 +1423,5 @@ return; } - sprintf(sql_command, "SELECT refdb_id FROM t_refdb WHERE refdb_citekey='%s' AND refdb_type!='DUMMY'", id_string); + sprintf(sql_command, "SELECT refdb_id, refdb_type FROM t_refdb WHERE refdb_citekey='%s' AND refdb_type!='DUMMY'", id_string); dbires = dbi_conn_query(conn_source, sql_command); } @@ -1429,4 +1436,5 @@ if (dbi_result_next_row(dbires)) { real_orig_id = my_dbi_result_get_idval(dbires, "refdb_id"); + reftype = my_dbi_result_get_string_copy(dbires, "refdb_type"); } else { @@ -1442,5 +1450,5 @@ /* we still have to query the database as the dataset may be missing */ if (!strcmp(my_dbi_conn_get_cap(ptr_gbdata->conn, "multiple_db"), "t")) { - sprintf(sql_command, "SELECT refdb_id FROM %s.t_refdb WHERE refdb_id='%s' AND refdb_type!='DUMMY'", database, id_string); + sprintf(sql_command, "SELECT refdb_id, refdb_type FROM %s.t_refdb WHERE refdb_id='%s' AND refdb_type!='DUMMY'", database, id_string); dbires = dbi_conn_query(ptr_gbdata->conn, sql_command); } @@ -1451,5 +1459,5 @@ return; } - sprintf(sql_command, "SELECT refdb_id FROM t_refdb WHERE refdb_id='%s' AND refdb_type!='DUMMY'", id_string); + sprintf(sql_command, "SELECT refdb_id, refdb_type FROM t_refdb WHERE refdb_id='%s' AND refdb_type!='DUMMY'", id_string); dbires = dbi_conn_query(conn_source, sql_command); } @@ -1465,4 +1473,5 @@ if (dbi_result_next_row(dbires)) { real_orig_id = my_dbi_result_get_idval(dbires, "refdb_id"); + reftype = my_dbi_result_get_string_copy(dbires, "refdb_type"); } else { @@ -1487,4 +1496,5 @@ ptr_gbdata->ptr_curr_multi_id = new_id; } + free(reftype); } else { @@ -1492,4 +1502,52 @@ dbi_driver driver; + /* see whether the style requests to use titles in place of missing + authors */ + if (!strcmp(my_dbi_conn_get_cap(ptr_gbdata->conn_refdb, "multiple_db"), "t")) { + sprintf(sql_command, "SELECT QAEMPTY,XAEMPTY FROM %s.REFSTYLE, %s.CITSTYLE WHERE REFSTYLE.CITSTYLEID=CITSTYLE.ID AND REFSTYLE.PUBTYPE='%s' AND JOURNAL=%s", MAIN_DB, MAIN_DB, reftype, ptr_gbdata->quoted_journal); + } + else { + sprintf(sql_command, "SELECT QAEMPTY,XAEMPTY FROM REFSTYLE, CITSTYLE WHERE REFSTYLE.CITSTYLEID=CITSTYLE.ID AND REFSTYLE.PUBTYPE='%s' AND JOURNAL=%s", reftype, ptr_gbdata->quoted_journal); + } + + LOG_PRINT(LOG_DEBUG, sql_command); + dbires = dbi_conn_query(ptr_gbdata->conn_refdb, sql_command); + if (!dbires) { + LOG_PRINT(LOG_WARNING, "accessing style data failed"); + (*(ptr_gbdata->ptr_ndb_error))++; + } + else { + const char *string; + + if (dbi_result_next_row(dbires)) { + string = my_dbi_result_get_string(dbires, "QAEMPTY"); +/* printf("string went to %s<<\n", string); */ + if (string && !*string) { + use_qtitle = 1; + } +/* string = my_dbi_result_get_string(dbires, "ZAEMPTY"); */ +/* if (string && !strlen(string)) { */ +/* use_ztitle = 1; */ +/* printf("hi there0\n"); */ +/* } */ + else if (string) { + my_xaempty = strdup(string); + if (!my_xaempty || !dbi_conn_quote_string(ptr_gbdata->conn, &my_xaempty)) { + LOG_PRINT(LOG_WARNING, "out of memory"); + (*(ptr_gbdata->ptr_nmem_error))++; + } + } + } /* end if have rows */ + dbi_result_free(dbires); + } /* end if have result */ + + if (!strcmp(reftype, "BOOK")) { + strcpy(titlespec, "refdb_booktitle"); + } + else { + strcpy(titlespec, "refdb_title"); + } + free(reftype); + driver = dbi_conn_get_driver(ptr_gbdata->conn); @@ -1498,5 +1556,5 @@ /* create a new row with INSERT */ if (!strcmp(my_dbi_conn_get_cap(ptr_gbdata->conn, "multiple_db"), "t")) { - sprintf(sql_command, "INSERT INTO %s (article_title,volume,issue,startpage,pubyear) SELECT refdb_title,refdb_volume,refdb_issue,refdb_startpage,refdb_pubyear FROM %s.t_refdb WHERE refdb_id="ULLSPEC, ptr_gbdata->ptr_table_name, database, (unsigned long long)real_orig_id); + sprintf(sql_command, "INSERT INTO %s (article_title,volume,issue,startpage,pubyear) SELECT %s,refdb_volume,refdb_issue,refdb_startpage,refdb_pubyear FROM %s.t_refdb WHERE refdb_id="ULLSPEC, ptr_gbdata->ptr_table_name, titlespec, database, (unsigned long long)real_orig_id); LOG_PRINT(LOG_DEBUG, sql_command); dbires = dbi_conn_query(ptr_gbdata->conn, sql_command); @@ -1511,4 +1569,20 @@ /* save new temp id */ temp_id = dbi_conn_sequence_last(ptr_gbdata->conn, NULL); + + /* get refdb_title separately, as we need it further down */ + sprintf(sql_command, "SELECT %s,refdb_volume,refdb_issue,refdb_startpage,refdb_pubyear FROM t_refdb WHERE refdb_id="ULLSPEC, titlespec, (unsigned long long)real_orig_id); + LOG_PRINT(LOG_DEBUG, sql_command); + dbires = dbi_conn_query(ptr_gbdata->conn, sql_command); + if (!dbires) { + LOG_PRINT(LOG_WARNING, "source table select failed"); + (*(ptr_gbdata->ptr_ndb_error))++; + } + else { + if (dbi_result_next_row(dbires)) { + my_refdb_title = my_dbi_result_get_string_copy(dbires, titlespec); + /* the quote_string function checks for non-NULL arguments */ + dbi_conn_quote_string(ptr_gbdata->conn, &my_refdb_title); + } + } } else { @@ -1522,5 +1596,5 @@ return; } - sprintf(sql_command, "SELECT refdb_title,refdb_volume,refdb_issue,refdb_startpage,refdb_pubyear FROM t_refdb WHERE refdb_id="ULLSPEC, (unsigned long long)real_orig_id); + sprintf(sql_command, "SELECT %s,refdb_volume,refdb_issue,refdb_startpage,refdb_pubyear FROM t_refdb WHERE refdb_id="ULLSPEC, titlespec, (unsigned long long)real_orig_id); LOG_PRINT(LOG_DEBUG, sql_command); dbires = dbi_conn_query(conn_source, sql_command); @@ -1532,10 +1606,9 @@ if (dbi_result_next_row(dbires)) { /* get strings quoted properly */ - char *my_refdb_title; char *my_refdb_volume; char *my_refdb_issue; char *my_refdb_startpage; - my_refdb_title = my_dbi_result_get_string_copy(dbires, "refdb_title"); + my_refdb_title = my_dbi_result_get_string_copy(dbires, titlespec); my_refdb_volume = my_dbi_result_get_string_copy(dbires, "refdb_volume"); my_refdb_issue = my_dbi_result_get_string_copy(dbires, "refdb_issue"); @@ -1551,7 +1624,4 @@ LOG_PRINT(LOG_DEBUG, sql_command); - if (my_refdb_title) { - free(my_refdb_title); - } if (my_refdb_volume) { free(my_refdb_volume); @@ -1604,35 +1674,80 @@ } else { - while ((query_result = get_author(dbires1)) != NULL) { - char *author_q; - - author_q = strdup(query_result); - if (!author_q || dbi_conn_quote_string(ptr_gbdata->conn, &author_q) == 0) { - LOG_PRINT(LOG_WARNING, "out of memory"); - (*(ptr_gbdata->ptr_nmem_error))++; - } - else if (*author_q) { - /* the quoted author is enclosed in quotes (who - would have thought?) but we don't need these - here; we need only the internal quotes */ - author_q[strlen(author_q)-1] = '\0'; - - if ((new_sql_command = mstrcat(sql_command, author_q + 1, &sql_command_len, 0)) == NULL) { + if (!get_num_authors(dbires1)) { +/* printf("num_authors went to zero\n"); */ + /* if no authors, use AEMPTY or title here */ + if (my_xaempty) { +/* printf("use xaempty %s\n", my_xaempty); */ + /* my_xaempty is quoted, but we need only the + internal quotes */ + my_xaempty[strlen(my_xaempty)-1] = '\0'; + if ((new_sql_command = mstrcat(sql_command, my_xaempty + 1, &sql_command_len, 0)) == NULL) { (*(ptr_gbdata->ptr_nmem_error))++; - break; } else { sql_command = new_sql_command; } - - free(author_q); + } + else if (use_qtitle) { +/* printf("use qtitle %s\n", my_refdb_title); */ + use_qtitle++; /* means we really use the title */ + if (my_refdb_title) { + /* my_refdb_title is quoted, but we need only the + internal quotes */ + my_refdb_title[strlen(my_refdb_title)-1] = '\0'; + if ((new_sql_command = mstrcat(sql_command, my_refdb_title + 1, &sql_command_len, 0)) == NULL) { + (*(ptr_gbdata->ptr_nmem_error))++; + } + else { + sql_command = new_sql_command; + } + } } } - - if ((new_sql_command = mstrcat(sql_command, "\' WHERE id=", &sql_command_len, 0)) == NULL) { - (*(ptr_gbdata->ptr_nmem_error))++; + else { /* have authors */ +/* printf("have at least one author\n"); */ + while ((query_result = get_author(dbires1)) != NULL) { + char *author_q; + + author_q = strdup(query_result); + if (!author_q || dbi_conn_quote_string(ptr_gbdata->conn, &author_q) == 0) { + LOG_PRINT(LOG_WARNING, "out of memory"); + (*(ptr_gbdata->ptr_nmem_error))++; + } + else if (*author_q) { + /* the quoted author is enclosed in quotes (who + would have thought?) but we don't need these + here; we need only the internal quotes */ + author_q[strlen(author_q)-1] = '\0'; + + if ((new_sql_command = mstrcat(sql_command, author_q + 1, &sql_command_len, 0)) == NULL) { + (*(ptr_gbdata->ptr_nmem_error))++; + break; + } + else { + sql_command = new_sql_command; + } + + free(author_q); + } /* end if no mem error */ + } /* end while have author */ + } /* end if have authors */ + + if (use_qtitle == 2) { + if ((new_sql_command = mstrcat(sql_command, "\', title_as_author=1 WHERE id=", &sql_command_len, 0)) == NULL) { + (*(ptr_gbdata->ptr_nmem_error))++; + } + else { + sql_command = new_sql_command; + } } else { - sql_command = new_sql_command; + /* title_as_author has a default of 0, no need to alter it */ + if ((new_sql_command = mstrcat(sql_command, "\' WHERE id=", &sql_command_len, 0)) == NULL) { + (*(ptr_gbdata->ptr_nmem_error))++; + } + else { + sql_command = new_sql_command; + } } clean_request(dbires1); @@ -1655,4 +1770,8 @@ } + if (my_refdb_title) { + free(my_refdb_title); + } + /* journal */ sprintf(sql_command, "UPDATE %s SET periodical=\'", ptr_gbdata->ptr_table_name); Index: xmlhandler.h =================================================================== RCS file: /cvsroot/refdb/refdb/src/xmlhandler.h,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -u -U2 -r1.6.2.4 -r1.6.2.5 --- xmlhandler.h 11 Sep 2005 19:55:12 -0000 1.6.2.4 +++ xmlhandler.h 29 Sep 2005 22:35:59 -0000 1.6.2.5 @@ -51,9 +51,11 @@ struct getbib_data { char* ptr_default_db; - dbi_conn conn; + dbi_conn conn; /* connection to the reference database */ + dbi_conn conn_refdb; /* connection to the style database */ int* ptr_citation_count; /* counter for citations in id handler */ int* ptr_xref_count; /* counter for xrefs in id handler */ char* ptr_table_name; /* unique table name for temporary table */ char* ptr_curr_multi_id; /* ptr to the current multiple citation id */ + char* quoted_journal; /* name of the style to be used */ size_t* ptr_cmid_len; /* ptr to int containing allocated length of ptr_curr_multi_id */ int* ptr_nmem_error; /* if != 0, out of memory error occurred */ |
From: Markus H. <mho...@us...> - 2005-09-29 22:26:11
|
Update of /cvsroot/refdb/refdb/dsssl/refdb/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4184/dsssl/refdb/html Modified Files: Tag: Release_0_9_5_stable docbook-refdb.dsl Log Message: fix for titles as authornames Index: docbook-refdb.dsl =================================================================== RCS file: /cvsroot/refdb/refdb/dsssl/refdb/html/docbook-refdb.dsl,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -U2 -r1.8 -r1.8.2.1 --- docbook-refdb.dsl 19 Mar 2004 23:23:11 -0000 1.8 +++ docbook-refdb.dsl 29 Sep 2005 22:26:02 -0000 1.8.2.1 @@ -726,4 +726,6 @@ ((equal? rel (normalize "chapter")) (refdb-process-inline "CHAPTITLESTYLE")) + ((equal? rel (normalize "author")) + (refdb-process-inline "AUTHORLISTSTYLE")) (else (make element gi: "B" (process-children)))))) |