See also http://wiki.cocoondev.org/Wiki.jsp?page=MetaStylesheets

In this technique, an html template containing some kind of markup for
dynamic layout is transformed into a stylesheet which is then applied to a
content document. Then you can have a template like this which can function
as a kind of "skin" for "underlying" html documents:

<html>
        <head>
                <title>My Website - {/html/head/title}</title>

...

and transform the string containing {/html/head/title} into an <xsl:value-of
select="/html/head/title"/> statement. With a few custom attributes in the
HTML you can markup repetition and conditional. e.g. to produce a list of
the heading 1 elements:

<ul>
        <li blah:for-each="/html/body//h1">{.}</li>
</ul>

Cheers

Con



> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Andreas Hartmann
> Sent: Saturday, 4 October 2003 00:58
> To: [EMAIL PROTECTED]
> Subject: Re: html templates - best practise
>
>
> Bertrand Delacretaz wrote:
>
> > Le Vendredi, 3 oct 2003, à 14:41 Europe/Zurich, Derek Hohls
> a écrit :
> >
> >> ...My feeling is that use of Cocoon must change some aspects
> >> of how you work... if you do not want to change, then maybe
> >> stick to JSP or other template-type systems?...
> >
> > I didn't follow the beginning of this discussion, but wouldn't a
> > technique like the "style-free XSLT" presented in
> > http://www.xml.com/lpt/a/2000/07/26/xslt/xsltstyle.html
> allow one to
> > work with "visible" HTML templates, even if doing the
> transformations in
> > XSLT?
> >
> > I haven't used this yet but the idea looks really interesting.
>
> Actually, it is extremely useful. Some Lenya publications are using
> it, and the major benefit is the separation of real XHTML layout
> and presentation logic. The XSLTs become more readable and maintenance
> is simplified. The cocooncenter article I mentioned in my previous
> mail to this thread is based on exactly this xml.com article.
>
> Andreas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to