cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Using docbook chunk.xsl with cocoon
Date Tue, 28 Jan 2003 02:39:13 GMT
On Sun, Jan 26, 2003 at 10:03:10AM +0800, Perry Molendijk wrote:
>  
> > I can post details if that's the problem you're trying to solve.
> 
> Jeff that would be great if you could post this.

(sorry for the delay)

I used something close to this:

<map:transformers>
  ...
  <map:transformer name="xpath"
    logger="sitemap.transformer.xpath"
    src="org.apache.cocoon.transformation.XPathTransformer"
    />
</map:transformers>

...
<map:match pattern="manual/*.xml">

  <map:generate src="content/xdocs/manual.xml"/>
  <map:transform src="resources/stylesheets/docbook2document.xsl"/>
  <map:transform type="xpath">
    <map:parameter name="include" value="document/header | document/body/section[title='{1}']"/>
  </map:transform>
  <map:transform src="resources/stylesheets/localizeheader.xsl"/>
  <map:serialize type="xml"/>
</map:match>


Where 'localizeheader.xsl' fixes the title:

<xsl:template match="header/title">
  <title><xsl:value-of select="/document/body/section/title"/></title>
</xsl:template>

Actual sitemap + transformer available with:

export CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aft
cvs login
cvs co Anteater/src/documentation


--Jeff

> Thanks
> 
> Perry Molendijk 
> 

---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message