cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whatnext <tom_gra...@yahoo.co.uk>
Subject Re: beginner q: possible to set extension .xsl as type='xslt' by default?
Date Tue, 16 Oct 2012 15:17:05 GMT

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


Mime
View raw message