You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by whatnext <to...@yahoo.co.uk> on 2012/10/16 15:55:12 UTC

beginner q: possible to set extension .xsl as type='xslt' by default?

Dear learned cocoon users,

Very sorry for the ignorance of this question. Our company has recently
decided it might be time to move away from AxKit (!) and we are looking at
the alternatives. Cocoon is an obvious choice. However, I know absolutely
nothing about it other than a broad idea of what it does.

I have been trying to get Cocoon to serve some of our pages to see whats
involved.

I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
and sure enough could display the welcome page.

Next up I tried to display one of our web pages by copying over an .xml and
related .xsl stylesheets and modifying the sitemap.xmap file.

So then it falls over saying:

Unable to get transformer handler for file:///path/example.xsl ...

If I go into sitemap.xmap and add type="xslt" to the <map:transform src =
'...'> line then this error seems resolved but then it falls over with

Unable to get transformer handler for file:///path/another.xsl

where another.xsl is referred to by example.xsl. What can be done in this
case? Is there a way of telling cocoon that it needs to use the xslt
transformer anywhere it sees .xsl... ? Or am i approaching this in all the
wrong way etc.?

Many apologies for the elementary nature of this question - I freely admit I
have no idea what I am doing!

Any help appreciated...







-- 
View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by warrell harries <wa...@gmail.com>.
meant 'chaining' :)

On 16 October 2012 15:12, warrell harries <wa...@gmail.com> wrote:

> Hi,
>
> Depending on your sitemap components set-up (see the top of the file
> e.g. <map:transformers default="xslt">)
> the default Transformer should be the XSLT one.
>
> Try omitting the type altogether.
>
> Remember that the Pipeline is key so don't try 'chaing' xslt from within
> your .XSLT file.
>
> Attaching the files to your question would help.
>
> Regards
>
> Warrell
>
>
> On 16 October 2012 14:55, whatnext <to...@yahoo.co.uk> wrote:
>
>>
>> Dear learned cocoon users,
>>
>> Very sorry for the ignorance of this question. Our company has recently
>> decided it might be time to move away from AxKit (!) and we are looking at
>> the alternatives. Cocoon is an obvious choice. However, I know absolutely
>> nothing about it other than a broad idea of what it does.
>>
>> I have been trying to get Cocoon to serve some of our pages to see whats
>> involved.
>>
>> I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
>> and sure enough could display the welcome page.
>>
>> Next up I tried to display one of our web pages by copying over an .xml
>> and
>> related .xsl stylesheets and modifying the sitemap.xmap file.
>>
>> So then it falls over saying:
>>
>> Unable to get transformer handler for file:///path/example.xsl ...
>>
>> If I go into sitemap.xmap and add type="xslt" to the <map:transform src =
>> '...'> line then this error seems resolved but then it falls over with
>>
>> Unable to get transformer handler for file:///path/another.xsl
>>
>> where another.xsl is referred to by example.xsl. What can be done in this
>> case? Is there a way of telling cocoon that it needs to use the xslt
>> transformer anywhere it sees .xsl... ? Or am i approaching this in all the
>> wrong way etc.?
>>
>> Many apologies for the elementary nature of this question - I freely
>> admit I
>> have no idea what I am doing!
>>
>> Any help appreciated...
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>

Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by warrell harries <wa...@gmail.com>.
Hi,

Depending on your sitemap components set-up (see the top of the file
e.g. <map:transformers default="xslt">)
the default Transformer should be the XSLT one.

Try omitting the type altogether.

Remember that the Pipeline is key so don't try 'chaing' xslt from within
your .XSLT file.

Attaching the files to your question would help.

Regards

Warrell


On 16 October 2012 14:55, whatnext <to...@yahoo.co.uk> wrote:

