cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olson, Dave -Systems" <Dave.Ol...@itt.com>
Subject RE: XSL transformation exception when run as CLI, but not as serv let
Date Fri, 04 Apr 2003 19:07:18 GMT
Thanks for mentioning that.  Upgrading Xalan to 2.4.1 fixed it.
-DAvid



> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> Sent: Friday, April 04, 2003 5:18 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: XSL transformation exception when run as CLI, but not as
> servlet
> 
> 
> Hello Dave,
> 
> one week ago somebody had exactly the same problem with 
> Cocoon 2.0.4, Xalan 
> 2.3.1 and DocBook 1.48. He solved it by using Xalan 2.4.1, so 
> give it a try. 
> What the difference is between CLI and servlet? I don't know.
> 
> Joerg
> 
> Olson, Dave -Systems wrote:
> > Dear community:
> > I've been trying to transform a simple DocBook XML file 
> into FO (and also
> > PDF) from the command line.  I started by modifying the 
> sitemap that comes
> > with the src distribution's "documentation" example, by 
> adding my pipeline.
> > I've been able to get that sitemap, with DocBook 1.60.1 
> style-sheets, and
> > even FOP to work with Cocoon-2.0.4, running as a servlet, 
> by mounting it in
> > the original Cocoon sitemap.  However, if I try to run 
> Cocoon at a command
> > line, just as you would to generate the documentation 
> (URI=body-todo.xml), I
> > get the following:
> > 
> > WARN    2003-04-03 19:30:53.540 [core.xsl] (): File
> > file:.../demo/./docbook1.60.1/fo/docbook.xsl; Line 182; 
> Column 16; Making
> > portrait pages on USletter paper (8.5inx11in)
> > FATAL_E 2003-04-03 19:31:00.663 [core.xsl] (): File
> > file:/...demo/./docbook1.60.1/fo/../common/common.xsl; Line 
> 1576; Column 35;
> > 7 >= 1
> > ; SystemID: 
> file:/.../demo/./docbook1.60.1/fo/../common/common.xsl; Line#:
> > 1576; Column#: 35
> > javax.xml.transform.TransformerException: 7 >= 1
> > 	at org.apache.xpath.XPath.bool(XPath.java:411)
> > 	at
> > org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:162)
> > 	<xalan stack deleted>
> > 	<xerces/avalon/cocoon stack deleted>
> > 	at
> > 
> org.apache.cocoon.generation.FileGenerator.generate(FileGenera
> tor.java:143)
> > 	at
> > 
> org.apache.cocoon.components.pipeline.CachingEventPipeline.pro
> cess(CachingEv
> > entPipeline.java:250)
> > 	at
> > 
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.pr
> ocess(CachingS
> > treamPipeline.java:395)
> > 	at
> > 
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNo
> de.invoke(Seri
> > alizeNode.java:154)
> > 	<...>
> > 	at org.apache.cocoon.Main.main(Main.java:403)
> > Caused by: java.lang.ArrayIndexOutOfBoundsException: 7 >= 1
> > 	at java.util.Vector.elementAt(Vector.java:427)
> > 	at
> > 
> org.apache.xml.dtm.ref.DTMStringPool.indexToString(DTMStringPo
> ol.java:128)
> > 	<...>
> > 
> > Where should I look for the problem?  I've noticed that the 
> cocoon.xconf I'm
> > using for the CLI invocation defines a <sitemap> class attribute of
> > "TreeProcessor," which differs from the servlet's cocoon 
> configuration.  If
> > this won't work for my pipeline, which "engine" should I 
> use for the CLI
> > config?
> > 
> > The source XML document is concatenated at the end of this email.
> > 
> > Here's a few other details that might be pertinent.
> > pipeline:
> >   <map:pipeline>
> >   	<map:match pattern="userdemo.fo">
> >   		<map:generate src="userdemo.xml"/>
> >   		<map:transform src="docbook1.60.1/fo/docbook.xsl"/>
> >   		<map:serialize type="xml"/>
> >   	</map:match>
> >   </map:pipeline>
> > 
> > build:
> > Cocoon-2.0.4. built from a source distribution for both the 
> default target
> > and as a war for the servlet
> > DocBook 1.60.1 style-sheets
> > I've tried resolving the DocBook DTD from a local catalog, 
> but that didn't
> > help.
> > 
> > command line:
> > I use a sh script to build the classpath, from the 
> build/cocoon, lib/core,
> > lib/optional, and ./work dir's, the final line of which is:
> > java -classpath $CP $COCOON_OPTS org.apache.cocoon.Main -c 
> . -d dest -u INFO
> > $*
> > $* would be expanded to "userdemo.fo" when I invoke it.
> > 
> > Other details:
> > I had to remove the generators and transformers related to
> > "sunshine.Sunspot" from the documentation sitemap.xmap in 
> order to get it to
> > run under the servlet cocoon.xconf, however, I was getting 
> the above errors
> > before doing that.
> > 
> > Any ideas?
> > -DAvid
> > 
> > userdemo.xml:
> > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> >                     
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
> [
> ]>
> 
> 
> <book>
> <bookinfo>
>   <title>IHSDM User's Manual</title>
>   <author>
>     <firstname>Miles</firstname>
>     <surname>Togo</surname>
>     <affiliation>Turner-Fairbank Highway Research Center
> (TFHRC)</affiliation>
>     <address>
>       <street>Pike</street>
>       <city>Somewhere</city><state>VA</state><postcode>99999</postcode>
>     </address>
>   </author>
>   <copyright><year>2003</year><holder>someone</holder></copyright>
> </bookinfo>
> 
> <preface><title>Disclaimer</title>
>  <para>
> 	Say something here.
>  </para>
>  <para>
> 	just another paragraph
>  </para>
> <figure> 
>   <title>DCM Graph Wizard Info Edit</title>
>   <graphic srccredit="from somewhere"
> fileref="DCMGraphWizardInfoEdit.tabTitles.png"/>
> </figure>
> </preface>
> <chapter> First Chapter Contents... </chapter>
> <chapter> Second Chapter Contents...</chapter>
> <chapter> ... </chapter>
> <appendix> ... </appendix>
> <index> ... </index>
> </book>

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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

************************************ 
If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information.  In such a case, you may not
copy or deliver this message to anyone.  You should destroy this message and
kindly notify the sender by reply email.  Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT. 
************************************ 


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