Re: (dsssl) Including chunks of HTML code (newbie)

Subject: Re: (dsssl) Including chunks of HTML code (newbie)
From: daniel lance herrick <dan.herrick@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Jul 2002 09:21:04 -0400 (EDT)
Yesterday, my response to your question was, "Oh
goody! The newest subscriber to the list (me) can
get the answers to his questions without having to
dominate the list by asking asking asking." 

Today, I've made a little more progress.

In the code fragment "one helpful soul" suggested
to you, "(element root ...)" is a
root-construction-rule which we find in 12.4.1 of
the DSSSL standard.

http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=18196&ICS1=35&ICS2=240&ICS3=30
or (http://xml.coverpages.org/dsssl.html  (see the ZIP archive,
accessible via HTTP)).

The ... in the root-construction-rule is an expression of type sosofo,
which the (sosofo-append ...) in the kind suggestion satisfies. We
find it in section 12.4.3 and the ... is a list of sosofos.

In that same section, there is another function, (literal string ...),
that returns a sosofo containing the text of the string.

So you can do something like

  (element root
    (sosofo-append
      (literal "text to go before the generated html")
      (process-children)
      (literal "text to go after the generated html")
    )
  )

Somewhere around the pages on Mulberry, (one of which is
http://www.mulberrytech.com/dsssl/dsssldoc/procedures/index.html)
there is a page that gives some ways to get line breaks into the
generated file where you want them (that may have been in a FAQ
collection).

There is advice about customizing an existing
stylesheet without touching it by writing a
"driver" at
http://www.docbook.org/tdg/en/html/ch04.html#d0e11301
which also sounds a bit like it applies to your
situation.

Hope this helps,

dan


On Mon, 8 Jul 2002, Antun Karlovac wrote:

> Hi all
> 
> I'm struggling with DSSSL at the moment. What I want do is to include a
> header and footer on each page. The pages will be processed by PHP on the
> server, after I have generated them.
> 
> Therefore all I need to include is:-
> 
> = Code ===================================
> <?php $thisPage = __FILE__; ?>
> <?php $urlPrefix = '../'; ?>
> <?php include '../includes/tree.php'; ?>
> <?php include '../includes/header.php'; ?>
> 
> [generated HTML goes here]
> 
> <?php include '../includes/footer.php'; ?>
> ==========================================
> 
> The head, body, title etc. tags are all included by PHP, so I want ONLY the
> contents of the body tag to go in the square brackets.
> 
> I've been scouring the search engines and reading up about how to do this,
> and one helpful soul suggested:
> 
> = Code ===================================
> (element root
>    (sosofo-append
>      (include-headerphp)
>      (process-children)
>      (process headerphp))
> ==========================================
> 
> But I can't find how to define "include-headerphp" in any of the
> tutorials/dsssl documentation I've read. Is it a text file with just the PHP
> code?
> 
> I'm OpenJade (which someone else set up for me), and the command I type is
> "make html".
> 
> Thanks for any help in advance!
> 
> Take care,
> 
> Antun
> 
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist
> 


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread