Re: XSLT is Dead ?!

2009-04-29 Thread Bart Remmerie
Yes it is.
Just add the saxon-transformer to your sitemap, add the necessary
lines in cocoon.xconf and make sure you are using the correct
transformer in your pipelines  have installed the appropriate jar in
you lib-folder.

It also works to do a quick google on the subject (apache cocoon saxon):
http://wiki.apache.org/cocoon/Saxon

I'm using 2.1.11, saxon7 and this is how I implemented it

sitemap.xmap

map:transformer logger=sitemap.transformer.xsltal name=xsltal
pool-max=8 src=org.apache.cocoon.transformation.TraxTransformer
   
default-srcresource://org/apache/cocoon/blocks/xsltal/resources/tal2xslt.xsl/default-src
   use-request-parametersfalse/use-request-parameters
   use-session-parametersfalse/use-session-parameters
   use-cookie-parametersfalse/use-cookie-parameters
   xslt-processor-rolesaxon/xslt-processor-role
   check-includestrue/check-includes
   
transformer-factorynet.sf.saxon.TransformerFactoryImpl/transformer-factory
/map:transformer

cocoon.xconf

  component logger=core.xslt
 role=org.apache.excalibur.xml.xslt.XSLTProcessor/saxon
 class=org.apache.cocoon.components.xslt.TraxProcessor
 parameter name=use-store value=true/
 parameter name=transformer-factory
value=net.sf.saxon.TransformerFactoryImpl/
  /component


On Tue, Apr 28, 2009 at 6:06 PM, Stan Dyck stan.d...@gmail.com wrote:

 It is possible to make cocoon use Saxon, which implements xslt 2.0, as it's 
 underlying xslt processor.

 StanD.

 Derek Hohls wrote:

 Ken

 I would echo most of your sentiments, except for the XSP part.
 I have found that the flowscript/JXT gives me all the logic/layout
 options I need ... without having to worry about any Java at all in
 my apps.  I think that is why the developers decided to deprecate
 XSP quite a while back, though I appreciate that not everybody might think 
 that's such a good idea!

 How do you use XSLT(2)?  I did not think Xalan supported it yet? eg
 http://xml.apache.org/xalan-j/
 http://www.nabble.com/Xalan-J-XSLT-2.0-status-tc5766761r4.html
 http://www.velocityreviews.com/forums/t364511-xslt-2-processors.html

 Derek

 On 2009/04/25 at 10:32, in message 
 49f2ca9d.2090...@lampsacos.demon.co.uk, Ken Starks 
 k...@lampsacos.demon.co.uk wrote:

 Antonio Gallardo wrote:

 hi Derek,

 Comparing XSLT with JSP is like comparing pears and apples. XSLT is
 quite useful for some tasks and weak in others. The same apply for JSP.
 We still use XSLT even if you have JSP at hand. In cocoon particular
 wolrd, perhaps he should compare JSP with XSP.

 I did not read the whole article, but looks the author forgot there is a
 XSLT 2.0. Anyway, who cares? ;)

 About freemaker, I guess there are some threads about it in our mail
 archive [1].

 Hope this helps.

 Best Regards,

 Antonio Gallardo.

 [1] http://cocoon.markmail.org/search/?q=freemaker


 I hardly think 'pears and apples' are a good simile, they are far too 
 similar to one
 another.  Perhaps  'oranges and  apples'   or even  'sausages and marmalade'.

 By the way, sausages and marmalade go very well together.

 My main complaint is that XSP is deprecated in Cocoon 2.2, in fact it seems 
 to
 be sneered-at.  For me, it provides just the tiny amount of Java I need - I 
 still
 don't want to learn the language thoroughly. It comes below both ruby and 
 even
 Acrobat javascript for me. Python has always been more useful, and now the
 adobe Flex environment looks pretty alluring - in all of these I use XML, and
 often it is obtained from a localhost Cocoon pipeline.


 Cocoon 2.1.x  - love it
 XSLT (2) - love it
 XSP - love it
 Eclipse, XML, XML-Schema, other XML tools - love 'em all !


 Cocoon 2.2 - too much java needed, not backward-compatible enough, (Database 
 connection) a few other grumbles.
 will re-evaluate it in 12 months or so, but I have already wasted too much 
 time for this year
 Cocoon 2.3 - not powerful enough for my needs, last time I looked

 Bye for now,
 Ken.

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




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




--
Bart Remmerie
+32 (0477) 78.88.76
remme...@gmail.com

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



Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Yet another person
I've been trying to use a css stylesheet in my xsl transformation but It
doesn't come through.
It seems cocoon doesn't understand relative paths nor does it understand
resource/internal/stylesheets/file.css or any other link i've tried.

I even made a pipeline to match the css from my sitemap but that didn't work
either.

It's probably something silly but I can't seem to find it - any help would
be greatly appreciated



Thanks in advance!


Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Jeroen Reijn

Hi,

your css file will be requested as a browser request, so you will have 
to make sure you have a matcher in your sitemap that handles this request.


What did not work when you tried that?

Regards,

Jeroen

Yet another person wrote:
I've been trying to use a css stylesheet in my xsl transformation but It 
doesn't come through.


It seems cocoon doesn't understand relative paths nor does it understand 
resource/internal/stylesheets/file.css or any other link i've tried.


I even made a pipeline to match the css from my sitemap but that didn't 
work either.


It's probably something silly but I can't seem to find it - any help 
would be greatly appreciated




Thanks in advance!


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



Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Yet another person
I made the following match in my pipeline:
 map:pipeline id=stylesheet
map:match pattern=*.css
map:generate src=resources/internal/Stylesheets/{1}.css type=file /
map:serialize type=text /
/map:match

and my stylesheet pointed to the css like this:

link rel=stylesheet type=text/css href=Main.css /

On Wed, Apr 29, 2009 at 11:48 AM, Jeroen Reijn j.re...@onehippo.com wrote:

 Hi,

 your css file will be requested as a browser request, so you will have to
 make sure you have a matcher in your sitemap that handles this request.

 What did not work when you tried that?

 Regards,

 Jeroen


 Yet another person wrote:

 I've been trying to use a css stylesheet in my xsl transformation but It
 doesn't come through.

 It seems cocoon doesn't understand relative paths nor does it understand
 resource/internal/stylesheets/file.css or any other link i've tried.

 I even made a pipeline to match the css from my sitemap but that didn't
 work either.

 It's probably something silly but I can't seem to find it - any help would
 be greatly appreciated



 Thanks in advance!


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




Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Joerg Heinicke
What exactly are you trying to achieve? An XSLT is used for transforming 
an XML structure into another one. There is no CSS involved. Do you want 
to style the output?


Joerg

On 29.04.2009 11:46, Yet another person wrote:

I've been trying to use a css stylesheet in my xsl transformation but It
doesn't come through.
It seems cocoon doesn't understand relative paths nor does it understand
resource/internal/stylesheets/file.css or any other link i've tried.

I even made a pipeline to match the css from my sitemap but that didn't work
either.

It's probably something silly but I can't seem to find it - any help would
be greatly appreciated



Thanks in advance!



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



Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Yet another person
I want to aggregate different sources into a styled website.Using a
stylesheet to add layout to my data to present the user...

On Wed, Apr 29, 2009 at 11:55 AM, Joerg Heinicke joerg.heini...@gmx.dewrote:

 What exactly are you trying to achieve? An XSLT is used for transforming an
 XML structure into another one. There is no CSS involved. Do you want to
 style the output?

 Joerg


 On 29.04.2009 11:46, Yet another person wrote:

 I've been trying to use a css stylesheet in my xsl transformation but It
 doesn't come through.
 It seems cocoon doesn't understand relative paths nor does it understand
 resource/internal/stylesheets/file.css or any other link i've tried.

 I even made a pipeline to match the css from my sitemap but that didn't
 work
 either.

 It's probably something silly but I can't seem to find it - any help would
 be greatly appreciated



 Thanks in advance!


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




Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Jeroen Reijn
This probably won't work, since a generate is to generate from for 
instance an XML file, not a static resource. What you actually want to 
do is use a reader (map:read).


Regards,

Jeroen

Yet another person wrote:

I made the following match in my pipeline:

 map:pipeline id=stylesheet
map:match pattern=*.css
map:generate src=resources/internal/Stylesheets/{1}.css type=file /
map:serialize type=text /
/map:match   


and my stylesheet pointed to the css like this:

link rel=stylesheet type=text/css href=Main.css /

