You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jerome Paul <je...@ephox.com> on 2003/01/24 07:45:43 UTC

Using docbook chunk.xsl with cocoon

Hi,
  I'm trying to convert xml documents using
docbook-xsl-1.58.1\html\chunk.xsl with tomcat 4.0 and cocoon 2.0.4 windows
2000.  Anyway the conversion takes a while (it's converting a decent sized
xml document) when the conversion stops Internet explorer displays nothing
when using the standard html\docbook.xsl it work fine.  I'm pretty sure that
the error is with the chunk.xsl because it's been hardcoded to write to the
hdd and the way it actually creates many web pages instead of a single page.
Has anyone else had this problem? what's the solution that other people have
used?

any help would be greatly appreciated 
Jerome

---------------------------------------------------------------------
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: Using docbook chunk.xsl with cocoon

Posted by Jeff Turner <je...@apache.org>.
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Using docbook chunk.xsl with cocoon

Posted by Perry Molendijk <xi...@iinet.net.au>.
 
> I can post details if that's the problem you're trying to solve.

Jeff that would be great if you could post this.

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


Re: Using docbook chunk.xsl with cocoon

Posted by Jeff Turner <je...@apache.org>.
On Fri, Jan 24, 2003 at 04:45:43PM +1000, Jerome Paul wrote:
> Hi,
>   I'm trying to convert xml documents using
> docbook-xsl-1.58.1\html\chunk.xsl with tomcat 4.0 and cocoon 2.0.4
> windows 2000.  Anyway the conversion takes a while (it's converting a
> decent sized xml document) when the conversion stops Internet explorer
> displays nothing when using the standard html\docbook.xsl it work fine.
> I'm pretty sure that the error is with the chunk.xsl because it's been
> hardcoded to write to the hdd and the way it actually creates many web
> pages instead of a single page.  Has anyone else had this problem?
> what's the solution that other people have used?

Er.. what does chunk.xsl do?  The one on my hdd doesn't seem to write to
disk..

Would I be correct in guessing that chunk.xsl breaks a large Docbook file
into chapters or something?  If so, you could use the XPathTransformer in
Cocoon bugzilla to achieve the same thing.  that's how I generated the
chapter views of a single XML file user manual at:
http://aft.sourceforge.net/manual/

I can post details if that's the problem you're trying to solve.

--Jeff

> any help would be greatly appreciated 
> Jerome
> 

---------------------------------------------------------------------
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>