RE: XSL transformation exception when run as CLI, but not as servlet
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) 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 titleIHSDM User's Manual/title author firstnameMiles/firstname surnameTogo/surname affiliationTurner-Fairbank Highway Research Center (TFHRC)/affiliation address streetPike/street citySomewhere/citystateVA/statepostcode9/postcode /address /author copyrightyear2003/yearholdersomeone/holder/copyright /bookinfo prefacetitleDisclaimer/title para Say something here. /para para just another paragraph /para figure titleDCM 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
RE: CLASSPATH
Can someone tell me what this CLASSPATH environment variable is supposed to look like (I'm trying to install Cocoon and Lenya). An excellent resource for understanding how the java virtual machine finds classes is at http://java.sun.com/products/jdk/1.2/docs/tooldocs/findingclasses.html The CLASSPATH variable is just one place it looks. CLASSPATH = .\;C:\Programme\Apache Group\apache-ant-1.5.2\lib What does this .\; mean? As for your CLASSPATH settings, I'm a beginner too, but I'll add my two-cents: the .\ represents the current directory. I'm not sure this is necessary. How are you trying to run Cocoon? Are you running it from a command line? If so, take a look at the run.sh script in the src release of Cocoon. Your classpath needs a long list of jar's in it, taken from the core, optional, and possibly other directories; or at least that's how I've been running it. Hope that helps, -DAvid Can someone tell me what this CLASSPATH environment variable is supposed to look like (I'm trying to install Cocoon and Lenya). CLASSPATH = .\;C:\Programme\Apache Group\apache-ant-1.5.2\lib What does this .\; mean? Is this some sort of command? Or does it have to be simply: CLASSPATH = C:\Programme\Apache Group\apache-ant-1.5.2\lib Many thanks! Ines - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XSL transformation exception when run as CLI, but not as servlet
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) xalan stack deleted xerces/avalon/cocoon stack deleted 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 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 titleIHSDM User's Manual/title author firstnameMiles/firstname surnameTogo/surname affiliationTurner-Fairbank Highway Research Center (TFHRC)/affiliation address streetPike/street citySomewhere/citystateVA/statepostcode9/postcode /address /author copyrightyear2003/yearholdersomeone/holder/copyright /bookinfo prefacetitleDisclaimer/title para Say something here. /para para just another paragraph /para figure titleDCM 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 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
RE: RSS
Richard, I just read about a feature that might be helpful to you. The discussion of Content Aggregation in Cocoon: Building XML Applications (Matthew Langham, Carsten Ziegeler; New Riders Pub; ISBN : 0-7357-1235-2) discusses a way to aggregate multiple generators into a single XML document, on the fly, that can then be transformed using a style sheet. It uses, among other tags, the map:aggregate tag. I'm just a beginner at Cocoon, so it may not be the best way to do it, and it's probably not the only way to do it. Maybe others can provide alternate methods. I want to call a RSS feed. Is it possible for the style sheet to use the XML document it is styling and the XML RSS feed. How would I set up my sitemap to do this? And how would I call the two different XML files in my style sheet? Thanks, Richard. 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CLI output file names
When running Cocoon as a command line tool, how does Cocoon determine what to name the resulting files? I assume the URI you specify after the options is matched by one of the matchers in the sitemap, and so I know where processing starts, but since a serializer, when run as a web app, streams to a servlet/browser, where does output go when using the CLI? I've searched all the web links, books, FAQs and mailing lists, but I can find very little on using the CLI. I found an example in build.xml, but I still don't understand how the output filenames are determined. For example, if I have a match element for usersguide.fo that passes it to the fo2pdf serializer (FOP), how do I indicate the output PDF filename? puzzled, DAvid Olson 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]