forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: Generating .js resources using .js.xslt stylesheets...?
Date Tue, 08 Jun 2004 07:06:41 GMT
Bart Guijt wrote:

> Hi all,
> I am building a skin for my current assignment, a large bank in the
> netherlands. Theire UI guidelines are very specific, and they use a separate
> javascript file containing all menu data instead of using just html.

In fact it's a clever way of minimizing network traffic without using 

> I tried creating a stylesheet menu.js.xslt, which unfortunately only works
> after adapting the sitemap context/resources.xmap. More unfortunately, the
> stylesheet's source document is just the skinconf.xml used by the .css.xslt
> stylesheets just to be sort-of 'compatible'.
> In the end, I don't get my menu.js resource as I would like (which is just
> simple code which initializes a large array with @href and @label
> information). Nor do I like to fiddle with the resources.xmap file to get
> what I want.

Your post comes in an incredibly precise moment... we are discussing
about access to project presentation metadata in skinconf, and here it's 
about content metadata!  Cool! :-)

A quick solution to your problem is simply to make a pipeline that calls 
the aggregated cocoon content and work on that.

Something like:

       <map:match pattern="*.xslt.js">
         <map:generate src="cocoon://abs-menulinks"/>
          <map:serialize type="text"

> Or is a "**.js.xslt" matcher useful in the resources.xmap (generally
> speaking, as in out-of-the box supported by Forrest) which uses another
> document source (same as used by document2html)?

It seems that the use of this metadata has to be given to all styling 
resources, being it because of FOP or because of javascript or whatever 
else. It will have to be implemented, although I still don't know how...

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

View raw message