>
> Dear learned cocoon users,
>
> Very sorry for the ignorance of this question. Our company has recently
> decided it might be time to move away from AxKit (!) and we are looking at
> the alternatives. Cocoon is an obvious choice. However, I know absolutely
> nothing about it other than a broad idea of what it does.
>
> I have been trying to get Cocoon to serve some of our pages to see whats
> involved.
>
> I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
> and sure enough could display the welcome page.
>
> Next up I tried to display one of our web pages by copying over an .xml and
> related .xsl stylesheets and modifying the sitemap.xmap file.
>
> So then it falls over saying:
>
> Unable to get transformer handler for file:///path/example.xsl ...
>
> If I go into sitemap.xmap and add type="xslt" to the <map:transform src =
> '...'> line then this error seems resolved but then it falls over with
>
> Unable to get transformer handler for file:///path/another.xsl
>
> where another.xsl is referred to by example.xsl. What can be done in this
> case? Is there a way of telling cocoon that it needs to use the xslt
> transformer anywhere it sees .xsl... ? Or am i approaching this in all the
> wrong way etc.?
>
> Many apologies for the elementary nature of this question - I freely admit
> I
> have no idea what I am doing!
>
> Any help appreciated...
>
>
>
>
>
>
>
> --
> View this message in context:
> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

RE: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by Robby Pelssers <Ro...@nxp.com>.
This is however not a C2.2. specific issue.

Let me explain how C2.2 works.

Assume you have the following structure
COB-INF
                -data
                                - input.xml
                -xslt
                                -transform1.xsl
                                -transform2.xsl

In your sitemap you can now do
      <map:match pattern="test">
        <map:generate src="data/input.xml"/>
        <map:transform src="xslt/transform1.xsl"/>
       < !—
         you can add another transformer here or you can include it in transform1.xsl  by using a relative path to current xslt   <xsl:include href="transform2.xsl"/>
        <map:transform src="xslt/transform2.xsl"/>
       -->
        <map:serialize type="xml"/>
      </map:match>

Hope this gets you started,
Robby

From: Jos Snellings [mailto:jos.snellings@upperware.biz]
Sent: Tuesday, October 16, 2012 4:10 PM
To: users@cocoon.apache.org
Subject: Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Dear Tom,

Can you send your sitemap.xmap over?
For cocoon, the default transformation is an xslt.

