Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 292EDD9B2 for ; Sun, 11 Nov 2012 17:15:13 +0000 (UTC) Received: (qmail 9389 invoked by uid 500); 11 Nov 2012 17:15:12 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 9345 invoked by uid 500); 11 Nov 2012 17:15:12 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 9338 invoked by uid 99); 11 Nov 2012 17:15:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Nov 2012 17:15:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mansour.alakeel@gmail.com designates 209.85.217.179 as permitted sender) Received: from [209.85.217.179] (HELO mail-lb0-f179.google.com) (209.85.217.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Nov 2012 17:15:06 +0000 Received: by mail-lb0-f179.google.com with SMTP id c1so3896535lbg.24 for ; Sun, 11 Nov 2012 09:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=tcTfSJ2z7OgPeCIbTWLVp1dPJ/g8dpRIzwKf4z0BXqk=; b=MDBb4U6SOSvX3fMez8u8JvR+gGx7E0FYZp7vAv8UkejN+/nv3+G0flO0h2llnchLzQ +3unUp1aZz9UH4JxHmt/JpUiY/SYpcAs9/0TwEYB3HLUeLz6s2HIfBlg3u5NrVuGCuBR vqu1JgCQtsJcHry3LTdxQtTr7LeM4NWGHG8/ZaDq9S9HmqAh0XcL9r0CGfLpFrytaN4g 2OHy2Di6W2iwjN0xE3smokyHjyKyu9n68uiaetUDsB27hP3miJ/AjFU02Fp+DvTz4fjD Ag2kWfVwOv28RyafYSM1E2piDomFEhuVzW2o6p3y80oCWkRroYXzhq/rWq5Qiy2Eypsr Isiw== MIME-Version: 1.0 Received: by 10.152.106.212 with SMTP id gw20mr16012170lab.8.1352654084873; Sun, 11 Nov 2012 09:14:44 -0800 (PST) Received: by 10.112.127.168 with HTTP; Sun, 11 Nov 2012 09:14:44 -0800 (PST) In-Reply-To: References: <927C66C0775CCA43B88EB1E3006614B3BE66EB69@eu1rdcrdc1wx032.exi.nxp.com> <927C66C0775CCA43B88EB1E3006614B3BE66ECF7@eu1rdcrdc1wx032.exi.nxp.com> Date: Sun, 11 Nov 2012 12:14:44 -0500 Message-ID: Subject: Re: Unable to transform to docbook From: Mansour Al Akeel To: users@cocoon.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Ok Finally issue resolved. It looks like I am able to use docbook. Here's the steps to do so. There's a file cocoon_source/cocoon/cocoon-sax/src/test/resources/META-INF/= services/javax.xml.transform.TransformerFactory This file contains the value: org.apache.xalan.xsltc.trax.TransformerFactor= yImpl If you need to use the default xalan factory, then you need to change it to= . org.apache.xalan.processor.TransformerFactoryImpl Now your unit tests should create Transformer Factory using the new value "org.apache.xalan.processor.TransformerFactoryImpl" If you need to do this in your block, then copy this file to META-INF/services in your block. This is a good an easy way to switch factories. I hope it helps someone else stuck with complex XSLTs like docbook-xsl. Thank you all. On Sun, Nov 11, 2012 at 10:43 AM, Mansour Al Akeel wrote: > After googling for sometime, I found this related issue: > > https://lists.oasis-open.org/archives/docbook-apps/201006/msg00162.html > > The suggested solution was to disable compiling xslt or use saxon: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Well, XSLTC is known to have problems with really complex > transformations like DocBook XSL stylesheets. If you are in Java > environment it is recommended to use Saxon, you can also use Xalan > (normal version, not compiled). > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > AFAIK, C3.0 doesn't have saxon as an option, so I will have to disable > xslt compilation. > Is there a way to do so ?? > > > > > > On Sun, Nov 11, 2012 at 1:28 AM, Mansour Al Akeel > wrote: >> Robby, here's the code I am using for my test case. Nothing fancy, >> just to be able to debug loading the xslt: >> >> >> @Test >> public void docbookTest() throws Exception { >> Cache cache =3D new SimpleCache(); >> >> CachingPipeline pipeline =3D new >> CachingPipeline(); >> pipeline.setCache(cache); >> >> pipeline.addComponent(new XMLGenerator(getClass().getRes= ource( >> "/article.xml"))); >> >> URL xsltURL =3D new >> URL("file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/res= ources/docbook-xsl/html/docbook.xsl"); >> >> XSLTTransformer xslt =3D new XSLTTransformer(xsltURL); >> >> pipeline.addComponent(xslt); >> >> pipeline.addComponent(XMLSerializer.createXMLSerializer(= )); >> >> ByteArrayOutputStream baos =3D new ByteArrayOutputStream= (); >> pipeline.setup(baos); >> pipeline.execute(); >> >> } >> >> >> here's the error I am getting: >> >> >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 939: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1063: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1193: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1193: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1294: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1332: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 283: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 283: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 353: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 353: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/annotations.xsl: >> line 117: Attribute 'onClick' outside of element. >> ERROR: 'Cannot find external method >> 'org.apache.xalan.lib.NodeInfo.systemId' (must be public).' >> FATAL ERROR: 'Could not compile stylesheet' >> javax.xml.transform.TransformerConfigurationException: Could not >> compile stylesheet >> at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplat= es(TransformerFactoryImpl.java:832) >> at org.apache.cocoon.sax.component.XSLTTransformer.loadXSLT(XSLT= Transformer.java:164) >> at org.apache.cocoon.sax.component.XSLTTransformer.(XSLTTr= ansformer.java:112) >> at org.apache.cocoon.sax.component.XSLTTransformer.(XSLTTr= ansformer.java:98) >> at org.apache.cocoon.sax.component.XSLTTransformerTest.docbookTe= st(XSLTTransformerTest.java:86) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces= sorImpl.java:57) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet= hodAccessorImpl.java:43) >> >> >> I downgraded to xalan-2.7.0 in the parent/pom.xml to give it a try, >> but now I am getting this error: >> >> >> 06:18:30.599 [main] DEBUG o.a.cocoon.pipeline.AbstractPipeline - >> Adding component XMLGenerator(hashCode=3D1538386262 >> internalGenerator=3DURLGenerator(hashCode=3D782702191 >> source=3Dfile:/home/mansour/workspace/sources/cocoon/cocoon-sax/target/t= est-classes/article.xml)) >> to pipeline [CachingPipeline(hashCode=3D341284117 components=3D[])]. >> 06:18:31.597 [main] DEBUG o.a.c.sax.component.XSLTTransformer - >> XSLTTransformer local cache miss: >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resource= s/docbook-xsl/html/docbook.xsl >> Compiler warnings: >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/autoidx.xsl: >> line 610: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/autoidx.xsl: >> line 662: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/autoidx.xsl: >> line 662: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/autoidx.xsl: >> line 686: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/autoidx.xsl: >> line 686: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/lists.xsl: >> line 862: Attribute 'type' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/callout.xsl: >> line 116: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/xref.xsl: >> line 188: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/xref.xsl: >> line 1017: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/formal.xsl: >> line 211: Attribute 'id' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/formal.xsl: >> line 435: Attribute 'id' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/htmltbl.xsl: >> line 20: Attribute 'id' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 108: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 108: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 144: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 144: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 184: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 184: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 714: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 939: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1063: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1193: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1193: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1294: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/inline.xsl: >> line 1332: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 283: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 283: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 353: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/glossary.xsl: >> line 353: Attribute 'href' outside of element. >> file:/home/mansour/workspace/sources/cocoon/cocoon-sax/src/test/resour= ces/docbook-xsl/html/annotations.xsl: >> line 117: Attribute 'onClick' outside of element. >> ERROR: 'Syntax error in '* or $generate.index !=3D 0'.' >> FATAL ERROR: 'Could not compile stylesheet' >> javax.xml.transform.TransformerConfigurationException: Could not >> compile stylesheet >> at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplat= es(TransformerFactoryImpl.java:824) >> at org.apache.cocoon.sax.component.XSLTTransformer.loadXSLT(XSLT= Transformer.java:164) >> at org.apache.cocoon.sax.component.XSLTTransformer.(XSLTTr= ansformer.java:112) >> at org.apache.cocoon.sax.component.XSLTTransformer.(XSLTTr= ansformer.java:98) >> at org.apache.cocoon.sax.component.XSLTTransformerTest.docbookTe= st(XSLTTransformerTest.java:86) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> >> >> >> On Thu, Nov 8, 2012 at 9:34 AM, Robby Pelssers = wrote: >>> I did see you created an issue. But if you could provide me a small iso= lated test case in some zip I could have taken a look at it. Still ready to= help out. >>> >>> Robby >>> >>> -----Original Message----- >>> From: Mansour Al Akeel [mailto:mansour.alakeel@gmail.com] >>> Sent: Thursday, November 08, 2012 3:31 PM >>> To: users@cocoon.apache.org >>> Subject: Re: Unable to transform to docbook >>> >>> Robby, >>> I created a small unit test yesterday, and created a patch for the solu= tion. >>> https://issues.apache.org/jira/browse/COCOON3-108 >>> >>> I think a small unit test doesn't show the real issue. I will test it w= ith docbook xsl today. >>> >>> >>> >>> On Thu, Nov 8, 2012 at 4:11 AM, Robby Pelssers = wrote: >>>> Hi Mansour, >>>> >>>> I just wrote a little unit test which has no issues with includes. I = did not commit the test but I suggest you try tackling your issue in small = steps like below and continue from there. >>>> >>>> Robby >>>> >>>> ********************************************************************** >>>> ************************ >>>> package org.apache.cocoon.sax; >>>> >>>> import junit.framework.TestCase; >>>> import org.custommonkey.xmlunit.Diff; >>>> >>>> import java.io.ByteArrayOutputStream; >>>> >>>> import static >>>> org.apache.cocoon.sax.builder.SAXPipelineBuilder.newNonCachingPipeline >>>> ; >>>> >>>> >>>> public class XSLTIncludeTest extends TestCase { >>>> >>>> public void testTransformerWithInclude() throws Exception { >>>> ByteArrayOutputStream baos =3D new ByteArrayOutputStream(); >>>> >>>> newNonCachingPipeline() >>>> .setStringGenerator("appletomato") >>>> .addXSLTTransformer(this.getClass().getResource("/food= .xslt")) >>>> .addSerializer() >>>> .withEmptyConfiguration() >>>> .setup(baos) >>>> .execute(); >>>> >>>> Diff diff =3D new Diff("
  • apple
  • tomat= o
", new String(baos.toByteArray())); >>>> assertTrue("XSL transformation didn't work as expected " + dif= f, diff.identical()); >>>> } >>>> >>>> } >>>> **********************************food.xslt >>>> ********************************************* >>>> >>> xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" version=3D"1.0"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>
    >>>> >>>>
>>>>
>>>> >>>> >>>>
  • >>>>
    >>>> >>>>
    >>>> >>>> ************************************vegetables.xslt******************* >>>> *************************** >>>> >>> version=3D"1.0"> >>>> >>>> >>>>
  • >>>>
    >>>> >>>>
    >>>> >>>> ********************************************************************** >>>> ************************ >>>> >>>> >>>> >>>> -----Original Message----- >>>> From: Robby Pelssers [mailto:Robby.Pelssers@nxp.com] >>>> Sent: Thursday, November 08, 2012 9:31 AM >>>> To: users@cocoon.apache.org >>>> Subject: RE: Unable to transform to docbook >>>> >>>> Hi Mansour, >>>> >>>> To be able to confirm this one would need to setup a small test case w= ith a very simple XSLT importing another one. Which is exactly what I am p= lanning to do. >>>> >>>> Too bad you can't send me a very simplistic project showing the proble= m. >>>> >>>> Robby >>>> >>>> -----Original Message----- >>>> From: Mansour Al Akeel [mailto:mansour.alakeel@gmail.com] >>>> Sent: Thursday, November 08, 2012 2:46 AM >>>> To: users@cocoon.apache.org >>>> Subject: Re: Unable to transform to docbook >>>> >>>> Robby, I think I know where the issue is, but I don't have eclipse set= up. I am just browsing the source through VI. >>>> >>>> I am working with the latest from SVN: >>>> >>>> In the file: >>>> cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransform >>>> er.java >>>> >>>> try { >>>> 160 this.templates =3D >>>> transformerFactory.newTemplates(new >>>> StreamSource(this.source.toExternalForm())); >>>> 161 >>>> 162 // store the XSLT into the cache for future reuse >>>> 163 LOG.debug("{} local cache put: {}", >>>> getClass().getSimpleName(), this.source.toExternalForm()); >>>> 164 >>>> 165 ValidityValue cacheEntry =3D new >>>> ValidityValue(this.templates, lastModified); >>>> 166 XSLT_CACHE.put(this.source.toExternalForm(), cache= Entry); >>>> 167 } catch (TransformerConfigurationException e) { >>>> 168 throw new SetupException("Impossible to read XSLT >>>> from '" + this.source.toExternalForm() >>>> 169 + "', see nested exception", e); >>>> 170 } >>>> >>>> >>>> If I am not wrong, it's building the transformation from a stream, and= a SourceStream has no idea about the location of the loaded XSTL, so the r= esolver can not load the imported or included, xslts. >>>> >>>> The only way I know of, is to set the systemId so something like this = should do the trick: >>>> >>>> StreamSource tmpSource =3D new >>>> StreamSource(this.source.toExternalForm()); >>>> URL fullPath =3D ..... >>>> tmpSource.setSystemId(fullPath); >>>> this.templates =3D transformerFactory.newTemplates(tmpSource); >>>> >>>> >>>> if you have eclipse and your IDE setup, it will be easier to test and = fix. >>>> >>>> >>>> >>>> On Mon, Nov 5, 2012 at 7:23 PM, Mansour Al Akeel wrote: >>>>> Sure I will. I will organize a project that is easy to play with. >>>>> >>>>> I will send it directly to your email (I think the list doesn't allow >>>>> attachment). >>>>> >>>>> >>>>> On Mon, Nov 5, 2012 at 6:21 PM, Robby Pelssers wrote: >>>>>> You know what... >>>>>> >>>>>> It might be a problem with the includes but to be honest I would hav= e expected another exception in that case. Is there any way you can share t= he sources for the project so I can adjust the dev.properties file for my s= ituation and crack the problem? I'm sure I will find out quickly but helpi= ng out by mail is a bit more tedious to be honest. >>>>>> >>>>>> So if you can provide me with a zip file containing the project and = the docbook xslt's zipped and perhaps also that ex.xml file I can debug you= r issue. >>>>>> >>>>>> Robby >>>>>> >>>>>> -----Original Message----- >>>>>> From: Mansour Al Akeel [mailto:mansour.alakeel@gmail.com] >>>>>> Sent: Monday, November 05, 2012 6:59 PM >>>>>> To: users@cocoon.apache.org >>>>>> Subject: Re: Unable to transform to docbook >>>>>> >>>>>> On Mon, Nov 5, 2012 at 7:51 AM, Robby Pelssers 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 a= nd 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 wil= l do: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Also try to generate that xsl: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> But my hunch is that the docbook.xsl has other xsl imports or inclu= des which might be the problem. >>>>>>> >>>>>>> Let me know what happens if you try above matchers and also check i= f the docbookx.xsl has imports/includes or if it has declared xsl parameter= s. >>>>>> >>>>>> >>>>>> I tried both matchers and they seem to be working fine. I can do htt= p://localhost:8888/transform/docbook.xsl and I get the expected output. >>>>>> The docbook.xsl has a lot of : >>>>>> >>>>>> >>>>> xmlns:ng=3D"http://docbook.org/docbook-ng" >>>>>> xmlns:db=3D"http://docbook.org/ns/docbook" >>>>>> xmlns:exsl=3D"http://exslt.org/common" >>>>>> xmlns:exslt=3D"http://exslt.org/common" exclude-result-prefixes=3D"d= b ng >>>>>> exsl exslt" version=3D"1.0"> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> href=3D"../common/l10n.xsl"/> >>>>> href=3D"../common/common.xsl"/> >>>>> href=3D"../common/utility.xsl"/> >>>>> href=3D"../common/labels.xsl"/> >>>>> href=3D"../common/titles.xsl"/> >>>>> href=3D"../common/subtitles.xsl"/> >>>>>> >>>>>> >>>>> href=3D"../common/targets.xsl"/> >>>>> href=3D"../common/olink.xsl"/> >>>>>> >>>>>> >>>>>> .... >>>>>> >>>>>> Thank you for helping in this. >>>>>> >>>>>> >>>>>> >>>>>>> >>>>>>> Kind regards, >>>>>>> Robby Pelssers >>>>>>> >>>>>>> -----Original Message----- >>>>>>> From: Mansour Al Akeel [mailto:mansour.alakeel@gmail.com] >>>>>>> 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 647= 0.727 ms. >>>>>>> ERROR XMLSitemapServlet - Cocoon can't process the request. >>>>>>> org.apache.cocoon.sitemap.InvocationException: >>>>>>> org.apache.cocoon.pipeline.ProcessingException: Can't parse url con= nection file:/home/mansour/workspace/pipelines/repo/articles/ex.xml >>>>>>> at org.apache.cocoon.sitemap.util.ExceptionHandler.getInvoc= ationException(ExceptionHandler.java:39) >>>>>>> at org.apache.cocoon.sitemap.node.PipelineNode.handleExcept= ion(PipelineNode.java:101) >>>>>>> at org.apache.cocoon.sitemap.node.PipelineNode.invoke(Pipel= ineNode.java:71) >>>>>>> at org.apache.cocoon.sitemap.node.AbstractSitemapNode.invok= e(AbstractSitemapNode.java:96) >>>>>>> at org.apache.cocoon.sitemap.node.PipelinesNode.invoke(Pipe= linesNode.java:49) >>>>>>> at org.apache.cocoon.sitemap.node.AbstractSitemapNode.invok= e(AbstractSitemapNode.java:96) >>>>>>> at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.ja= va:42) >>>>>>> at org.apache.cocoon.servlet.RequestProcessor.invoke(Reques= tProcessor.java:233) >>>>>>> at org.apache.cocoon.servlet.RequestProcessor.sendSitemapRe= sponse(RequestProcessor.java:290) >>>>>>> at org.apache.cocoon.servlet.RequestProcessor.service(Reque= stProcessor.java:90) >>>>>>> at org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLS= itemapServlet.java:47) >>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:= 820) >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth= od) >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethod= AccessorImpl.java:57) >>>>>>> at >>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc >>>>>>> e >>>>>>> ss >>>>>>> orImpl.java:43) >>>>>>> >>>>>>> ..... >>>>>>> >>>>>>> Caused by: org.apache.cocoon.pipeline.ProcessingException: Can't pa= rse 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$URLGenerato= r.execute(XMLGenerator.java:385) >>>>>>> at org.apache.cocoon.sax.component.XMLGenerator.execute(XML= Generator.java:104) >>>>>>> at org.apache.cocoon.pipeline.AbstractPipeline.invokeStarte= r(AbstractPipeline.java:146) >>>>>>> at org.apache.cocoon.pipeline.CachingPipeline.execute(Cachi= ngPipeline.java:143) >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth= od) >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethod= AccessorImpl.java:57) >>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati= ngMethodAccessorImpl.java:43) >>>>>>> at java.lang.reflect.Method.invoke(Method.java:601) >>>>>>> at org.springframework.aop.support.AopUtils.invokeJoinpoint= UsingReflection(AopUtils.java:309) >>>>>>> at org.springframework.aop.framework.ReflectiveMethodInvoca= tion.invokeJoinpoint(ReflectiveMethodInvocation.java:183) >>>>>>> at org.springframework.aop.framework.ReflectiveMethodInvoca= tion.proceed(ReflectiveMethodInvocation.java:150) >>>>>>> at org.springframework.aop.aspectj.MethodInvocationProceedi= ngJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) >>>>>>> at org.apache.cocoon.servlet.collector.ResponseHeaderCollec= tor.interceptInvoke(ResponseHeaderCollector.java:94) >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth= od) >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethod= AccessorImpl.java:57) >>>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati= ngMethodAccessorImpl.java:43) >>>>>>> at java.lang.reflect.Method.invoke(Method.java:601) >>>>>>> at org.springframework.aop.aspectj.AbstractAspectJAdvice.in= vokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) >>>>>>> at org.springframework.aop.aspectj.AbstractAspectJAdvice.in= vokeAdviceMethod(AbstractAspectJAdvice.java:610) >>>>>>> at org.springframework.aop.aspectj.AspectJAroundAdvice.invo= ke(AspectJAroundAdvice.java:65) >>>>>>> at org.springframework.aop.framework.ReflectiveMethodInvoca= tion.proceed(ReflectiveMethodInvocation.java:172) >>>>>>> at org.springframework.aop.interceptor.ExposeInvocationInte= rceptor.invoke(ExposeInvocationInterceptor.java:89) >>>>>>> at org.springframework.aop.framework.ReflectiveMethodInvoca= tion.proceed(ReflectiveMethodInvocation.java:172) >>>>>>> at org.springframework.aop.framework.JdkDynamicAopProxy.inv= oke(JdkDynamicAopProxy.java:202) >>>>>>> at $Proxy27.execute(Unknown Source) >>>>>>> at org.apache.cocoon.sitemap.InvocationImpl.execute(Invocat= ionImpl.java:141) >>>>>>> at org.apache.cocoon.sitemap.node.PipelineNode.invoke(Pipel= ineNode.java:66) >>>>>>> ... 60 more >>>>>>> Caused by: org.xml.sax.SAXException: java.lang.NullPointerException >>>>>>> javax.xml.transform.TransformerException: java.lang.NullPointerExce= ption >>>>>>> at com.sun.org.apache.xalan.internal.xsltc.trax.Transformer= HandlerImpl.endDocument(TransformerHandlerImpl.java:245) >>>>>>> at org.apache.cocoon.xml.sax.AbstractSAXPipe.endDocument(Ab= stractSAXPipe.java:58) >>>>>>> at org.apache.cocoon.sax.AbstractSAXTransformer.endDocument= (AbstractSAXTransformer.java:47) >>>>>>> at >>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDoc >>>>>>> u >>>>>>> me >>>>>>> nt(AbstractSAXParser.java:742) >>>>>>> >>>>>>> ...... >>>>>>> >>>>>>> Here's my pipeline: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> src=3D"/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml= " /> >>>>>>> >>>>>> src=3D"/home/mansour/workspace/pipelines/docbook-xsl-snapshot/html/= docbook.xsl" >>>>>>> /> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> This matcher is working with another transformation. >>>>>>> For example the following pipeline: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> src=3D"/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml= " /> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> 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: users-unsubscribe@cocoon.apache.org >>>>>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------- >>>>>>> - >>>>>>> - To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>>>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>>>>> >>>>>> >>>>>> -------------------------------------------------------------------- >>>>>> - To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>>>> >>>>>> >>>>>> -------------------------------------------------------------------- >>>>>> - To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>> >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>> >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>>> For additional commands, e-mail: users-help@cocoon.apache.org >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>> For additional commands, e-mail: users-help@cocoon.apache.org >>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>> For additional commands, e-mail: users-help@cocoon.apache.org >>> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org