On Wed, Apr 29, 2009 at 11:48 AM, Jeroen Reijn j.re...@onehippo.com 
mailto:j.re...@onehippo.com wrote:


Hi,

your css file will be requested as a browser request, so you will
have to make sure you have a matcher in your sitemap that handles
this request.

What did not work when you tried that?

Regards,

Jeroen


Yet another person wrote:

I've been trying to use a css stylesheet in my xsl
transformation but It doesn't come through.

It seems cocoon doesn't understand relative paths nor does it
understand resource/internal/stylesheets/file.css or any other
link i've tried.

I even made a pipeline to match the css from my sitemap but that
didn't work either.

It's probably something silly but I can't seem to find it - any
help would be greatly appreciated



Thanks in advance!


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




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



Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Yet another person
like this?
map:pipeline id=stylesheet
map:match pattern=*.css
map:read src=resources/internal/Stylesheets/{1}.css type=file /
/map:match
/map:pipeline

didn't work either

On Wed, Apr 29, 2009 at 12:00 PM, Jeroen Reijn j.re...@onehippo.com wrote:

 This probably won't work, since a generate is to generate from for instance
 an XML file, not a static resource. What you actually want to do is use a
 reader (map:read).

 Regards,

 Jeroen

 Yet another person wrote:

 I made the following match in my pipeline:

  map:pipeline id=stylesheet
 map:match pattern=*.css
 map:generate src=resources/internal/Stylesheets/{1}.css type=file /
 map:serialize type=text /
 /map:match
 and my stylesheet pointed to the css like this:

 link rel=stylesheet type=text/css href=Main.css /

 On Wed, Apr 29, 2009 at 11:48 AM, Jeroen Reijn j.re...@onehippo.commailto:
 j.re...@onehippo.com wrote:

Hi,

your css file will be requested as a browser request, so you will
have to make sure you have a matcher in your sitemap that handles
this request.

What did not work when you tried that?

Regards,

Jeroen


Yet another person wrote:

I've been trying to use a css stylesheet in my xsl
transformation but It doesn't come through.

It seems cocoon doesn't understand relative paths nor does it
understand resource/internal/stylesheets/file.css or any other
link i've tried.

I even made a pipeline to match the css from my sitemap but that
didn't work either.

It's probably something silly but I can't seem to find it - any
help would be greatly appreciated



Thanks in advance!


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





Re: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread Yet another person
Oh dear god,
I thought it was something silly.

I got it to work, sorry for bothering you. I forgot the folder is called
resource instead of resources

Thanks for your efforts anyway!

On Wed, Apr 29, 2009 at 12:02 PM, Yet another person 
breathofgh...@gmail.com wrote:

 like this?
 map:pipeline id=stylesheet
 map:match pattern=*.css
 map:read src=resources/internal/Stylesheets/{1}.css type=file /
 /map:match
 /map:pipeline

 didn't work either

 On Wed, Apr 29, 2009 at 12:00 PM, Jeroen Reijn j.re...@onehippo.comwrote:

 This probably won't work, since a generate is to generate from for
 instance an XML file, not a static resource. What you actually want to do is
 use a reader (map:read).

 Regards,

 Jeroen

 Yet another person wrote:

 I made the following match in my pipeline:

  map:pipeline id=stylesheet
 map:match pattern=*.css
 map:generate src=resources/internal/Stylesheets/{1}.css type=file /
 map:serialize type=text /
 /map:match
 and my stylesheet pointed to the css like this:

 link rel=stylesheet type=text/css href=Main.css /

 On Wed, Apr 29, 2009 at 11:48 AM, Jeroen Reijn j.re...@onehippo.commailto:
 j.re...@onehippo.com wrote:

Hi,

your css file will be requested as a browser request, so you will
have to make sure you have a matcher in your sitemap that handles
this request.

What did not work when you tried that?

Regards,

Jeroen


Yet another person wrote:

I've been trying to use a css stylesheet in my xsl
transformation but It doesn't come through.

It seems cocoon doesn't understand relative paths nor does it
understand resource/internal/stylesheets/file.css or any other
link i've tried.

I even made a pipeline to match the css from my sitemap but that
didn't work either.

It's probably something silly but I can't seem to find it - any
help would be greatly appreciated



Thanks in advance!


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






RE: Howto: Make CSS available from within a stylesheet?

