RE: XSL transformation exception when run as CLI, but not as servlet

2003-04-04 Thread Olson, Dave -Systems
Thanks for mentioning that.  Upgrading Xalan to 2.4.1 fixed it.
-DAvid



> -Original Message-
> From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 5:18 AM
> To: [EMAIL PROTECTED]
> 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:
> > 
> > WARN2003-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)
> > 
> > 
> > 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  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:
> >   
> > 
> > 
> > 
> > 
> > 
> >   
> > 
> > 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:
> >  > 
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";
> [
&g

Re: XSL transformation exception when run as CLI, but not as servlet

2003-04-04 Thread Joerg Heinicke
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:
WARN2003-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)


at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:395)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.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(DTMStringPool.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  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:
  





  
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:
http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";
[
]>


  IHSDM User's Manual
  
Miles
Togo
Turner-Fairbank Highway Research Center
(TFHRC)

  Pike
  SomewhereVA9

  
  2003someone

Disclaimer
 
	Say something here.
 
 
	just another paragraph
 
 
  DCM Graph Wizard Info Edit
  
fileref="DCMGraphWizardInfoEdit.tabTitles.png"/>


 First Chapter Contents... 
 Second Chapter Contents...
 ... 
 ... 
 ... 

--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]