On Mon, Nov 5, 2012 at 7:51 AM, Robby Pelssers <[email protected]> wrote:
> Hi Mansour,
>
> First of all I assume you don't have the same match patterns in the same
> sitemap..right? I guess you altered the implementation just to test and the
> first one (docbook.xsl) failed and the second one (myCustomSheet.xsl) worked.
Yes, exactly ! The first one is failing, the second one is working. So
the issue is only with docbook.xsl being processed from cocoon.
>
> The most obvious way to debug is to try what following matchers will do:
>
> <map:match pattern="article/{id}">
> <map:generate
> src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
> <map:serialize />
> </map:match>
>
> Also try to generate that xsl:
>
> <map:match pattern="transform/docbook.xsl">
> <map:generate
> src="/home/mansour/workspace/pipelines/docbook-xsl-snapshot/html/docbook.xsl
> " />
> <map:serialize />
> </map:match>
>
> But my hunch is that the docbook.xsl has other xsl imports or includes which
> might be the problem.
>
> Let me know what happens if you try above matchers and also check if the
> docbookx.xsl has imports/includes or if it has declared xsl parameters.
I tried both matchers and they seem to be working fine. I can do
http://localhost:8888/transform/docbook.xsl and I get the expected
output.
The docbook.xsl has a lot of <xsl:include> :
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ng="http://docbook.org/docbook-ng"
xmlns:db="http://docbook.org/ns/docbook"
xmlns:exsl="http://exslt.org/common"
xmlns:exslt="http://exslt.org/common" exclude-result-prefixes="db ng
exsl exslt" version="1.0">
<xsl:output method="html" encoding="ISO-8859-1" indent="no"/>
<!-- ********************************************************************
$Id: docbook.xsl 9605 2012-09-18 10:48:54Z tom_schr $
********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
See ../README or http://docbook.sf.net/release/xsl/current/ for
copyright and other information.
******************************************************************** -->
<!-- ==================================================================== -->
<xsl:include href="../VERSION.xsl"/>
<xsl:include href="param.xsl"/>
<xsl:include href="../lib/lib.xsl"/>
<xsl:include href="../common/l10n.xsl"/>
<xsl:include href="../common/common.xsl"/>
<xsl:include href="../common/utility.xsl"/>
<xsl:include href="../common/labels.xsl"/>
<xsl:include href="../common/titles.xsl"/>
<xsl:include href="../common/subtitles.xsl"/>
<xsl:include href="../common/gentext.xsl"/>
<xsl:include href="../common/targets.xsl"/>
<xsl:include href="../common/olink.xsl"/>
<xsl:include href="../common/pi.xsl"/>
<xsl:include href="autotoc.xsl"/>
<xsl:include href="autoidx.xsl"/>
....
Thank you for helping in this.
>
> Kind regards,
> Robby Pelssers
>
> -----Original Message-----
> From: Mansour Al Akeel [mailto:[email protected]]
> Sent: Sunday, November 04, 2012 11:14 PM
> To: users
> Subject: Unable to transform to docbook
>
> I have worked with C2.1 and 2.2 before. I am trying to play with C3 for a
> coming project.
> I need to generate HTML from docbook file.
>
> INFO RequestProcessor - Sitemap execution for /article/ex took 6470.727 ms.
> ERROR XMLSitemapServlet - Cocoon can't process the request.
> org.apache.cocoon.sitemap.InvocationException:
> org.apache.cocoon.pipeline.ProcessingException: Can't parse url connection
> file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
> at
> org.apache.cocoon.sitemap.util.ExceptionHandler.getInvocationException(ExceptionHandler.java:39)
> at
> org.apache.cocoon.sitemap.node.PipelineNode.handleException(PipelineNode.java:101)
> at
> org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:71)
> at
> org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
> at
> org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:49)
> at
> org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
> at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.java:42)
> at
> org.apache.cocoon.servlet.RequestProcessor.invoke(RequestProcessor.java:233)
> at
> org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:290)
> at
> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:90)
> at
> org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:47)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> .....
>
> Caused by: org.apache.cocoon.pipeline.ProcessingException: Can't parse url
> connection file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
> at org.apache.cocoon.sax.util.XMLUtils.toSax(XMLUtils.java:117)
> at
> org.apache.cocoon.sax.component.XMLGenerator$URLGenerator.execute(XMLGenerator.java:385)
> at
> org.apache.cocoon.sax.component.XMLGenerator.execute(XMLGenerator.java:104)
> at
> org.apache.cocoon.pipeline.AbstractPipeline.invokeStarter(AbstractPipeline.java:146)
> at
> org.apache.cocoon.pipeline.CachingPipeline.execute(CachingPipeline.java:143)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at
> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
> at
> org.apache.cocoon.servlet.collector.ResponseHeaderCollector.interceptInvoke(ResponseHeaderCollector.java:94)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
> at
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
> at
> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
> at $Proxy27.execute(Unknown Source)
> at
> org.apache.cocoon.sitemap.InvocationImpl.execute(InvocationImpl.java:141)
> at
> org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:66)
> ... 60 more
> Caused by: org.xml.sax.SAXException: java.lang.NullPointerException
> javax.xml.transform.TransformerException: java.lang.NullPointerException
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:245)
> at
> org.apache.cocoon.xml.sax.AbstractSAXPipe.endDocument(AbstractSAXPipe.java:58)
> at
> org.apache.cocoon.sax.AbstractSAXTransformer.endDocument(AbstractSAXTransformer.java:47)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:742)
>
> ......
>
> Here's my pipeline:
>
> <map:pipelines>
> <map:pipeline>
>
> <map:match pattern="article/{id}">
> <map:generate
> src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
> <map:transform
> src="/home/mansour/workspace/pipelines/docbook-xsl-snapshot/html/docbook.xsl"
> />
> <map:serialize />
> </map:match>
>
>
> This matcher is working with another transformation.
> For example the following pipeline:
>
> <map:pipeline>
>
> <map:match pattern="article/{id}">
> <map:generate
> src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
> <map:transform src="sheets/myCustomSheet.xsl" />
> <map:serialize />
> </map:match>
>
> Would work fine.
>
> The same file "ex.xml" can be processed with xalan from the command line and
> produce the correct output !
>
> any idea ??
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]