2009-04-29 Thread norbert . reinhard
Thank you Andreas for your response

if I change the local.build.properties in the following setting:

pubs.root.dirs=src/pubs:../CONTRIB_HOME/pubs
modules.root.dirs=src/modules:src/modules-core:src/pubs/default/modules:../CONTRIB_HOME/modules:../CONTRIB_HOME/pubs/defaultfiredocs/modules

modules.copy=false

I get after a .\build.bat following message: 

prepare-modules:
No module(s) found in directory 
[C:\CONTRIB_HOME\pubs\defaultfiredocs\modules]
Processing C:\src\build\lenya\temp\modules.xml to 
C:\src\build\lenya\temp\modules-config.xml
Loading stylesheet C:\src\src\resources\build\modules2config.xsl
Processing C:\src\build\lenya\temp\modules-config.xml to 
C:\src\build\lenya\temp\modules-build.xml
Loading stylesheet C:\src\src\resources\build\modules2build.xsl
Processing C:\src\build\lenya\temp\modules.xml to 
C:\src\build\lenya\temp\modules.xconf
Loading stylesheet C:\src\src\resources\build\modules2patch.xsl
Processing: C:\src\build\lenya\temp\modules.xconf
Writing: C:\src\build\lenya\webapp\WEB-INF\cocoon.xconf
BUILD FAILED
C:\src\src\targets\webapp-build.xml:174: The following error occurred 
while executing this line:
C:\src\src\targets\modules-build.xml:74: The following error occurred 
while executing this line:
C:\src\build\lenya\temp\modules-build.xml:5950: Duplicate target 
'validate-module-org.apache.lenya.modules.blog'
Total time: 4 minutes 29 seconds
C:\src
I have download via svn 
http://svn.apache.org/repos/asf/lenya/contributions/2_0_X  in CONTRIB_HOME


Many thanks in advance 

Norbert


Re: XSLT is Dead ?!

2009-04-29 Thread Ken Starks

Derek Hohls wrote:

Ken

I would echo most of your sentiments, except for the XSP part.
I have found that the flowscript/JXT gives me all the logic/layout
options I need ... without having to worry about any Java at all in
my apps.  I think that is why the developers decided to deprecate
XSP quite a while back, though I appreciate that not everybody 
might think that's such a good idea!


  

Yes I will readily admit to not having explored JXT properly.

I happen to quite like ESQL and there is a short bit of XSP for a 
password-protected Login

in the book from which I learned Coccon (Macczar and Aston)
ISBN 0 672 32257 9

I don't count either of these as a real preference, its just a if it 
ain't broke why fix it ? feature for me.



How do you use XSLT(2)?  I did not think Xalan supported it yet? eg
http://xml.apache.org/xalan-j/
http://www.nabble.com/Xalan-J-XSLT-2.0-status-tc5766761r4.html
http://www.velocityreviews.com/forums/t364511-xslt-2-processors.html

  

You can get cocoon to use saxon - other people have already replied.

One of the two or three bits of non-open source software I use is a good 
(IMHO)

XML editor, Oxygen. sometime last year, they announced that Saxon 2.0 was
to be bundled with it for free. (Hooray !).


Derek

  

Ken.


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



Re: XSLT is Dead ?!

2009-04-29 Thread Antonio Gallardo
Hi Derek,

Thanks for spotting out my error. I was wondering why there where too
few related mails about Freemarker in cocoon. :P

Best Regards,

Antonio Gallardo


Derek Hohls escribió:
 Antonio

 True - but it would be useful to tell the original author this
 as well!

 PS it is Freemarker (not maker)
   


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



saving multiple files uploaded from an external (unknown) source

2009-04-29 Thread roman pielaszek

Hi,
I use CForms uploads in Cocoon 2.1.11 smoothly. Now, I need to receive 
POST request from an external Java applet containing many files (and 
some other data in text fields). In PHP it would be just:


foreach($_FILES as $file) {
   $array_path = explode('/',$file['name']);
   $arraySize  = count($array_path);
   $fileNameOnly=$array_path[$arraySize-1]; //will take only the file 
name without the enitre local path

   copy($file['tmp_name'], some_dir/$fileNameOnly);
}

How can I handle files and form data from a cocoon-unrelated source?
What's the quickes way to store all files in a (specific) local directory?

Many thanks,
roman


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