forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyriaque Dupoirieux <>
Subject Re: [Summary] Recent proposals around v2
Date Wed, 23 Nov 2005 13:34:48 GMT
Thorsten Scherler a écrit :

>Hi all,
>trying to summarize a wee bit the recent discussion around v2.
>forrest:contracts & forrest:properties
>1) nuggets (extra data requested by the contract)
>Nuggets are now defined in the contract element instead of in the
>forrest:properties. As well the former @nugget is now called @dataURI to
>reflect better the function of the attribute.
><forrest:contract name="nav-main-testing" 
>        dataURI="cocoon://index.navigation.xml"/>
Ok, I like "nuggets" to be renamed into "dataURI".
English is not my native language - as you recently remind to the 
community ;-)  - and my dictionnary told me that a nugget was a small 
piece of gold - indeed. So - at the beginning - I spent a long time 
wandering what was the use a small piece of gold with my contracts :-P .
The naming is still an important problem - good choice of variables, 
parameters or contracts name, naming rules for properties or contracts 
and so on... (It's good Ross started to clarify this point)

>2) The properties have lost their parent node. 
><forrest:contract name="nav-main-testing" 
>  dataURI="cocoon://index.navigation.xml">
>  <forrest:property name="nav-main-testing-test1" >x</forrest:property>
>  <forrest:property name="nav-main-testing-test2" >
>    <foo/>
>  </forrest:property>
>  <forrest:property name="nav-main-testing-test3"
Ok, Nice if there is only one property.
The code may be clearer with this...

>Contract implementation
>1) contracts are now standalone, which means that they need to
Do we have to add a patern in order to match "/" in every contracts ?
(I have very simple contracts wich do not match anything - kinds of 
Macros to insert code...)

>a) If raw data (dataURI) is requested it matches the first element of
>the dataURI. 
Same as before,

>b) If no dataURI is requested the dispatcher passes a dummy document to
>the transformation containing only one element: forrest:foo.
><xsl:stylesheet version="1.1"
>  <xsl:param name="nav-main-testing" select="/"/>
>  <xsl:template match="/" >
>    <content>
>      <div id="tabs">
>        <xsl:comment>+ |start Tabs new +</xsl:comment>
>        <xsl:copy-of 
>          select="$nav-main-testing/navigation/tab/ul[@id='nav-main']"/>
>        <xsl:comment>+ |end Tabs +</xsl:comment>
>      </div>
>    </content>
>  </xsl:template>
Same as before again no ?

>2) the resulting transformation have to go into a container element
>named "content".
>b) Till now we assumed that all hooks go
>into /html/body but this need to be more flexible. I propose to add a
>new attribute @hooksXpath to the forrest:view. I propose this attribute
>@hooksXpath as required.
><forrest:view type="html" hooksXpath="/html/body">
> <forrest:hook name="htmlBodyHook"/>
>that will be transformed into 
> <body>
>  <forrest:hook name="htmlBodyHook"/>
> </body>
Ok, so a standard HTML fv file will look like the following - am I right ? :

<?xml version="1.0" encoding="UTF-8"?>
<forrest:views xmlns:forrest=""  
  *<forrest:view type="html" hooksXpath="/html/header">*
    <forrest:css url="common.css" media="screen" rel="alternate 
stylesheet" theme="default"/>
    <forrest:contract name="branding-theme-profiler" ... />
    <forrest:contract name="siteinfo-meta"/>
    <forrest:contract name="siteinfo-meta-navigation"/>

  *<forrest:view type="html" hooksXpath="/html/body">*
    <forrest:hook name="container">
      <forrest:hook name="header">
         <forrest:contract name="...">
      <forrest:hook name="page">

I think it's the first time I realise tere is a forrest:view type attribute.
Are we ready to make views such as :

<forrest:view type="php" hooksXpath="/html/body">
 <forrest:hook name="htmlBodyHook"/>

or :

<forrest:view type="pdf" hooksXpath="/document/body">
 <forrest:hook name="pdfBodyHook"/>

>c) We need another attribute in hooks @element which would not create
>a div but the value of @element:
><forrest:hook element="html">
> <forrest:hook element="body">
>  <forrest:hook name="htmlBodyHook"/>
> </forrest:hook>
> that will be transformed into 
> <html>
>  <body>
>   <forrest:hook name="htmlBodyHook"/>
>  </body>
> </html>
Ok, I have no use case for this...

Thank you for this interesting summary...



View raw message