You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joe Williams <jo...@mindspring.com> on 2003/03/26 17:34:37 UTC

Newbie: Best practices for DocBook XSL on Cocoon

I have a question about using DocBook XSL with Cocoon, for anyone who has been successful in doing so. In hopes of getting some help and maybe helping others, I offer the following background.

After reading numerous posts to the archives for this list, and other resources, I am aware that not everyone is in favor of using the DocBook XSL stylesheets with Cocoon. However, I have also found that some people have done so successfully, and would like to do so myself.

I have been successful in serving DocBook XML content with a homegrown XSL stylesheet and CSS, but when I attempted to use the DocBook XSL to produce html, I get a blank page. (The transform runs fine from the command line.)

Looking at cocoon/WEB-INF/logs/error.log I see a fatal exception in "docbook/html/common/common.xsl; Line 1576; Column 35", "javax.xml.transform.TransformerException: 13 >= 1" and farther down in the log, I see "java.lang.ArrayIndexOutOfBoundsException: 13 >= 1"

Going to "docbook/html/common/common.xsl; Line 1576; Column 35", I see the following:

<xsl:when test="$value !="''">

OK, so xalan doesn't like this line, I guess?

Here's my setup:

Cocoon 2.0.3

Using these classes in /usr/tomcat/webapps/cocoon/WEB-INF/lib:

xalan-2.3.1.jar

xalan2.jar (docbook extensions from Norm)

xercesImpl-2.0.0.jar

xml-apis.jar

Using jre 1.3.1_06

DocBook XML DTD 4.2

DocBook XSL 1.5

I would like to keep using xalan, but if I have to add saxon, please point me to a good procedure for doing so. Ditto for any other suggestions.

When I get the setup working, I will post the info to the list.

Thanks.

Joe

RE: Newbie: DocBook XSL success

Posted by Joe Williams <jo...@mindspring.com>.
Thanks, Joerg.

I replaced the old xalan with Xalan-J 2.4.1 and the transformation works,
except for a problem with CSS.

For subsequent newbies looking for a setup that works, here's what I am
using.

Cocoon 2.0.3 with jre 1.3.1_06
DocBook XML DTD 4.2
DocBook XSL 1.5

The following .jar files are in the cocoon/WEB-INF/lib
xalan-2.4.1.jar

xalan2.jar (docbook extensions from Norm)

xercesImpl-2.0.0.jar

xml-apis.jar


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Newbie: Best practices for DocBook XSL on Cocoon

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Joe,

I used DocBook without any problems in Cocoon. It's a few months ago and 
I don't know what versions of Cocoon and Xalan I used. I guess it was 
Cocoon 2.0.3, Xalan 2.3.1 and DocBook 1.51. So try to test it with a 
more current version of DocBook (I don't have a file 
docbook/html/common/common.xsl, only docbook/common/common.xsl, but no 
line 1576). Furthermore it's possible, that it is a bug in Xalan 2.3.1, 
so try 2.4.1.

Regards,

Joerg

Joe Williams wrote:
> I have a question about using DocBook XSL with Cocoon, for anyone who 
> has been successful in doing so. In hopes of getting some help and maybe 
> helping others, I offer the following background.
>  
> After reading numerous posts to the archives for this list, and other 
> resources, I am aware that not everyone is in favor of using the DocBook 
> XSL stylesheets with Cocoon. However, I have also found that some people 
> have done so successfully, and would like to do so myself.
>  
> I have been successful in serving DocBook XML content with a homegrown 
> XSL stylesheet and CSS, but when I attempted to use the DocBook XSL to 
> produce html, I get a blank page. (The transform runs fine from the 
> command line.)
>  
> Looking at cocoon/WEB-INF/logs/error.log I see a fatal exception in 
> "docbook/html/common/common.xsl; Line 1576; Column 35", 
> "javax.xml.transform.TransformerException: 13 >= 1" and farther down in 
> the log, I see "java.lang.ArrayIndexOutOfBoundsException: 13 >= 1"
>  
> Going to "docbook/html/common/common.xsl; Line 1576; Column 35", I see 
> the following:
>  
> <xsl:when test="$value !="''">
>  
> OK, so xalan doesn't like this line, I guess?
>  
> Here's my setup:
>  
> Cocoon 2.0.3
>  
> Using these classes in /usr/tomcat/webapps/cocoon/WEB-INF/lib:
>  
> xalan-2.3.1.jar
>  
> xalan2.jar (docbook extensions from Norm)
>  
> xercesImpl-2.0.0.jar
>  
> xml-apis.jar
>  
> Using jre 1.3.1_06
>  
> DocBook XML DTD 4.2
>  
> DocBook XSL 1.5
>  
> I would like to keep using xalan, but if I have to add saxon, please 
> point me to a good procedure for doing so. Ditto for any other suggestions.
>  
> When I get the setup working, I will post the info to the list.
>  
> Thanks.
>  
> Joe


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org