You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ben Young <by...@bju.edu> on 2003/02/08 03:00:19 UTC

Cinclude issues...

I've recently attempted to use the cinclude to aggregate some files that I'm
currently aggregating with the map:aggregate command, but I've run into some
"issues" that I'm not sure how to resolve.

My current map:match section looks like this:

<map:match pattern="**/index.htm*">
  <map:act type="sourcetype" src="/home/htdocs/content/{1}/index.xml">
   <map:aggregate element="document">
      <map:part src="cocoon:/{../1}/../_navigation.xml"
element="navigation"/>
      <map:part src="cocoon:/{../1}/index.{sourcetype}"/>
   </map:aggregate>
  </map:act>
  <map:transform src="/home/htdocs/design/shell.xsl">
    <map:parameter name="nav_filename"
value="/home/htdocs/content/nav_home.xml"/>
    <map:parameter name="path" value="{1}"/>
  </map:transform>
  <map:serialize/>
</map:match>

I use an "internal-only" pipeline to find the nearest _navigation.xml file
in existence.

<map:pipeline internal-only="true">
  <map:match pattern="**/_navigation.xml">
    <map:act type="resource-exists">
       <map:parameter name="url"
value="/home/htdocs/content/{1}/_navigation.xml"/>
       <map:generate src="/home/htdocs/content/{../1}/_navigation.xml"/>
       <map:serialize type="xml"/>
    </map:act>
    <map:redirect-to uri="cocoon:/{1}/../_navigation.xml"/>
  </map:match>
</map:pipeline>

I'd like to move the aggregation step after the shell.xsl is applied. The
plan is to have the shell.xsl output a cinclude tag that uses the
"cocoon://" psuedo-protocol in the appropriate place using the $path
parameter plus "_navigation.xml"

My current trouble is that the cinclude only runs through the internal
pipeline once.

Thank you for any help you might be able to give,
Ben


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Cinclude issues...

Posted by Jeff Turner <je...@apache.org>.
On Fri, Feb 07, 2003 at 09:00:19PM -0500, Ben Young wrote:
> I've recently attempted to use the cinclude to aggregate some files that I'm
> currently aggregating with the map:aggregate command, but I've run into some
> "issues" that I'm not sure how to resolve.
> 
> My current map:match section looks like this:
> 
> <map:match pattern="**/index.htm*">
>   <map:act type="sourcetype" src="/home/htdocs/content/{1}/index.xml">
>    <map:aggregate element="document">
>       <map:part src="cocoon:/{../1}/../_navigation.xml"
> element="navigation"/>
>       <map:part src="cocoon:/{../1}/index.{sourcetype}"/>
>    </map:aggregate>
>   </map:act>
>   <map:transform src="/home/htdocs/design/shell.xsl">
>     <map:parameter name="nav_filename"
> value="/home/htdocs/content/nav_home.xml"/>
>     <map:parameter name="path" value="{1}"/>
>   </map:transform>
>   <map:serialize/>
> </map:match>
> 
> I use an "internal-only" pipeline to find the nearest _navigation.xml file
> in existence.
> 
> <map:pipeline internal-only="true">
>   <map:match pattern="**/_navigation.xml">
>     <map:act type="resource-exists">
>        <map:parameter name="url"
> value="/home/htdocs/content/{1}/_navigation.xml"/>
>        <map:generate src="/home/htdocs/content/{../1}/_navigation.xml"/>
>        <map:serialize type="xml"/>
>     </map:act>
>     <map:redirect-to uri="cocoon:/{1}/../_navigation.xml"/>
>   </map:match>
> </map:pipeline>
> 
> I'd like to move the aggregation step after the shell.xsl is applied. The
> plan is to have the shell.xsl output a cinclude tag that uses the
> "cocoon://" psuedo-protocol in the appropriate place using the $path
> parameter plus "_navigation.xml"
> 
> My current trouble is that the cinclude only runs through the internal
> pipeline once.

Perhaps my brain slipped out of gear, but that seems a bit cryptic..
Don't you need a <map:transform type="cinclude"/> tag somewhere to get
cinclude processing?


--Jeff

PS: in case you didn't know: Forrest does this kind of nav + body
integration to generate pages like http://xml.apache.org/forrest/


> Thank you for any help you might be able to give,
> Ben
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>