[Bese-devel] Mistakes in YACLML documentation
Le grand pinguin
rm at mh-freiburg.de
Sat Sep 18 22:02:54 UTC 2004
Ok, you don't seem to mind spellink patches. Here's one for
yaclml.
Greetings Ralf Mattes
-------------- next part --------------
--- yaclml.tex 2004-09-17 18:35:18.000000000 +0200
+++ yaclml.tex.new 2004-09-19 00:49:29.908776496 +0200
@@ -32,11 +32,11 @@
The \yaclml{} library is designed to allow Common Lisp web application
developers and graphic designers to produce HTML.
-\yaclml{} provides two means to this end, a programmitc interface
+\yaclml{} provides two means to this end, a programmatic interface
designed for programmers and a templating interface designed for
graphics artists (and their tools).
-For examples of both the programmitc and the templating interface
+For examples of both the programmatic and the templating interface
please look at UnCommon Web, which makes heavy use of both (and
provides real world examples of extending the interfaces).
@@ -48,7 +48,7 @@
\begin{itemize}
\item cl-who and htout
\item The ZOPE project's TAL and MeTAL templating systems.
-\item Terrence Parr's paper ``Enforcing Model-View Seperation in
+\item Terrence Parr's paper ``Enforcing Model-View Separation in
Template Engines.
\end{itemize}
@@ -99,7 +99,7 @@
text in a typical web page it's important to constant fold as much
as possible.
\item Tags should be easily definable and should be able to perform
- arbitrary computiations at both run time and compile time.
+ arbitrary computations at both run time and compile time.
\end{itemize}
\section{Using \yaclml{} Tag Macros}
@@ -107,7 +107,7 @@
You use \yaclml{} tags just like regular macros, any attributes are
passed in like keyword arguments. \yaclml{} examines its args (at
compile time) and distinguishes between the keyword arguments which
-become attribues and everything else, which becames the tag's
+become attributes and everything else, which becomes the tag's
body. Tags all have the following syntax:
\begin{verbatim}
@@ -129,8 +129,8 @@
printed (via \clhs{princ}) as the value of the attribute.
\end{description}
-If the need ever arises to have an HTML attribute vhose value is ``T''
-or ``NIL'' it is neccessary to return the string ``T'' or ``NIL'' and
+If the need ever arises to have an HTML attribute whose value is ``T''
+or ``NIL'' it is necessary to return the string ``T'' or ``NIL'' and
not the symbol \sym{T} or \clhs{NIL}.
\subsection{The Tag Body}
@@ -158,9 +158,9 @@
\section{Standard YACLML Tag Macros}
-All of the standard HTML4 tags (as specifed at
+All of the standard HTML4 tags (as specified at
http://www.w3.org/TR/html401). The tag macros have the same name as
-the corresponding tag and the allowed attributes are thoses specified
+the corresponding tag and the allowed attributes are those s specified
in the standard. The tag names are all exported from the {\tt
it.bese.yaclml.tags} package, which has as a nickname {\tt <}.
@@ -185,12 +185,12 @@
Expands into the equivalent \sym{<:LINK} tag.
-\section{Exending \yaclml{}}
+\section{Extending \yaclml{}}
\defmac{DEFTAG}{name attribute-lambda-list &body body}
Define a new tag named \param{name}. \param{body} is run, at macro expansion
-time, and must make the appropiate calls to \sym{emit-code} and
+time, and must make the appropriate calls to \sym{emit-code} and
\sym{emit-princ} depending on what output should be generated at run
time.
@@ -218,16 +218,16 @@
\begin{description}
\item[required args] Like regular required args these are bound
- positionally to the values passed in the aclling form.
+ positionally to the values passed in the calling form.
\item[\&attribute] every symbol after the \&attribute tag specifies an
- attribute. The calling form is examined for xeywords with the same
- (under string=) symbol-name as the symbols specifiod after
+ attribute. The calling form is examined for keywords with the same
+ (under string=) symbol-name as the symbols specified after
\&attribute, the corresponding values are then bound to the original
symbols. \&attribute arguments can be specified in any order, when
- the calling form contains multilp attributes of the same name the
+ the calling form contains multiple attributes of the same name the
rightmost value is used. Unless an \&allow-other-attributes is specified
- the attributes sperified by \&attributes are the only ones allowed.
-\item [\&allow-other-attributes] the symbol folling the
+ the attributes specified by \&attributes are the only ones allowed.
+\item [\&allow-other-attributes] the symbol following the
\&allow-other-attributes marker is bound to any attributes which
weren't bound to any \&attribute args.
\item [\&body] Everything which isn't an attribute or a required arg
@@ -247,8 +247,8 @@
bothered, to learn a new syntax, and the most common design tools,
which work best with tags and attributes.
-A \tal{} template is an object (reppresented internally as a function
-and externally as a text file or a string) which, given an enviroment
+A \tal{} template is an object (represented internally as a function
+and externally as a text file or a string) which, given an environment
mapping names to values and a generator which is able to locate
included templates, produces some text.
@@ -257,9 +257,9 @@
Given a \tal{} template (either an in-memory string or a file) We can
compile this text into a function which, when called, prints to
corresponding HTML on \sym{*yaclml-stream*}. The compiled function
-requries two arguments: an alist mapping names (symbols) to lisp
-objects (the enviroment) and a generator which is used for finding
-\tal{} tomplates to include in other templates.
+requires two arguments: an alist mapping names (symbols) to lisp
+objects (the environment) and a generator which is used for finding
+\tal{} templates to include in other templates.
\section{The TAL Expression language}
@@ -268,20 +268,20 @@
\begin{itemize}
\item tags or attributes
-which operate on values taken from the enviroment (eg: the content and
+which operate on values taken from the environment (eg: the content and
dolist attributes discussed below) are passed regular lisp code
-(experssed as text and then converted to lisp via \clhs{READ-FROM-STRING}).
+(expressed as text and then converted to lisp via \clhs{READ-FROM-STRING}).
\item Inside other HTML attributes where we would like to substitute
the value of some lisp code inside the textual value of the attribute.
\end{itemize}
When a lisp expression is expected as the value of a \tal{} attribute
the '\$' read macro can be used to access values in current \tal{}
-enviroment.
+environment.
When a string value is expected for an HTML attribute the syntax
-``\${...}'' can be used to evaluate a lisp form and substitue the
-result into the containg attribute value. The ``@{...}'' syntax
+``\${...}'' can be used to evaluate a lisp form and substitute the
+result into the contain attribute value. The ``@{...}'' syntax
differs from the ``\${...}'' syntax in that the form is expected to
return a list and every element of that list is embedded in the
enclosing attribute. Inside the lisp forms the '\$' read macro is
@@ -291,12 +291,12 @@
\tal{} templates are xml and use xml's namespace mechanism for
defining the mapping from names to attribute and tag handlers.
-Templates are always compilied with the default namespace bound to the
+Templates are always compiled with the default namespace bound to the
package \sym{:it.bese.yaclml.tags}, this allows all the standard HTML
-tas to be used without problems. The namespace identifier
+tags to be used without problems. The namespace identifier
``http://common-lisp.net/project/bese/tal/core'' can be used to
specify the \sym{:it.bese.yaclml.tal} package which contains all the
-standard \tal{} tags and attributes. If it is neccessary the
+standard \tal{} tags and attributes. If it is necessary the
\sym{:it.bese.yaclml.tags} namespace can be accessed via
``http://common-lisp.net/project/bese/yaclml/core''. Parameters passed
to included templates need to use the
@@ -328,8 +328,8 @@
\deftalatt{DOLIST}{value}
\param{value} is executed and the resulting value is appended to the
-current enviroment\footnote{It follows that value must return an alist
- of the same form as other \tal{} enviroments}.
+current environment\footnote{It follows that value must return an alist
+ of the same form as other \tal{} environments}.
\deftaltag{TAL}{}
@@ -343,7 +343,7 @@
\subsection{TAL Inclusion}
\tal{} templates can be included in other templates, in order to do
-this we must specify: 1) the template to include, 2) the enviroment to
+this we must specify: 1) the template to include, 2) the environment to
pass to the included template. Inclusion is done with the {\tt
tal:include} tag.
@@ -354,7 +354,7 @@
Passing values to the included template can be done via attributes, or
nested param tags. Any attribute in the {\tt include} tag whose name
starts with the string ``param:'' (case insensitive) is added to the
-enviroment (with the associated value). The name of the param is
+environment (with the associated value). The name of the param is
everything after the ``param:'' string. If the include tag is not
empty it's body must be a sequence of param tags. These are tags whose
name, like the attributes, must start with ``param:'', they are
@@ -362,14 +362,14 @@
The parameters are interned into the current package.
Both attribute parameters and tag parameters are evaluated in the
-containing template's enviroment and whatever text they would have
+containing template's environment and whatever text they would have
output on \sym{*yaclml-stream*} is passed to the included template. It
is not currently possible to pass lisp objects to included tags.
\section{Order of evaluation of \tal{} attributes}
Multiple tag attributes can be put on the same tag, the attributes are
-evaluated in left to right order. combining attributes is a convinent
+evaluated in left to right order. combining attributes is a convenient
and common operation.
Example: we want to print a user's title in bold if the user has a
@@ -380,7 +380,7 @@
\end{verb}
Since the {\tt when} attribute is seen first the bold tag will be
-produced (with it's contents substitued as per the {\tt content}
+produced (with it's contents substituted as per the {\tt content}
attribute) only when {\tt (title user)} exists (is not nil).
\section{Defining TAL Tags and Attributes}
More information about the bese-devel
mailing list