summaryrefslogtreecommitdiff
path: root/tex/context/base/core-dat.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2004-08-30 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2004-08-30 00:00:00 +0200
commit334f3edd2304915fc8b50a722a56765f41b1a7d5 (patch)
tree0d62c2871118f4971fa7b0b6bb1e87b12f647bff /tex/context/base/core-dat.tex
parent08a4bcc9bff26007ca9b5d14d6beaacab74c9ce4 (diff)
downloadcontext-334f3edd2304915fc8b50a722a56765f41b1a7d5.tar.gz
stable 2004.08.30
Diffstat (limited to 'tex/context/base/core-dat.tex')
-rw-r--r--tex/context/base/core-dat.tex46
1 files changed, 23 insertions, 23 deletions
diff --git a/tex/context/base/core-dat.tex b/tex/context/base/core-dat.tex
index 2389aa616..c7522fd0f 100644
--- a/tex/context/base/core-dat.tex
+++ b/tex/context/base/core-dat.tex
@@ -1,5 +1,5 @@
%D \module
-%D [ file=core-dat, % was core-02a,
+%D [ filefile=core-dat, % was core-02a,
%D version=1999.08.10, % 1997.03.31,
%D title=\CONTEXT\ Core Macros,
%D subtitle=Database Support, % 2A
@@ -83,55 +83,55 @@
%D A database file |<|in most cases such a base is generated
%D from another one|>| is structured as follows:
%D
-%D \starttypen
+%D \starttyping
%D \startrecord{tag}
%D \memberofgroup{grouplist}
%D \setrecordentry{name}{...}
%D ....
%D \stoprecord
-%D \stoptypen
+%D \stoptyping
%D
%D The interface to such a database is defined as follows:
%D
-%D \starttypen
+%D \starttyping
%D \definerecord[class][settings]
%D \setuprecord[class][settings]
%D \definerecordentry[class][name]
-%D \stoptypen
+%D \stoptyping
%D
%D and processed by
%D
-%D \starttypen
+%D \starttyping
%D \processrecords[file list][tag and/or group list]
-%D \stoptypen
+%D \stoptyping
%D
%D The actual processing is done by a macro assigned to \type
%D {command}:
%D
-%D \starttypen
+%D \starttyping
%D \setuprecord[class][command=\DoWithRecord]
-%D \stoptypen
+%D \stoptyping
%D
%D Given that one can ask for a field with
%D
-%D \starttypen
+%D \starttyping
%D \getrecordentry{name}
-%D \stoptypen
+%D \stoptyping
%D
%D such a command can look like:
%D
-%D \starttypen
+%D \starttyping
%D \def\DoWithRecord#1%
%D {\startpacked
%D \let\\=\quad
%D name: \getrecordentry{name}~\getrecordentry{family name}\par
%D address: \getrecordentry{postal address}\par
%D \stoppacked}
-%D \stoptypen
+%D \stoptyping
%D
%D The argument passed is the tag. The database can look like:
%D
-%D \starttypen
+%D \starttyping
%D \startrecord{hagenj}
%D \memberofgroup{a,b}
%D \setrecordentry{naam}{Hans}
@@ -145,27 +145,27 @@
%D \setrecordentry{family name}{Otten}
%D \setrecordentry{postal address}{A.F. Otten\\Prinsengracht 17\\Hasselt NL}
%D \stoprecord
-%D \stoptypen
+%D \stoptyping
%D
%D The definition of this database looks like:
%D
-%D \starttypen
+%D \starttyping
%D \definerecord[address][command=\DoWithRecord]
%D
%D \definerecordentry[address][name]
%D \definerecordentry[address][family name]
%D \definerecordentry[address][postal address]
-%D \stoptypen
+%D \stoptyping
%D
%D The actual processing is now done by (for instance):
%D
-%D \starttypen
+%D \starttyping
%D \processrecords[datafile][hagenj]
%D \processrecords[datafile][hagenj,offenaf]
%D \processrecords[datafile][all]
%D \processrecords[datafile][a]
%D \processrecords[datafile][b]
-%D \stoptypen
+%D \stoptyping
%D
%D Of course one can reassign the command used to handle the
%D records in between.
@@ -185,7 +185,7 @@
{\getparameters
[\??db#1]
[\c!velden=,
- \c!commando=\gobbleoneargument,
+ \c!command=\gobbleoneargument,
#2]}
\def\setuprecord
@@ -225,13 +225,13 @@
\processcommacommand[\getvalue{\??db#1\c!velden}]\docommando
\let\setrecordentry\skiprecord
\the\resetrecordlist
- \doifelse{#2}\v!alles % 't Is nu eenmaal alles
+ \doifelse{#2}\v!all % 't Is nu eenmaal alles
\recordoktrue
{\doifelsenothing{#2} % of niets
\recordoktrue
\recordokfalse}% % zullen we maar zeggen.
\ifrecordok
- \let\askedrecords\v!alles
+ \let\askedrecords\v!all
\else
\makerawcommalist[#2]\askedrecords
\fi
@@ -264,7 +264,7 @@
{\relax
\egroup
%\the\everyrecord
- \getvalue{\??db#1\c!commando}{##1}}%
+ \getvalue{\??db#1\c!command}{##1}}%
\showmessage\m!databases1\askedrecords
\def\doprocessrecords##1%
{\readjobfile{##1}