other versions
- jessie 1.0.2-3
REFDBXP(1) | RefDB Manual | REFDBXP(1) |
NAME¶
refdbxp - converts short and full citation formats in SGML and XML documents containing RefDB citations.SYNOPSIS¶
refdbxp [-h] [-s]
[-t input-format] refdbxp
DESCRIPTION¶
refdbxp allows the interconversion of the short and full notation of citations in the supported SGML and XML documents of RefDB(7). See the RefDB manual (see below) for information about the two notations. The conversion is round-trip safe, and it supports mixing short and full notation in the same source document. Full-notation citations will use the correct encoding for first and subsequent citations of the same reference.•If you comment out citation elements, they still
count as if they were present when the first/subsequent citation issue is
resolved (refdbxp simply doesn't know about the concept of a comment). In the
following example, the citation in the last line will be the only one
transformed, but it will be formatted as a subsequent citation of reference 9,
not as the first citation:
<!-- <citation role="REFDB">9;</citation> first occurrence --> <!-- other stuff inbetween --> <citation role="REFDB">9;</citation><!-- second occurrence -->
•If you use SGML/XML tags within a comment and
nest this comment ingeniously between the start tag and the end tag of an
element relevant for refdbxp, you shoot yourself in the foot. You do not want
to use code like this (why would you, anyways?):
<citation role="REFDB"><!-- </citation> -->2;5;9;</citation>
•refdbxp does not include external entities. The
whole document refdbxp is supposed to convert needs to be in one chunk.
•refdbxp currently does not support multiple
databases per document.
One way to work around the problem with comments is to create a copy of your
master source and use a small script to remove comments just before you
process and transform your text. To work around the fact that refdbxp does not
treat external entities correctly, use a tool like sgmlnorm (shipped
with the Jade/OpenJade packages) to preprocess the document. To work around
the missing support of multiple databases, well... just wait.
OPTIONS¶
-hPrints a command synopsis on the screen and exits.
-s
Create citations using the short notation. The default is
to use the full notation.
-t input-format
Select the type of input. Currently supported values are
db31 (DocBook SGML version 3.1 or later), db31x (DocBook XML,
all versions), and teix (TEI XML).
EXAMPLE¶
Lets first try the most common usage of refdbxp. The following command expands all citations, regardless of whether they are written in short or full notation, to the full notation and writes the result to a new file foo.full.sgml. The input from foo.sgml is assumed to be DocBook SGML:~$ refdbxp -t db31 < foo.sgml > foo.full.sgml
~$ refdbxp -t teix -s < bar.xml > bar.short.xml
~$ osgmlnorm -dn /usr/local/share/sgml/docbook/4.1/docbook.dcl foo_master.sgml | refdbxp -t db31 > foo.full.sgml
<!--&bibliography;-->
~$ osgmlnorm -dn /usr/local/share/sgml/docbook/4.1/docbook.dcl foo_master.sgml | refdbxp -t db31 | sed 's%<!--\&bibliography;-->%\&bibliography;%' > foo.full.sgml
SEE ALSO¶
RefDB (7), refdbnd (1). RefDB manual (local copy) PREFIX/share/doc/refdb-<version>/refdb-manual/index.html RefDB manual (web) < http://refdb.sourceforge.net/manual/index.html> RefDB on the web < http://refdb.sourceforge.net/>AUTHOR¶
refdbxp was written by Markus Hoenicka <markus@mhoenicka.de>.2005-10-17 | RefDB Manual |