Next in thread → Next in month →

Re: [docbook-apps] DSSSL: appending

From
Xann Eirson
Date
2003-05-12T07:54:09+00:00
ID
-fr
Thread
Re: [docbook-apps] DSSSL: appending
On Thu, May 08, 2003 at 10:33:03AM +0530, N. Raghavendra wrote:
> I want to make `releaseinfo' and `date' appear in the titlepage of
> a `book' document. So, I put this in my stylesheet
> 
> (define book-titlepage-recto-elements
>   (append book-titlepage-recto-elements
>           (list (normalize "releaseinfo")
>                 (normalize "date"))))
> 
> This produces an OpenJade error saying, "Loop in specification of
> value of "book-titlepage-recto-elements"."

Yes, this is a circular definition, you can't do that.

> If I put parantheses around "book-titlepage-recto-elements" in the
> above expression, OpenJade hangs. If I list all the members of
> `book-titlepage-recto-elements', like
> 
> (define (book-titlepage-recto-elements)
>         (list (normalize "title")
> 	      (normalize "legalnotice")
> 	      (normalize "releaseinfo")
> 	      (normalize "date")))
> 
> it works.
> 
> 1. What is the right way to `append' to `book-titlepage-recto-elements'?

In practice, I guess your last example is how to do that.

Ideally it could be interesting to get access to the values of
overridden variables, but I don't think the standard defines a way to
do that.

> 2. According to the docs, `book-titlepage-recto-elements' is a
> variable, yet it is surrounded by parantheses. Does that mean that
> it is a function?

Yes.  A function is just a variable which contains some code, although
the doc could be made more clear and say "function" instead :)

HTH,
-- 
Yann Dirson <>                 http://www.alcove.com/
Technical support manager                Responsable de l'assistance technique
Senior Free-Software Consultant          Consultant senior en Logiciels Libres
Debian developer ()                        D憝eloppeur Debian
Next in thread → Next in month →