forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: svn commit: rev 21237 - in forrest/trunk/src/core/context: . WEB-INF resources/stylesheets
Date Tue, 15 Jun 2004 07:07:11 GMT
Juan Jose Pablos wrote:
> Nicola Ken Barozzi escribió:
> 
>> Juan Jose Pablos wrote:
>>
>>> nicolaken@apache.org escribió:
>>>
>>>> -        <map:transform 
>>>> src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
>>>> +        <map:transform 
>>>
>>>
>>> Why do we need a hard-code value tin this line?
>>
>> Good question. I had forrest:stylesheets before but it seemed that the 
>> stylesheet was not picked up. Don't ask me why, I really dunno. :-/
> 
> Maybe I has to do with the ForrestConfModule.

I don't think so, as other substitutions work correctly.

> I would like to show you a 
> way to mofidy values using xslt under ant.
> 
> You can see it in a patch. But the summary is this one:
> We can pass the build time parameters using <param/> on the xstl task.
> 
> Then use the value on the style sheet with <xsl:param/>
> 
> so we would be able to create code like:
> 
> <xsl:template match="whateve" mode="$target">
> 
> Where target could be "site" "run" or "webapp
> 
> WDTY?
...
+  <target name="transform-cocoon" >
+     <xslt in="${forrest.home}/context/WEB-INF/cocoon.xconf" 
out="cocoon.xconf"
+ 
style="${forrest.home}/context/resources/stylesheets/cocoon-transform.xsl">
+      <param name="catalog" 
expression="${forrest.home}/context/resources/schema/catalog.xcat"/>
+      <xmlcatalog refid="fcatalog"/>
+    </xslt>
+  </target>

In cocoon-transform.xsl":

   <xsl:template match="entity-resolver">
     <entity-resolver logger="core.resolver">
       <xsl:attribute name="name">catalog</xsl:attribute>
       <xsl:attribute name="value">
        <xsl:value-of select="$catalog"/>
       </xsl:attribute>
     </entity-resolver>
   </xsl:template>

I think this is a step backwards from 'copyless', and despite it solving 
the catalogue issue, I would really prefer not to do it.

On the other hand, it solves the catalogue issue, and since we are 
already copying a webapp, I'm ok for this to go in, but *only* to fix 
the catalogue issue. If we use it for more, we will have much more 
problems in finishing off copyless in 0.7.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message