cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: linking from main samples to block samples
Date Thu, 08 May 2003 09:31:49 GMT

Bertrand Delacretaz wrote, On 08/05/2003 10.51:
> Ok - detecting the presence of blocks or components dynamically is 
> certainly possible, but AFAIK there's no easy mechanism for relaying 
> this info to an XSLT page that would include links or not. I'd be glad 
> to be proven wrong though ;-)

If was blockprops.xml, both Ant and Cocoon could read 
it... ;-)

Ok, ok, here is how it can be done now:

  1 - use xslt to transform module.xml to a temp.xml file that shows
      all blocks, and that adds a ${} element:

        <block name="xxx" exclude="${}">

  2 - then load and filter the file to
      expand the propertirs with:

   <copy srcFile="temp.xml">

  3 - Now we have:

        <block name="xxx" exclude="true">
        <block name="yyy" exclude="false">

    We can now style this with xslt in Ant or Cocoon to not show
    items where @exclude="true"

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

View raw message