If you are just starting with a migration, you may want to consider using cocoon 3, which is at the moment in beta,
but soon the production version will be ready (@others: isn't it ? :-)

Kind regards,
Jos

On Tue, Oct 16, 2012 at 3:55 PM, whatnext <to...@yahoo.co.uk>> wrote:

Dear learned cocoon users,

Very sorry for the ignorance of this question. Our company has recently
decided it might be time to move away from AxKit (!) and we are looking at
the alternatives. Cocoon is an obvious choice. However, I know absolutely
nothing about it other than a broad idea of what it does.

I have been trying to get Cocoon to serve some of our pages to see whats
involved.

I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
and sure enough could display the welcome page.

Next up I tried to display one of our web pages by copying over an .xml and
related .xsl stylesheets and modifying the sitemap.xmap file.

So then it falls over saying:

Unable to get transformer handler for file:///path/example.xsl<file:///\\path\example.xsl> ...

If I go into sitemap.xmap and add type="xslt" to the <map:transform src =
'...'> line then this error seems resolved but then it falls over with

Unable to get transformer handler for file:///path/another.xsl<file:///\\path\another.xsl>

where another.xsl is referred to by example.xsl. What can be done in this
case? Is there a way of telling cocoon that it needs to use the xslt
transformer anywhere it sees .xsl... ? Or am i approaching this in all the
wrong way etc.?

Many apologies for the elementary nature of this question - I freely admit I
have no idea what I am doing!

Any help appreciated...







--
View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



--
All generous minds have a horror of what are commonly called "Facts". They are the brute beasts of the intellectual domain.
-- Thomas Hobbes

RE: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by Robby Pelssers <Ro...@nxp.com>.
Just for your reference.

Are you using XSLT2.0?  If so you will need to configure Saxon as processor.  Default Xalan is used.

http://robbypelssers.blogspot.nl/2010/08/using-saxon-instead-of-xalan-with.html

And the best way to get started is indeed using a very simple setup. It will also help us in debugging your problems.  So try first using a very basic input file, and perhaps 1 or 2 chained transformers, or 1 transformer including another xslt.  If that fails, I'm more than willing to assist.

Robby

-----Original Message-----
From: whatnext [mailto:tom_gracey@yahoo.co.uk] 
Sent: Tuesday, October 16, 2012 6:16 PM
To: users@cocoon.apache.org
Subject: Re: beginner q: possible to set extension .xsl as type='xslt' by default?


I just tested a simple .xsl that calls another .xsl and it worked without that error. Many apologies for the confusion - the error message is obviously a red herring.

Our xsl's are quite substantial and now i guess it must be something else that is causing it to think its not an .xsl . Perhaps if there was something 'non-standard' in the .xsl  (given that we are coming from axkit) it would give the error:

Unable to get transformer handler for file:///.... ?

--
View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34564228.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by whatnext <to...@yahoo.co.uk>.
I just tested a simple .xsl that calls another .xsl and it worked without
that error. Many apologies for the confusion - the error message is
obviously a red herring.

Our xsl's are quite substantial and now i guess it must be something else
that is causing it to think its not an .xsl . Perhaps if there was something
'non-standard' in the .xsl  (given that we are coming from axkit) it would
give the error:

Unable to get transformer handler for file:///.... ?

-- 
View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34564228.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by whatnext <to...@yahoo.co.uk>.
yes - i'm sure because it complained some were missing - then I copied them
over and that particular error disappeared.


warrell harries-4 wrote:
> 
> Are those included xsl files where they are supposed to be?
> 
> On 16 October 2012 15:42, whatnext <to...@yahoo.co.uk> wrote:
> 
>>
>> Hi Jos:
>>
>> Thanks for your help. I didn't really change the sitemap.xmap that was
>> generated from the instructions mentioned, but here it is:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>>   Licensed to the Apache Software Foundation (ASF) under one or more
>>   contributor license agreements.  See the NOTICE file distributed with
>>   this work for additional information regarding copyright ownership.
>>   The ASF licenses this file to You under the Apache License, Version 2.0
>>   (the "License"); you may not use this file except in compliance with
>>   the License.  You may obtain a copy of the License at
>>
>>       http://www.apache.org/licenses/LICENSE-2.0
>>
>>   Unless required by applicable law or agreed to in writing, software
>>   distributed under the License is distributed on an "AS IS" BASIS,
>>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>>   See the License for the specific language governing permissions and
>>   limitations under the License.
>> -->
>> <map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>  xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0
>> http://cocoon.apache.org/schema/sitemap/cocoon-si$
>>  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>>
>>   <!--+
>>       | Definition of the control flow implementation.
>>       +-->
>>   <map:flow language="javascript"/>
>>
>>   <map:pipelines>
>>     <!--+
>>         | Demo pipelines
>>         +-->
>>     <map:pipeline id="demo">
>>       <!-- Simple demo, that show how Cocoon pipelines. -->
>>       <map:match pattern="">
>>         <!--+
>>             | Start generating SAX events inside the pipeline. In this
>> case,
>>             | since no "type" attribute is specified, the default
>> generator
>>             | is used and this is a regular XML parser that reads the
>>             | given file from the URL included in the "src" attribute and
>>             | sends the events produced by the parser down the pipeline
>> to
>>             | be processed by the next stage.
>>             +-->
>>         <map:generate src="vbtn-test/index.xml" />
>>         <!--+
>>             | This transformer gets the input SAX events and transforms
>> them
>>             | using the default transformer (the XSLT transformer) thus
>>             | applying the XSLT stylesheet indicated in the "src"
>> attribute
>>             | and sending the output down the pipeline to be processed by
>> the
>>             | next stage.
>>             +-->
>>         <map:transform src="vbtn-test/standard.xsl" type="xslt" />
>>         <!--+
>>             | The serializer concludes the SAX events journey into the
>> pipeline
>>             | since it serializes the events it receives into a
>> representation
>>             | depending on the serializer type. Here we choose the
>> "XHMTL"
>>             | serializer, which will produce an XHTML representation of
>> the
>>             | SAX stream.
>>             +-->
>>        <map:serialize type="xhtml"/>
>>       </map:match>
>>       <!-- Implement application logic using a Flowscript function.
>>         Flowscripts in ./flow are loaded automatically in alphabetical
>> order. -->
>>       <map:match pattern="spring-bean">
>>         <map:call function="demo"/>
>>       </map:match>
>>     </map:pipeline>
>>     <map:pipeline id="demo-internal" internal-only="true">
>>       <!-- This pipeline is invoked by the above flowscript. -->
>>       <map:match pattern="screens/spring-bean">
>>         <map:generate src="demo/spring-bean.jx.xml" type="jx"/>
>>         <map:serialize type="xml"/>
>>       </map:match>
>>     </map:pipeline>
>>
>>     <!--+
>>         | Default pipelines
>>         +-->
>>     <map:pipeline id="internal-resource" internal-only="true">
>>       <!-- Put matchers for internal (accessible only to Cocoon blocks)
>> resources here
>>         More details:
>> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>>       <map:match pattern="resource/internal/**">
>>         <map:read src="resource/internal/{1}"/>
>>       </map:match>
>>     </map:pipeline>
>>
>>     <map:pipeline id="external-resource">
>>       <!-- Put matchers for external (accessible to the outside world,
>> e.g.
>> browser) resources here.
>>         More details:
>> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>>       <map:match pattern="resource/external/**">
>>         <map:read src="resource/external/{1}"/>
>>       </map:match>
>>     </map:pipeline>
>>
>>     <map:pipeline id="service">
>>       <!-- Put your servlet service matchers here.
>>         More details:
>> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>>     </map:pipeline>
>>   </map:pipelines>
>>
>> </map:sitemap>
>>
>>
>>
>> Warrell: I don't think there was a <map:transformers default="xslt"> at
>> all.
>> I tried adding one but it doesn't seem to make a difference.
>>
>> Our .xsl files have e.g.
>>
>>         <xsl:include href="../sidebars/sidebarBuilder.xsl"/>
>>         <xsl:include href="../functions/display_fns.xsl"/>
>>         <xsl:include href="../functions/display_fns_new.xsl"/>
>>         <xsl:include href="mobile.xsl"/>
>>
>> Is this what you mean by chaining? I would imagine you mean don't
>> transform
>> the transform which I think is not the same thing?
>>
>> Tom
>>
>>
>>
>> Jos Snellings-2 wrote:
>> >
>> > Dear Tom,
>> >
>> > Can you send your sitemap.xmap over?
>> > For cocoon, the default transformation is an xslt.
>> >
>> > If you are just starting with a migration, you may want to consider
>> using
>> > cocoon 3, which is at the moment in beta,
>> > but soon the production version will be ready (@others: isn't it ? :-)
>> >
>> > Kind regards,
>> > Jos
>> >
>> >
>> > On Tue, Oct 16, 2012 at 3:55 PM, whatnext <to...@yahoo.co.uk>
>> wrote:
>> >
>> >>
>> >> Dear learned cocoon users,
>> >>
>> >> Very sorry for the ignorance of this question. Our company has
>> recently
>> >> decided it might be time to move away from AxKit (!) and we are
>> looking
>> >> at
>> >> the alternatives. Cocoon is an obvious choice. However, I know
>> absolutely
>> >> nothing about it other than a broad idea of what it does.
>> >>
>> >> I have been trying to get Cocoon to serve some of our pages to see
>> whats
>> >> involved.
>> >>
>> >> I followed the instructions at
>> http://cocoon.apache.org/2.2/1159_1_1.html
>> >> and sure enough could display the welcome page.
>> >>
>> >> Next up I tried to display one of our web pages by copying over an
>> .xml
>> >> and
>> >> related .xsl stylesheets and modifying the sitemap.xmap file.
>> >>
>> >> So then it falls over saying:
>> >>
>> >> Unable to get transformer handler for file:///path/example.xsl ...
>> >>
>> >> If I go into sitemap.xmap and add type="xslt" to the <map:transform
>> src
>> =
>> >> '...'> line then this error seems resolved but then it falls over with
>> >>
>> >> Unable to get transformer handler for file:///path/another.xsl
>> >>
>> >> where another.xsl is referred to by example.xsl. What can be done in
>> this
>> >> case? Is there a way of telling cocoon that it needs to use the xslt
>> >> transformer anywhere it sees .xsl... ? Or am i approaching this in all
>> >> the
>> >> wrong way etc.?
>> >>
>> >> Many apologies for the elementary nature of this question - I freely
>> >> admit
>> >> I
>> >> have no idea what I am doing!
>> >>
>> >> Any help appreciated...
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
>> >> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> >> For additional commands, e-mail: users-help@cocoon.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > All generous minds have a horror of what are commonly called "Facts".
>> They
>> > are the brute beasts of the intellectual domain.
>> > -- Thomas Hobbes
>> >  <http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563738.html
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563950.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by warrell harries <wa...@gmail.com>.
Are those included xsl files where they are supposed to be?

On 16 October 2012 15:42, whatnext <to...@yahoo.co.uk> wrote:

>
> Hi Jos:
>
> Thanks for your help. I didn't really change the sitemap.xmap that was
> generated from the instructions mentioned, but here it is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>   Licensed to the Apache Software Foundation (ASF) under one or more
>   contributor license agreements.  See the NOTICE file distributed with
>   this work for additional information regarding copyright ownership.
>   The ASF licenses this file to You under the Apache License, Version 2.0
>   (the "License"); you may not use this file except in compliance with
>   the License.  You may obtain a copy of the License at
>
>       http://www.apache.org/licenses/LICENSE-2.0
>
>   Unless required by applicable law or agreed to in writing, software
>   distributed under the License is distributed on an "AS IS" BASIS,
>   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>   See the License for the specific language governing permissions and
>   limitations under the License.
> -->
> <map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0
> http://cocoon.apache.org/schema/sitemap/cocoon-si$
>  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>
>   <!--+
>       | Definition of the control flow implementation.
>       +-->
>   <map:flow language="javascript"/>
>
>   <map:pipelines>
>     <!--+
>         | Demo pipelines
>         +-->
>     <map:pipeline id="demo">
>       <!-- Simple demo, that show how Cocoon pipelines. -->
>       <map:match pattern="">
>         <!--+
>             | Start generating SAX events inside the pipeline. In this
> case,
>             | since no "type" attribute is specified, the default generator
>             | is used and this is a regular XML parser that reads the
>             | given file from the URL included in the "src" attribute and
>             | sends the events produced by the parser down the pipeline to
>             | be processed by the next stage.
>             +-->
>         <map:generate src="vbtn-test/index.xml" />
>         <!--+
>             | This transformer gets the input SAX events and transforms
> them
>             | using the default transformer (the XSLT transformer) thus
>             | applying the XSLT stylesheet indicated in the "src" attribute
>             | and sending the output down the pipeline to be processed by
> the
>             | next stage.
>             +-->
>         <map:transform src="vbtn-test/standard.xsl" type="xslt" />
>         <!--+
>             | The serializer concludes the SAX events journey into the
> pipeline
>             | since it serializes the events it receives into a
> representation
>             | depending on the serializer type. Here we choose the "XHMTL"
>             | serializer, which will produce an XHTML representation of the
>             | SAX stream.
>             +-->
>        <map:serialize type="xhtml"/>
>       </map:match>
>       <!-- Implement application logic using a Flowscript function.
>         Flowscripts in ./flow are loaded automatically in alphabetical
> order. -->
>       <map:match pattern="spring-bean">
>         <map:call function="demo"/>
>       </map:match>
>     </map:pipeline>
>     <map:pipeline id="demo-internal" internal-only="true">
>       <!-- This pipeline is invoked by the above flowscript. -->
>       <map:match pattern="screens/spring-bean">
>         <map:generate src="demo/spring-bean.jx.xml" type="jx"/>
>         <map:serialize type="xml"/>
>       </map:match>
>     </map:pipeline>
>
>     <!--+
>         | Default pipelines
>         +-->
>     <map:pipeline id="internal-resource" internal-only="true">
>       <!-- Put matchers for internal (accessible only to Cocoon blocks)
> resources here
>         More details:
> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>       <map:match pattern="resource/internal/**">
>         <map:read src="resource/internal/{1}"/>
>       </map:match>
>     </map:pipeline>
>
>     <map:pipeline id="external-resource">
>       <!-- Put matchers for external (accessible to the outside world, e.g.
> browser) resources here.
>         More details:
> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>       <map:match pattern="resource/external/**">
>         <map:read src="resource/external/{1}"/>
>       </map:match>
>     </map:pipeline>
>
>     <map:pipeline id="service">
>       <!-- Put your servlet service matchers here.
>         More details:
> http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
>     </map:pipeline>
>   </map:pipelines>
>
> </map:sitemap>
>
>
>
> Warrell: I don't think there was a <map:transformers default="xslt"> at
> all.
> I tried adding one but it doesn't seem to make a difference.
>
> Our .xsl files have e.g.
>
>         <xsl:include href="../sidebars/sidebarBuilder.xsl"/>
>         <xsl:include href="../functions/display_fns.xsl"/>
>         <xsl:include href="../functions/display_fns_new.xsl"/>
>         <xsl:include href="mobile.xsl"/>
>
> Is this what you mean by chaining? I would imagine you mean don't transform
> the transform which I think is not the same thing?
>
> Tom
>
>
>
> Jos Snellings-2 wrote:
> >
> > Dear Tom,
> >
> > Can you send your sitemap.xmap over?
> > For cocoon, the default transformation is an xslt.
> >
> > If you are just starting with a migration, you may want to consider using
> > cocoon 3, which is at the moment in beta,
> > but soon the production version will be ready (@others: isn't it ? :-)
> >
> > Kind regards,
> > Jos
> >
> >
> > On Tue, Oct 16, 2012 at 3:55 PM, whatnext <to...@yahoo.co.uk>
> wrote:
> >
> >>
> >> Dear learned cocoon users,
> >>
> >> Very sorry for the ignorance of this question. Our company has recently
> >> decided it might be time to move away from AxKit (!) and we are looking
> >> at
> >> the alternatives. Cocoon is an obvious choice. However, I know
> absolutely
> >> nothing about it other than a broad idea of what it does.
> >>
> >> I have been trying to get Cocoon to serve some of our pages to see whats
> >> involved.
> >>
> >> I followed the instructions at
> http://cocoon.apache.org/2.2/1159_1_1.html
> >> and sure enough could display the welcome page.
> >>
> >> Next up I tried to display one of our web pages by copying over an .xml
> >> and
> >> related .xsl stylesheets and modifying the sitemap.xmap file.
> >>
> >> So then it falls over saying:
> >>
> >> Unable to get transformer handler for file:///path/example.xsl ...
> >>
> >> If I go into sitemap.xmap and add type="xslt" to the <map:transform src
> =
> >> '...'> line then this error seems resolved but then it falls over with
> >>
> >> Unable to get transformer handler for file:///path/another.xsl
> >>
> >> where another.xsl is referred to by example.xsl. What can be done in
> this
> >> case? Is there a way of telling cocoon that it needs to use the xslt
> >> transformer anywhere it sees .xsl... ? Or am i approaching this in all
> >> the
> >> wrong way etc.?
> >>
> >> Many apologies for the elementary nature of this question - I freely
> >> admit
> >> I
> >> have no idea what I am doing!
> >>
> >> Any help appreciated...
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
> >> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> For additional commands, e-mail: users-help@cocoon.apache.org
> >>
> >>
> >
> >
> > --
> > All generous minds have a horror of what are commonly called "Facts".
> They
> > are the brute beasts of the intellectual domain.
> > -- Thomas Hobbes
> >  <http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563738.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by whatnext <to...@yahoo.co.uk>.
Hi Jos:

Thanks for your help. I didn't really change the sitemap.xmap that was
generated from the instructions mentioned, but here it is:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0
http://cocoon.apache.org/schema/sitemap/cocoon-si$
 xmlns:map="http://apache.org/cocoon/sitemap/1.0">

  <!--+
      | Definition of the control flow implementation.
      +-->
  <map:flow language="javascript"/>

  <map:pipelines>
    <!--+
        | Demo pipelines
        +-->
    <map:pipeline id="demo">
      <!-- Simple demo, that show how Cocoon pipelines. -->
      <map:match pattern="">
        <!--+
            | Start generating SAX events inside the pipeline. In this case,
            | since no "type" attribute is specified, the default generator
            | is used and this is a regular XML parser that reads the
            | given file from the URL included in the "src" attribute and
            | sends the events produced by the parser down the pipeline to
            | be processed by the next stage.
            +-->
        <map:generate src="vbtn-test/index.xml" />
        <!--+
            | This transformer gets the input SAX events and transforms them
            | using the default transformer (the XSLT transformer) thus
            | applying the XSLT stylesheet indicated in the "src" attribute
            | and sending the output down the pipeline to be processed by
the
            | next stage.
            +-->
        <map:transform src="vbtn-test/standard.xsl" type="xslt" />
        <!--+
            | The serializer concludes the SAX events journey into the
pipeline
            | since it serializes the events it receives into a
representation
            | depending on the serializer type. Here we choose the "XHMTL"
            | serializer, which will produce an XHTML representation of the
            | SAX stream.
            +-->
       <map:serialize type="xhtml"/>
      </map:match>
      <!-- Implement application logic using a Flowscript function.
        Flowscripts in ./flow are loaded automatically in alphabetical
order. -->
      <map:match pattern="spring-bean">
        <map:call function="demo"/>
      </map:match>
    </map:pipeline>
    <map:pipeline id="demo-internal" internal-only="true">
      <!-- This pipeline is invoked by the above flowscript. -->
      <map:match pattern="screens/spring-bean">
        <map:generate src="demo/spring-bean.jx.xml" type="jx"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>

    <!--+
        | Default pipelines
        +-->
    <map:pipeline id="internal-resource" internal-only="true">
      <!-- Put matchers for internal (accessible only to Cocoon blocks)
resources here
        More details:
http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
      <map:match pattern="resource/internal/**">
        <map:read src="resource/internal/{1}"/>
      </map:match>
    </map:pipeline>

    <map:pipeline id="external-resource">
      <!-- Put matchers for external (accessible to the outside world, e.g.
browser) resources here.
        More details:
http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
      <map:match pattern="resource/external/**">
        <map:read src="resource/external/{1}"/>
      </map:match>
    </map:pipeline>

    <map:pipeline id="service">
      <!-- Put your servlet service matchers here.
        More details:
http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html -->
    </map:pipeline>
  </map:pipelines>

</map:sitemap>



Warrell: I don't think there was a <map:transformers default="xslt"> at all.
I tried adding one but it doesn't seem to make a difference.

Our .xsl files have e.g.

        <xsl:include href="../sidebars/sidebarBuilder.xsl"/>
        <xsl:include href="../functions/display_fns.xsl"/>
        <xsl:include href="../functions/display_fns_new.xsl"/>
        <xsl:include href="mobile.xsl"/>

Is this what you mean by chaining? I would imagine you mean don't transform
the transform which I think is not the same thing?

Tom



Jos Snellings-2 wrote:
> 
> Dear Tom,
> 
> Can you send your sitemap.xmap over?
> For cocoon, the default transformation is an xslt.
> 
> If you are just starting with a migration, you may want to consider using
> cocoon 3, which is at the moment in beta,
> but soon the production version will be ready (@others: isn't it ? :-)
> 
> Kind regards,
> Jos
> 
> 
> On Tue, Oct 16, 2012 at 3:55 PM, whatnext <to...@yahoo.co.uk> wrote:
> 
>>
>> Dear learned cocoon users,
>>
>> Very sorry for the ignorance of this question. Our company has recently
>> decided it might be time to move away from AxKit (!) and we are looking
>> at
>> the alternatives. Cocoon is an obvious choice. However, I know absolutely
>> nothing about it other than a broad idea of what it does.
>>
>> I have been trying to get Cocoon to serve some of our pages to see whats
>> involved.
>>
>> I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
>> and sure enough could display the welcome page.
>>
>> Next up I tried to display one of our web pages by copying over an .xml
>> and
>> related .xsl stylesheets and modifying the sitemap.xmap file.
>>
>> So then it falls over saying:
>>
>> Unable to get transformer handler for file:///path/example.xsl ...
>>
>> If I go into sitemap.xmap and add type="xslt" to the <map:transform src =
>> '...'> line then this error seems resolved but then it falls over with
>>
>> Unable to get transformer handler for file:///path/another.xsl
>>
>> where another.xsl is referred to by example.xsl. What can be done in this
>> case? Is there a way of telling cocoon that it needs to use the xslt
>> transformer anywhere it sees .xsl... ? Or am i approaching this in all
>> the
>> wrong way etc.?
>>
>> Many apologies for the elementary nature of this question - I freely
>> admit
>> I
>> have no idea what I am doing!
>>
>> Any help appreciated...
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
> 
> 
> -- 
> All generous minds have a horror of what are commonly called "Facts". They
> are the brute beasts of the intellectual domain.
> -- Thomas Hobbes
>  <http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html>
> 
> 

-- 
View this message in context: http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563738.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: beginner q: possible to set extension .xsl as type='xslt' by default?

Posted by Jos Snellings <jo...@upperware.biz>.
Dear Tom,

Can you send your sitemap.xmap over?
For cocoon, the default transformation is an xslt.

If you are just starting with a migration, you may want to consider using
cocoon 3, which is at the moment in beta,
but soon the production version will be ready (@others: isn't it ? :-)

Kind regards,
Jos


On Tue, Oct 16, 2012 at 3:55 PM, whatnext <to...@yahoo.co.uk> wrote:

>
> Dear learned cocoon users,
>
> Very sorry for the ignorance of this question. Our company has recently
> decided it might be time to move away from AxKit (!) and we are looking at
> the alternatives. Cocoon is an obvious choice. However, I know absolutely
> nothing about it other than a broad idea of what it does.
>
> I have been trying to get Cocoon to serve some of our pages to see whats
> involved.
>
> I followed the instructions at http://cocoon.apache.org/2.2/1159_1_1.html
> and sure enough could display the welcome page.
>
> Next up I tried to display one of our web pages by copying over an .xml and
> related .xsl stylesheets and modifying the sitemap.xmap file.
>
> So then it falls over saying:
>
> Unable to get transformer handler for file:///path/example.xsl ...
>
> If I go into sitemap.xmap and add type="xslt" to the <map:transform src =
> '...'> line then this error seems resolved but then it falls over with
>
> Unable to get transformer handler for file:///path/another.xsl
>
> where another.xsl is referred to by example.xsl. What can be done in this
> case? Is there a way of telling cocoon that it needs to use the xslt
> transformer anywhere it sees .xsl... ? Or am i approaching this in all the
> wrong way etc.?
>
> Many apologies for the elementary nature of this question - I freely admit
> I
> have no idea what I am doing!
>
> Any help appreciated...
>
>
>
>
>
>
>
> --
> View this message in context:
> http://old.nabble.com/beginner-q%3A-possible-to-set-extension-.xsl-as-type%3D%27xslt%27-by-default--tp34563508p34563508.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 
All generous minds have a horror of what are commonly called "Facts". They
are the brute beasts of the intellectual domain.
-- Thomas Hobbes
 <http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html>