Doubt about file upload in Cocoon 2.2

2013-06-06 Thread Miguel

Hi

  At present, I work on project based on cocoon 2.2 and I want to use 
file upload option to send an email with cocoon. Documentation of cocoon 
indicates about the parameters:


org.apache.cocoon.uploads.enable=true
org.apache.cocoon.uploads.autosave=true
org.apache.cocoon.uploads.maxsize=1000

The last parameter is very interesting because limit the size of files 
to upload the platform, so I think cocoon would be safe if people try 
upload ver big files.


I have checked that the MultipartParser java class manage this upload 
process, but it seems that the file is readed fully although size of 
file is higher than parameter maxsize, ¿it is correct this behaviour?


After debugging MultipartParser class, I see the process is:
1) if (oversized) , so if size of file is higher than parameter maxsize, 
then it is created object out = new NullOutputStream();
2) stream of file is readed and put into object out, and variable lenght 
is size of readed content.

3) if (oversized) then it is created object RejectedPart.

I don't understand because read full file if in this case always it's 
created RejectedPart object. it's necesary length variable for 
RejectedPart object?.


if at the begining of process you know content length of file and this 
number is higher of limit then it's better option not read file and 
create RejectedPart object with length = 0, isn't it?. Maybe, I don't 
know source of cocoon fully, and I am wrong.


Anybody can explain me.
thanks
attachment: miguel_valencia.vcf
-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Information about configure EHdefaultstore en C2.2

2014-01-07 Thread Miguel

Hi

  I am looking for documentation to configure and tunning 
EHdefaultstore caching in Cocoon 2.2 application. I have found only how 
to configure on Cocoon 2.1 using cocoon.xconf file but this is not 
usefully for me.


I need modify EHdefaultstore configuration because the application move 
to a new machines with better capacities and now JVM have 3 GB RAM and I 
suppose EHdefaultstore default configuration is not enough.


Any ideas?
Best regards
attachment: miguel_valencia.vcf
-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Custom generator not call recycle method

2014-02-04 Thread Miguel

Hi,

I'm migrating configuration custom generator from Avalon to Spring and 
generator is working well but I have checked that generator does not 
call recycled method when it has finished.


My generator configuration in servlet-service.xml file is:

bean scope=prototype 
name=org.apache.cocoon.generation.Generator/customGenerator 
class=es.juntadeandalucia.generation.CustomGenerator

  property name=server value=${ip.machine} /
  property name=port value=${port_machine} /
  property name=parser ref=org.apache.cocoon.core.xml.SAXParser/
  property name=manager 
ref=org.apache.avalon.framework.service.DefaultServiceManager /

/bean

When I used old configuration:

map:generator label=customGenerator name=customGenerator
  src=es.juntadeandalucia.generation.CustomGenerator
server${ip.machine}/server
port${port_machine}/port
/map:generator

then, my generator work all well and execute recycle method when 
generator is finished.


Any ideas?
Thanks.
attachment: miguel_valencia.vcf
-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Re: Custom generator not call recycle method

2014-02-05 Thread Miguel

Hi

I have to come back to old configuration of generator:

map:generator label=icmsRest name=icmsRest 
logger=es.juntadeandalucia.generation.CustomGenerator

  src=es.juntadeandalucia.generation.CustomGenerator
  serverICMSip_machine/serverICMS
  portICMSport_machine/portICMS
namePoolorg.apache.cocoon.generation.HttpPoolManager/namePool
/map:generator

Then, HttpPoolManager is a resource defined like spring bean and for to 
use it in my custom generator, I have to implement 
ApplicationContextAware interface. So, in this way, my generator work 
fine and recycle method is called at finish of my generator.



El 04/02/2014 16:52, Miguel escribió:

Hi,

I'm migrating configuration custom generator from Avalon to Spring and 
generator is working well but I have checked that generator does not 
call recycled method when it has finished.


My generator configuration in servlet-service.xml file is:

bean scope=prototype 
name=org.apache.cocoon.generation.Generator/customGenerator 
class=es.juntadeandalucia.generation.CustomGenerator

  property name=server value=${ip.machine} /
  property name=port value=${port_machine} /
  property name=parser ref=org.apache.cocoon.core.xml.SAXParser/
  property name=manager 
ref=org.apache.avalon.framework.service.DefaultServiceManager /

/bean

When I used old configuration:

map:generator label=customGenerator name=customGenerator
  src=es.juntadeandalucia.generation.CustomGenerator
server${ip.machine}/server
port${port_machine}/port
/map:generator

then, my generator work all well and execute recycle method when 
generator is finished.


Any ideas?
Thanks.


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


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

Re: Custom generator not call recycle method

2014-02-05 Thread Miguel

Hi Thorsten

  Yes, I supposed you tell me. I developed a new generator very similar 
to WebServiceProxyGenerator of the block cocoon-proxy for to consume 
Rest service, but I needed three modifications:
* the new generator have to be a cache component 
(WebServiceProxyGenerator not implement CacheableProcessingComponent)
* Use Apache HttpComponents 4.2 (WebServiceProxyGenerator use Commons 
HttpClient 3.x and this version have bugs about release connections)
* Use a pool connections (WebServiceProxyGenerator not use pool to 
manage connections and this can be a important improve to performance)


I developed a new class to manage pool and declared it using spring, it 
is seems the easy best way.
Besides if I declared the new generator using spring will be very easy 
to add the pool resource.


I had readed that Cocoon 2.2 can use spring to declare objects and I 
found examples with transformer, so I followed the web page: 
https://cocoon.apache.org/2.2/core-modules/core/2.2/688_1_1.html


The new generator seems work ok, but I checked that it not called to 
recycle method at finished and then, not release connection to pool.


At the end, I had have to added ApplicationContextAware interface to my 
generator to access resource pool declared in spring, and this is 
working fine. Still I have to do some test with apache jmeter to check 
performance but first impressions are good.


Best regards.

El 05/02/2014 14:43, Thorsten Scherler escribió:

On 02/05/2014 11:22 AM, Miguel wrote:

Hi

I have to come back to old configuration of generator:

map:generator label=icmsRest name=icmsRest 
logger=es.juntadeandalucia.generation.CustomGenerator

src=es.juntadeandalucia.generation.CustomGenerator
  serverICMSip_machine/serverICMS
  portICMSport_machine/portICMS
namePoolorg.apache.cocoon.generation.HttpPoolManager/namePool
/map:generator

Then, HttpPoolManager is a resource defined like spring bean and for 
to use it in my custom generator, I have to implement 
ApplicationContextAware interface. So, in this way, my generator work 
fine and recycle method is called at finish of my generator.




Hi Miguel,

not sure whether I understand, you have it working now?

I think the recyle method is special to avalon and I think spring 
based components do not use this method anymore. Using the old 
config tricks c2.2 into using the avalon methods...at least that is 
what its look like.


salu2




El 04/02/2014 16:52, Miguel escribió:

Hi,

I'm migrating configuration custom generator from Avalon to Spring 
and generator is working well but I have checked that generator does 
not call recycled method when it has finished.


My generator configuration in servlet-service.xml file is:

bean scope=prototype 
name=org.apache.cocoon.generation.Generator/customGenerator 
class=es.juntadeandalucia.generation.CustomGenerator

  property name=server value=${ip.machine} /
  property name=port value=${port_machine} /
  property name=parser 
ref=org.apache.cocoon.core.xml.SAXParser/
  property name=manager 
ref=org.apache.avalon.framework.service.DefaultServiceManager /

/bean

When I used old configuration:

map:generator label=customGenerator name=customGenerator
src=es.juntadeandalucia.generation.CustomGenerator
server${ip.machine}/server
port${port_machine}/port
/map:generator

then, my generator work all well and execute recycle method when 
generator is finished.


Any ideas?
Thanks.


-
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



--
Thorsten Scherler scherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/


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

Re: Information about configure EHdefaultstore en C2.2

2014-02-06 Thread Miguel

Hi Thorsten

  I'm going to read that class. Actually, the default values of 
parameter org.apache.cocoon.store.maxobjects = 1000
How application move to a new machines with more RAM memory, I think is 
possible to increase number maximum objects in memory.


Besides I checked that file on disk of EHCache in some machines is very 
long (about 1-4 GB) and I have readed this sizes can affect to 
performance of ehcache, so advice tunning parameters of ehcache.


In this page: http://wiki.apache.org/cocoon/CocoonPerformanceResults
there are some sample stress test results and it seems that a value of 
1000 objetcs to maxobjects parameter can be very small


Any help on this is good.
Best regards


El 05/02/2014 14:54, Thorsten Scherler escribió:

On 01/08/2014 08:21 AM, Miguel wrote:

Hi

   I am looking for documentation to configure and tunning
EHdefaultstore caching in Cocoon 2.2 application. I have found only
how to configure on Cocoon 2.1 using cocoon.xconf file but this is not
usefully for me.

I need modify EHdefaultstore configuration because the application
move to a new machines with better capacities and now JVM have 3 GB
RAM and I suppose EHdefaultstore default configuration is not enough.

Any ideas?
Best regards


Sorry for the late reply, did you found anything?
There is a good comment in the source code of
org.apache.cocoon.components.store.impl.EHDefaultStore. Basically you
want to play with private static final String CONFIG_FILE =
org/apache/cocoon/components/store/impl/ehcache.xml;

HTH

salu2



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

Re: Capture or Output data from current flow state to PDF

2014-02-06 Thread Miguel

Hi Sandor

Usually, to create a pdf from a source is necesary two phases:

* Use transformer with a xslfo sheet
* Use serializer

Example:

map:transform src=xslt/transform.document.fo
  map:parameter value=xxx name=fileName/
/map:transform
map:serialize type=fo2pdf/

where

map:serializer name=fo2pdf logger=sitemap.serializer.fo2pdf 
src=org.apache.cocoon.serialization.FOPSerializer


If I understand, you want show the page xhtml and (same time) convert to 
PDF, so I see in your code you use a game.js, where you can call 
cocoon pipeline using processPipelineTo() method and create PDF 
document, example:
cocoon.processPipelineTo(match of your cocoon sitemap,null, 
FileOutputStream objetc)


Best regards

El 01/02/2014 16:01, Sandor Szatmari escribió:

Hello,

Using Cocoon 2.2, I am trying to generate some PDF interactively using flow.  
The flowscript loops, continually getting input from the user, allowing them to 
add content via form submission.  The input is collected and used to 
dynamically build a document.  This part works using the sitemap.xmap below.

What I would like to do next is take the current state of the data collected in 
the flow and transform to PDF.

I'm not sure how to capture the output of the current flow state.

Can this be done at all?
If so, can it be done inside the pipeline without writing to a temporary file?

Using Cocoon 2.2 is not a requirement so if this is achievable with a different 
version that is OK.

?xml version=1.0 encoding=UTF-8?
map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;

map:flow language=javascript/
!-- map:script src=flow/game.js/
/map:flow--

map:pipelines

   map:pipeline id=test
 map:match pattern=test
   map:call function=main/
 /map:match

 map:match pattern=*.jx internal-only=true
   map:generate type=jx src=documents/{1}.jx/
   map:serialize type=xhtml/
 /map:match

 map:match pattern=*.kont
   map:call continuation={1}/
 /map:match
   /map:pipeline
/map:pipelines

/map:sitemap

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





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

How-to configure spring singleton resource in block of C2.2

2014-02-11 Thread Miguel

Hi

 My custom block of my application Cocoon 2.2 use a resource configured 
in spring. this resource is defined like singleton scope in spring 
section of block. Besides I have a custom generator that it use this 
spring resource.


Happens when I start my web application spring context load my resource, 
but when I call first time to custom generator the spring resource 
execute methods of shutdown and init, again.


if I move configuration of resource to applicationContext.xml of my web 
application (in the same place of Configure Log4j), then resource only 
init once time, but I can not debug or start alone my block.


Any ideas?

Best regards


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

Re: Resize images

2014-09-12 Thread Miguel

Hi Peter

You can find examples to manage images in Cocoon: 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/


Best regards

El 11/09/2014 16:22, Peter Sparkes escribió:

Hi,

I currently have a cocoon application which enables the site owner to 
upload images and then  within the upload javascript uses java to move 
the images to the required directory.


Most of the uploaded images are  large and therefore they are slow in 
displaying in a web page.


I, therefore, wish to resize them before saving them.

I am not sure how to do it.

Please, can anyone help

Thanks

Peter

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




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

Re: Resize images

2014-09-16 Thread Miguel

Hi Peter

block imageop-samples exist for cocoon 2.1, and you can download 
in: 
http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.1/RELEASE_2_1_12/src/blocks/imageop




El 15/09/2014 15:57, Peter Sparkes escribió:

Hi,

Thank you all for your replies.

As I believe it will be the easiest to implement, I am going to try 
imgscalr.


However, As I am using cocoon 2.1, Is there a way of using 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/ in 
cocoon 2.1


Best wishes

Peter

On 12/09/2014 06:59, Miguel wrote:

Hi Peter r

You can find examples to manage images in Cocoon: 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/


Best regards


On 11/09/2014 16:07, Sandor Szatmari wrote:
I use JAI to dynamically resize images for my site.  There are lot of 
examples if you google 'JAI image resize'.  I store higher res images 
and downscale them on the fly to the right size for the context they 
will be used in.  I wrote a plain old servlet to do it, but I'm sure 
it could be done in cocoon too.


Sandor

On Sep 11, 2014, at 10:38, Javier Puerto jpue...@gmail.com 
mailto:jpue...@gmail.com wrote:



Hi Peter,

If you can use ImageMagick, you can try with: 
http://im4java.sourceforge.net/


2014-09-11 16:27 GMT+02:00 Edward David eda...@ucalgary.ca 
mailto:eda...@ucalgary.ca:


Peter,
There are numerous image resizer programs out there.
Check out this Free Picture Resizer at
http://download.cnet.com/Free-Picture-Resizer/3000-12511_4-10297789.html


Thanks,
___
Edward David
Information Technologies Services,
Libraries and Cultural Resources,
The University of Calgary
Phone: (403) 220-3383 tel:%28403%29%20220-3383
Fax: (403) 282-1218 tel:%28403%29%20282-1218

-Original Message-
From: Peter Sparkes [mailto:pe...@didm.co.uk
mailto:pe...@didm.co.uk]
Sent: September-11-14 8:23 AM
To: users@cocoon.apache.org mailto:users@cocoon.apache.org 
Cocoon users
Subject: Resize images

Hi,

I currently have a cocoon application which enables the site
owner to upload images and then within the upload javascript
uses java to move the images to the required directory.

Most of the uploaded images are  large and therefore they are 
slow in displaying in a web page.


I, therefore, wish to resize them before saving them.

I am not sure how to do it.

Please, can anyone help

Thanks

Peter

-
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






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

Re: Resize images

2014-09-16 Thread Miguel

Have you checked dependencies?
Have you tried to use block: cocoon-imageop-sample?
Can you show error message when you use transformer?


El 16/09/2014 13:14, Peter Sparkes escribió:

Hi Miguel,

I have implemented imageop, however, the only samples that work are:

  * Display image with original size and colour
  * Tint image various colour

I get Unable to transform src image for

  * Image scaling
  * Image resize

Any ideas how to get scaling and resizing working

Best wishes

Peter


On 16/09/2014 07:34, Peter Sparkes wrote:

Thank you Miguel

Peter

On 16/09/2014 07:08, Miguel wrote:

Hi Peter

block imageop-samples exist for cocoon 2.1, and you can download 
in: 
http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.1/RELEASE_2_1_12/src/blocks/imageop




El 15/09/2014 15:57, Peter Sparkes escribió:

Hi,

Thank you all for your replies.

As I believe it will be the easiest to implement, I am going to try 
imgscalr.


However, As I am using cocoon 2.1, Is there a way of using 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/ in 
cocoon 2.1


Best wishes

Peter

On 12/09/2014 06:59, Miguel wrote:

Hi Peter r

You can find examples to manage images in Cocoon: 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/


Best regards


On 11/09/2014 16:07, Sandor Szatmari wrote:
I use JAI to dynamically resize images for my site.  There are lot 
of examples if you google 'JAI image resize'.  I store higher res 
images and downscale them on the fly to the right size for the 
context they will be used in.  I wrote a plain old servlet to do 
it, but I'm sure it could be done in cocoon too.


Sandor

On Sep 11, 2014, at 10:38, Javier Puerto jpue...@gmail.com 
mailto:jpue...@gmail.com wrote:



Hi Peter,

If you can use ImageMagick, you can try with: 
http://im4java.sourceforge.net/


2014-09-11 16:27 GMT+02:00 Edward David eda...@ucalgary.ca 
mailto:eda...@ucalgary.ca:


Peter,
There are numerous image resizer programs out there.
Check out this Free Picture Resizer at
http://download.cnet.com/Free-Picture-Resizer/3000-12511_4-10297789.html


Thanks,
___
Edward David
Information Technologies Services,
Libraries and Cultural Resources,
The University of Calgary
Phone: (403) 220-3383 tel:%28403%29%20220-3383
Fax: (403) 282-1218 tel:%28403%29%20282-1218

-Original Message-
From: Peter Sparkes [mailto:pe...@didm.co.uk
mailto:pe...@didm.co.uk]
Sent: September-11-14 8:23 AM
To: users@cocoon.apache.org mailto:users@cocoon.apache.org
 Cocoon users
Subject: Resize images

Hi,

I currently have a cocoon application which enables the site
owner to upload images and then  within the upload javascript
uses java to move the images to the required directory.

Most of the uploaded images are  large and therefore they
are  slow in displaying in a web page.

I, therefore, wish to resize them before saving them.

I am not sure how to do it.

Please, can anyone help

Thanks

Peter

-
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






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

Re: Resize images

2014-09-16 Thread Miguel

Hi Peter

  It seems that there isn't access to image or similar error to read it.
I advise you debug the block imageop to see what parameters's value 
arrive to class.



This block has only three bugs, and all are fixed, so I think module 
must works.

https://issues.apache.org/jira/browse/COCOON/component/12311751/?selectedTab=com.atlassian.jira.jira-projects-plugin:component-summary-panel



El 16/09/2014 14:03, Peter Sparkes escribió:

I am using the Samples block on cocoon 2.1.12

...//samples/blocks/imageop/logo2.png/resize-50-50 gives the following 
error:


java.awt.image.ImagingOpException: Unable to transform src image

Cocoon stacktrace[hide]

*Failed to process reader*
context://samples/blocks/imageop/sitemap.xmap - 46:53 	/map:read 
type=image-op-resize/

context://samples/blocks/sitemap.xmap - 67:68   /map:mount/
context://samples/sitemap.xmap - 198:66 /map:mount/
context://sitemap.xmap - 1086:92/map:mount/


Java stacktrace[hide]

java.awt.image.ImagingOpException: Unable to transform src image
at java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:357)
at 
org.apache.cocoon.reading.imageop.ResizeOperation.apply(ResizeOperation.java:96)
at 
org.apache.cocoon.reading.imageop.ImageOpReader.applyEffectsStack(ImageOpReader.java:193)
at 
org.apache.cocoon.reading.imageop.ImageOpReader.processStream(ImageOpReader.java:123)
at 
org.apache.cocoon.reading.ResourceReader.generate(ResourceReader.java:332)



On 16/09/2014 12:36, Miguel wrote:

Have you checked dependencies?
Have you tried to use block: cocoon-imageop-sample?
Can you show error message when you use transformer?


El 16/09/2014 13:14, Peter Sparkes escribió:

Hi Miguel,

I have implemented imageop, however, the only samples that work are:

  * Display image with original size and colour
  * Tint image various colour

I get Unable to transform src image for

  * Image scaling
  * Image resize

Any ideas how to get scaling and resizing working

Best wishes

Peter


On 16/09/2014 07:34, Peter Sparkes wrote:

Thank you Miguel

Peter

On 16/09/2014 07:08, Miguel wrote:

Hi Peter

block imageop-samples exist for cocoon 2.1, and you can 
download in: 
http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.1/RELEASE_2_1_12/src/blocks/imageop




El 15/09/2014 15:57, Peter Sparkes escribió:

Hi,

Thank you all for your replies.

As I believe it will be the easiest to implement, I am going to 
try imgscalr.


However, As I am using cocoon 2.1, Is there a way of using 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/ in 
cocoon 2.1


Best wishes

Peter

On 12/09/2014 06:59, Miguel wrote:

Hi Peter r

You can find examples to manage images in Cocoon: 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/


Best regards


On 11/09/2014 16:07, Sandor Szatmari wrote:
I use JAI to dynamically resize images for my site.  There are 
lot of examples if you google 'JAI image resize'.  I store 
higher res images and downscale them on the fly to the right 
size for the context they will be used in.  I wrote a plain old 
servlet to do it, but I'm sure it could be done in cocoon too.


Sandor

On Sep 11, 2014, at 10:38, Javier Puerto jpue...@gmail.com 
mailto:jpue...@gmail.com wrote:



Hi Peter,

If you can use ImageMagick, you can try with: 
http://im4java.sourceforge.net/


2014-09-11 16:27 GMT+02:00 Edward David eda...@ucalgary.ca 
mailto:eda...@ucalgary.ca:


Peter,
There are numerous image resizer programs out there.
Check out this Free Picture Resizer at
http://download.cnet.com/Free-Picture-Resizer/3000-12511_4-10297789.html


Thanks,
___
Edward David
Information Technologies Services,
Libraries and Cultural Resources,
The University of Calgary
Phone: (403) 220-3383 tel:%28403%29%20220-3383
Fax: (403) 282-1218 tel:%28403%29%20282-1218

-Original Message-
From: Peter Sparkes [mailto:pe...@didm.co.uk
mailto:pe...@didm.co.uk]
Sent: September-11-14 8:23 AM
To: users@cocoon.apache.org
mailto:users@cocoon.apache.org  Cocoon users
Subject: Resize images

Hi,

I currently have a cocoon application which enables the
site owner to upload images and then  within the upload
javascript uses java to move the images to the required
directory.

Most of the uploaded images are  large and therefore they
are  slow in displaying in a web page.

I, therefore, wish to resize them before saving them.

I am not sure how to do it.

Please, can anyone help

Thanks

Peter

-
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: Resize images

2014-09-17 Thread Miguel
I've done some test and modulo in cocoon 2.2 project works fine. I 
describe step by step:


a) Include dependency into pom file of my project:

dependency
  groupIdorg.apache.cocoon/groupId
  artifactIdcocoon-imageop-impl/artifactId
  version1.0.0-SNAPSHOT/version
/dependency

b) Include test map:match into sitemap.xmap:

map:match pattern=prueba/*/scale-*-*
map:read type=image-op-scale 
src=themer/themes/common/images/{1}

  map:parameter name=scale-scale value={2} /
  map:parameter name=output-format value={3} /
/map:read
  /map:match

  map:match pattern=prueba/*/resize-*-*
map:read type=image-op-resize 
src=themer/themes/common/images/{1}

  map:parameter name=size-width value={2} /
  map:parameter name=size-height value={3} /
/map:read
  /map:match

themer/themes/common/images/ is the route to my images's folder

c) start my project and I test:

* http://localhost:8080/prueba/audio.gif/scale-2.5-jpg
* http://localhost:8080/prueba/audio.gif/resize-100-50

All works fine.


El 16/09/2014 22:27, Peter Sparkes escribió:

Hi Miguel,

My java is not good enough debug the block imageop to see what 
parameters's value arrive to class


However as

  * Display image with original size and colour
  * Tint image various colour

are working I assume there is access to image.

http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/ also 
gives errors on resize (scalling)


Peter



On 16/09/2014 13:52, Miguel wrote:

Hi Peter

  It seems that there isn't access to image or similar error to read it.
I advise you debug the block imageop to see what parameters's value 
arrive to class.



This block has only three bugs, and all are fixed, so I think module 
must works.

https://issues.apache.org/jira/browse/COCOON/component/12311751/?selectedTab=com.atlassian.jira.jira-projects-plugin:component-summary-panel



El 16/09/2014 14:03, Peter Sparkes escribió:

I am using the Samples block on cocoon 2.1.12

...//samples/blocks/imageop/logo2.png/resize-50-50 gives the 
following error:


java.awt.image.ImagingOpException: Unable to transform src image

Cocoon stacktrace[hide]

*Failed to process reader*
context://samples/blocks/imageop/sitemap.xmap - 46:53 	/map:read 
type=image-op-resize/

context://samples/blocks/sitemap.xmap - 67:68   /map:mount/
context://samples/sitemap.xmap - 198:66 /map:mount/
context://sitemap.xmap - 1086:92/map:mount/


Java stacktrace[hide]

java.awt.image.ImagingOpException: Unable to transform src image
at java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:357)
at 
org.apache.cocoon.reading.imageop.ResizeOperation.apply(ResizeOperation.java:96)
at 
org.apache.cocoon.reading.imageop.ImageOpReader.applyEffectsStack(ImageOpReader.java:193)
at 
org.apache.cocoon.reading.imageop.ImageOpReader.processStream(ImageOpReader.java:123)
at 
org.apache.cocoon.reading.ResourceReader.generate(ResourceReader.java:332)



On 16/09/2014 12:36, Miguel wrote:

Have you checked dependencies?
Have you tried to use block: cocoon-imageop-sample?
Can you show error message when you use transformer?


El 16/09/2014 13:14, Peter Sparkes escribió:

Hi Miguel,

I have implemented imageop, however, the only samples that work are:

  * Display image with original size and colour
  * Tint image various colour

I get Unable to transform src image for

  * Image scaling
  * Image resize

Any ideas how to get scaling and resizing working

Best wishes

Peter


On 16/09/2014 07:34, Peter Sparkes wrote:

Thank you Miguel

Peter

On 16/09/2014 07:08, Miguel wrote:

Hi Peter

block imageop-samples exist for cocoon 2.1, and you can 
download in: 
http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.1/RELEASE_2_1_12/src/blocks/imageop




El 15/09/2014 15:57, Peter Sparkes escribió:

Hi,

Thank you all for your replies.

As I believe it will be the easiest to implement, I am going to 
try imgscalr.


However, As I am using cocoon 2.1, Is there a way of using 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/ 
in cocoon 2.1


Best wishes

Peter

On 12/09/2014 06:59, Miguel wrote:

Hi Peter r

You can find examples to manage images in Cocoon: 
http://cocoon.zones.apache.org/cocoon22/cocoon-imageop-sample/


Best regards


On 11/09/2014 16:07, Sandor Szatmari wrote:
I use JAI to dynamically resize images for my site.  There are 
lot of examples if you google 'JAI image resize'.  I store 
higher res images and downscale them on the fly to the right 
size for the context they will be used in.  I wrote a plain 
old servlet to do it, but I'm sure it could be done in cocoon too.


Sandor

On Sep 11, 2014, at 10:38, Javier Puerto jpue...@gmail.com 
mailto:jpue...@gmail.com wrote:



Hi Peter,

If you can use ImageMagick, you can try with: 
http://im4java.sourceforge.net/


2014-09-11 16:27 GMT+02:00 Edward David eda...@ucalgary.ca 
mailto:eda...@ucalgary.ca

problem creating a new transformer

2003-08-06 Thread Miguel Carvalho
, localName, qName,
attributes);
}
else
{
throw new SAXException(Unknown element  + localName);
}
}
else
{
// Not for us
super.startElement(namespaceURI, localName, qName, attributes);
}

}

public void characters(char[] buffer, int start, int length)
throws SAXException
{
switch (this.mode)
{
case MODE_NONE : super.characters(buffer, start, length);
break;
case MODE_TITLE : this.articleTitle.append(buffer, start,
length);
break;
case MODE_TEXT : this.articleText.append(buffer, start, length);
break;
case MODE_IMAGE : this.articleImage.append(buffer, start,
length);
break;
}
}

public void endElement(String namespaceURI, String localName, String
qName)
throws SAXException {

if (namespaceURI != null  namespaceURI.equals(NAMESPACE))
{
if (localName.equals(ARTICLE_ELEMENT) == true)
{
String text;

try
{
//text = Sending mail to  + this.toAddress +  was
successful.;
} catch (Exception any)
{
this.getLogger().error(Exception during sending of
mail, any);
// failure message
//text = Sending mail to  + this.toAddress + 
failed!;
}
// create SAX events for success/failure
super.endElement(NAMESPACE, ARTICLE_ELEMENT, );

} else if (localName.equals(ARTICLE_TITLE_ELEMENT) == true)
{
// mailto received
super.characters(this.articleTitle.toString().toCharArray(),
0, this.articleTitle.length());
super.endElement(NAMESPACE, ARTICLE_TITLE_ELEMENT, );
this.mode = MODE_NONE;

} else if (localName.equals(ARTICLE_TEXT_ELEMENT) == true)
{
super.characters(this.articleText.toString().toCharArray(),
0, this.articleText.length());
super.endElement(NAMESPACE, ARTICLE_TEXT_ELEMENT, );
this.mode = MODE_NONE;

} else if (localName.equals(ARTICLE_IMAGE_ELEMENT) == true)
{
super.characters(this.articleImage.toString().toCharArray(),
0, this.articleImage.length());
super.endElement(NAMESPACE, ARTICLE_IMAGE_ELEMENT, );
this.mode = MODE_NONE;

} else
{
throw new SAXException(Unknown element  + localName);
}
} else
{
// not for us
super.endElement(namespaceURI, localName, qName);
}
}

!--End of
daeTransformer.java-
---

and using a pipeline like,

map:pipeline
map:match pattern=daestart
map:generate type=serverpages src=daexsps/start.xsp/
map:transform type=dae/
map:serialize type=html/
 /map:match
  /map:pipeline

i get,

Cocoon 2 - Internal server error




type internal-server-error

message Exception in ServerPagesGenerator.generate()

description org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

exception

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException

request-uri

/dae/daestart

original exception

Original exception : java.lang.NullPointerException
at
org.apache.cocoon.serialization.AbstractTextSerializer.startElement(Abstract
TextSerializer.java:271)
at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:87)
at
pt.laseeb.dae.transformer.daeTransformer.startElement(daeTransformer.java:11
6)
.
and it goes on... :(

Im sorry for the size of the mail, but if you have read this far and have a
clue of what i am doing wrong, i would be thakfull if you give me a hint. :)

thanks in advance
Miguel Carvalho



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problem creating a new transformer

2003-08-07 Thread Miguel Carvalho
Hi, i am now trying to upgrade to 2.1rc1, but i am wondering ... what
precautions do i need to clean up cooon a little. I just need a cocoon
project that allows me to create a generator, and a transformer in xsp and
java respectively. What are your sugestions? do i start with the webapp
directory /cocoon2.1rc1/src/webapp directory and start from there, do i
build cocoon and get the jar and libs and start a new project (but here i
will have another problem that is to achieve the right configuration to the
sitemap and xconf) or are there any more options that i am not seing???

oh and by the way... the compile time of cocoon in my computer was 14
minutes, how can i tell it not to build the javadoc and maybe the samples, i
dont know if it is possible but i would like to try and reduce a bit the
compile time.. :)

Thanks in advance
Miguel Carvalho

-Original Message-
From: Bruno Dumon [mailto:[EMAIL PROTECTED]
Sent: quinta-feira, 7 de Agosto de 2003 8:44
To: [EMAIL PROTECTED]
Subject: RE: problem creating a new transformer


On Wed, 2003-08-06 at 21:18, Miguel Carvalho wrote:
 i tried to do that but it didn't worked that well, the thing is, like you
 have probably noticed i'm kind of newbie in cocoon, so i started this
 project from a sample chello that used cocoon 2.0rc2.
 Now, trying to upgrade to 2.0.4 i kind of messed up things a little :P

This chello thing, is that something you got recently? If so, could
you tell me where it's from? It might confuse other potential users as
well...


 I thought that it would be ehough to copy the cocoon.jar that is generated
 from the build dir of the src of cocon2.0.4 but it seems (my recente
 experience - today :) ) that this isn't that linear..

You'll need to copy over all the jars from WEB-INF/lib.

But I think it will be more manageable if you work the other way around:
copy your things to a new Cocoon webapp.

Since you're doing this work now, you might as well upgrade immediately
to the cocoon 2.1 Release Candidate.

--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problem creating a new transformer

2003-08-08 Thread Miguel Carvalho
)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:646)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:644)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:483)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:376)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
at java.lang.Thread.run(Thread.java:536)
/pre/pHR size=1 noshade/body/html

Does anyone know what is going wrong here? becaus i don't have a clue :(


Thanks in advance for your time :)
Miguel Carvalho

-Original Message-
From: Bruno Dumon [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 6 de Agosto de 2003 13:21
To: [EMAIL PROTECTED]
Subject: RE: problem creating a new transformer


On Wed, 2003-08-06 at 14:11, Miguel Carvalho wrote:
 hmmm...

 i've started this project begining with an example chello, but i also
 downloaded and tried the cocoon version 2.0.4, perhaps that is why i
 confused it.

 In the libs directory of the project there is a jar cocoo-2.0rc2.jar,
maybe
 this is the version.

Wow, that version is so old that I won't even bother to look further. I
recommend that your upgrade to Cocoon 2.0.4.

--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Xpath limitations in 2.0rc2

2003-08-12 Thread Miguel Carvalho
Hi, i'm working under cocoon 2.0rc2 and i would like to ask if anyone knows
if this particular version has any kind of limitations or bugs wiht XPath.

I ask this question because i can´t put a trasnformer in XSL to work and i'm
running out of solutions to put it to work. Ihave updated Xalan and Xerces
to the latest versions (2.5.1 and 2.5.0 respectively) but still no good.. :(

Thanks in advance
Miguel Carvalho



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: cocoon sax events and transformer doubts

2003-08-14 Thread Miguel Carvalho
Thanks... Right on the spot... :)


Miguel Carvalho

-Original Message-
From: Bruno Dumon [mailto:[EMAIL PROTECTED]
Sent: terça-feira, 12 de Agosto de 2003 16:04
To: [EMAIL PROTECTED]
Subject: Re: cocoon sax events and transformer doubts


On Tue, 2003-08-12 at 17:02, Miguel Carvalho wrote:
snip/
 newAttr.addAttribute(, localName, layouttype, ,
2);
 newAttr.addAttribute(, localName, xpos, , 5);
 newAttr.addAttribute(, localName, ypos, , 7);
 newAttr.addAttribute(, localName, border, ,
dotted);

This is likely the problem: the localName should also be the attribute
name, so in fact you need to supply the same string twice:

newAttr.addAttribute(, layouttype, layouttype, , 2);

In this case the two arguments are the same because you're using an
empty namespace. Otherwise, the second argument would contain the
namespace prefix.

--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



screen resolution

2003-08-14 Thread Miguel Carvalho
Hi,

is it possible to know the screen resolution of a client browser during a
transformer phase??

I know that it is possible to get the screen resolution from javascript, but
it would be great if i could know that when applying a transformer made by
me in java..



Thnaks in advance
Miguel Carvalho




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cocoon sax events and transformer doubts

2003-08-14 Thread Miguel Carvalho
Hi, i'm having some doubts about the way the sax events are created in a
transformer in java...

I'm asking this question because i wrote a transformer in java, but i want
to apply another transformer in xsl after that and i can't access the
attributes in the nodes...

this is the code of the transformer i wrote..

package pt.laseeb.dae.transformer;

/*
 * File: daeTransformer.java
 *
 * Project: Design Automatico e Evolutivo
 *
 * Authors: Paulo Srgio Silva Paixao- [EMAIL PROTECTED]
 *  Miguel Angelo Rodrigues Carvalho - [EMAIL PROTECTED]
 *
 * Date: 4/Ago/2003
 *
 * Trabalho de Fim de Curso - Design Automtico e Evolutivo
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA  02111-1307, USA.
 *
 */

import org.apache.cocoon.transformation.AbstractTransformer;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.ProcessingException;
import org.apache.avalon.framework.parameters.Parameters;
import org.xml.sax.SAXException;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.AttributesImpl;
import java.util.Map;
import java.io.IOException;

public class daeTransformer extends AbstractTransformer
{
public static final String DOCUMENT_ELEMENT = document;
public static final String CONTENT_ELEMENT = contents;
public static final String ARTICLE_ELEMENT = article;
public static final String ARTICLE_TITLE_ELEMENT = title;
public static final String ARTICLE_TEXT_ELEMENT = text;
public static final String ARTICLE_IMAGE_ELEMENT = image;

protected static final int MODE_NONE = 0;
protected static final int MODE_ARTICLE = 1;
protected static final int MODE_TITLE = 2;
protected static final int MODE_TEXT = 3;
protected static final int MODE_IMAGE = 4;

protected int mode;
protected StringBuffer articleText;
protected StringBuffer articleTitle;
protected StringBuffer articleImage;

protected Attributes attr;


public void setup(SourceResolver resolver, Map objectModel, String src,
Parameters par)
throws ProcessingException, SAXException, IOException
{
this.mode = MODE_NONE;
this.articleImage = new StringBuffer();
this.articleTitle = new StringBuffer();
this.articleText = new StringBuffer();
}


public void startElement(String namespaceURI, String localName, String
qName,
Attributes attributes) throws SAXException
{
AttributesImpl newAttr = new AttributesImpl();

if (localName.equals(DOCUMENT_ELEMENT) == true)
{
super.startElement(, localName , qName, newAttr);
}
else if (localName.equals(CONTENT_ELEMENT) == true)

{
super.startElement(, localName , qName, newAttr);

}
else if (localName.equals(ARTICLE_ELEMENT) == true)
{
newAttr.addAttribute(, localName, layouttype, , 2);
newAttr.addAttribute(, localName, xpos, , 5);
newAttr.addAttribute(, localName, ypos, , 7);
newAttr.addAttribute(, localName, border, , dotted);

super.startElement(, localName, qName, newAttr);

}
else if (localName.equals(ARTICLE_TITLE_ELEMENT) == true)
{
this.mode = MODE_TITLE;

super.startElement(, localName, qName, newAttr);
}
else if (localName.equals(ARTICLE_TEXT_ELEMENT) == true)
{
this.mode = MODE_TEXT;
super.startElement(, localName, qName, attributes);
}
else if (localName.equals(ARTICLE_IMAGE_ELEMENT) == true)
{
this.mode = MODE_IMAGE;
super.startElement(, localName, qName, attributes);
}
else
{
throw new SAXException(Unknown start element  +
localName);
}
}


public void characters(char[] buffer, int start, int length)
throws SAXException
{
switch (this.mode)
{
case MODE_NONE : super.characters(buffer, start, length);
break;
case MODE_TITLE : this.articleTitle.append(buffer, start,
length);
break;
case MODE_TEXT : this.articleText.append(buffer, start, length

problem accessing attribute in xsl with cocoon

2003-08-14 Thread Miguel Carvalho
HI, i'm having a little trouble in putting a transformer in xsl to work with
cocoon.
The thing is, after i apply a java trasformer made by me i get the following
result in the view source of IE

!-- XML FRAGMENT --

document

contents

article layouttype=2 xpos=5 ypos=7 border=dotted

titleTitulo com rating 2/title

textTexto/text

/article

article layouttype=3 xpos=5 ypos=7 border=dotted

titleTitulo do artigo com rating igual a 1/title

texttexto do artigo com rating igual a 1/text

imageimg1.jpg/image

/article

article layouttype=4 xpos=5 ypos=7 border=dotted

titleTitulo do artigo com rating igual a 2/title

texttexto do artigo com rating igual a 2/text

imageimg1.jpg/image

/article

article layouttype=2 xpos=5 ypos=7 border=dotted

titleTitulo do artigo com rating igual a 2/title

texttexto do artigo com rating igual a 2/text

imageimg1.jpg/image

/article

/contents

/document


and this is good.

After this i want to apply another generator in xsl,


!-- XLS STYLESHEET daeTransformer2html.xsl --

?xml version=1.0 encoding=iso-8859-1?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0
xsl:output type=xml/

xsl:template match=/
xsl:apply-templates /
/xsl:template

xsl:template match=contents
HTML
HEAD
/HEAD
BODY
xsl:apply-templates select=[EMAIL PROTECTED]'2']/
/BODY
/HTML
/xsl:template

xsl:template match=article
article
xsl:value-of select=title/
xsl:value-of select=text/

img
xsl:attribute name=src
xsl:value-of select=image/
/xsl:attribute
/img

/xsl:template

/xsl:stylesheet

The sitemap defined is as follows

!-- SITEMAP --

map:match pattern=daestart
map:generate type=serverpages src=daexsps/start.xsp/
map:transform src=daestyles/removens.xsl/
map:transform type=dae/
map:transform src=daestyles/daeTransformer2html.xsl/
map:serialize type=html/
/map:match

and the answer sent to the browser is

!-- RESPONSE SENT TO BROWSER --
HTML
HEAD
META http-equiv=Content-Type content=text/html; charset=UTF-8
/HEAD
BODY/BODY
/HTML

wich is not right.
I tried to copy the first XML Fragment and put it in a file with the name
daexmltest.xml and apply the XSL referenced earlier (pipeline bellow)

!-- PIPELINE --
map:match pattern=daetest
map:generate src=daexmltest.xml/
 map:transform src=daestyles/daeTransformer2html.xsl/
map:serialize type=html/
/map:match

and the response to the browser was

HTML
HEAD
META http-equiv=Content-Type content=text/html; charset=UTF-8
/HEAD
BODY
article
Titulo com rating 2Textoimg src=
article
Titulo do artigo com rating igual a 2texto do artigo com rating
igual a 2img src=img1.jpg/BODY
/HTML

and this is rigth, because it accesses the attribute @layouttype and returns
only the article tags that has @layouttype=2


If you have any ideas , of how to handle this ...

Thanks in advance
Miguel Carvalho



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



XSL a processor hog?

2003-12-26 Thread Nuno Miguel Borges Leong
Hi, 

We have a web application using cocoon for presentation layer. I'm currently 
trying to optimise our XSL stylesheets since our initial results have shown it 
to be consuming too much processing time. Our pipeline structure consists in 
having a XSP generator (which uses SOAP requests to gather XML data) followed 
by 3-4 XSL transformations to process and transform it in HTML.

Our initial results sat somewhere between 1200-1500 ms for a single request 
(this is processing time for XSL only). I've since rebuild the XSL from 
scratch and i'm estimating 200-250ms for a single request. Still, i think this 
is too much. I'm finding XSL processing to be extremely slow (just copying the 
root element takes somewhere between 20-50 ms). Is this normal or i may doing 
something stupid ?

Using cocoon 2.1 over tomcat4.1.27 on a 2xP3-500 with 1Gb RAM. (CPU/memory 
never reaches 100% usage during tests. No swaps.). Using standard 
tomcat/cocoon configuration with Xalan XSLT processor.


Thanks
-- 
Nuno Leong
Práxia SI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



About DTDs, Mathematic expressions, PDF and HMTL

2004-09-28 Thread Joao Miguel Ferreira
Hello all,

I've just started with Cocoon and with XML. I'am really surprised with
the power of XML.

In the past I have written text documents in LaTeX that include some
simple math expressions and some images. Then I usually converted them
to PDF with pdflatex and to html with latex2html.

Now I want to do all of this in XML.

I also followed one tutorial about converting XML to PDF and HTML, with
cocoon... so I am already there.

Now I need to find some DTD (maybe DocBook, I don't know if it will
suite my needs) and some XSL's that support the math expressions and
some jpg's or gif's...

... one thing also: I would like to produce somewhat atractive
documents... may be some simple colors or some fancy design (like the
cocoon site, for example) automatically (without my interference)

Can anyone show me the way to start, or send me some working examples.

Thank you (sorry about the big text...)

João Ferreira




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Maybe of topic... about Forrest

2004-09-29 Thread Joao Miguel Ferreira
Hello all,

I'm sorry if this is not the right place...

... can anyone tell me if there is a mailing list for the Forrest
project ? where ?

where can I post some newbie questions about Forrest ?

Thank you. Sorry for the inconvenience...

jmf




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maybe of topic... about Forrest

2004-09-29 Thread Joao Miguel Ferreira
Rui,

Thanks,
Obrigado,

jmf




On Wed, 2004-09-29 at 13:38, Rui Alberto L. Gonçalves wrote:
 http://forrest.apache.org/mail-lists.html
 
 subscribe: [EMAIL PROTECTED]
 
 Rui
 
 On Wed, 2004-09-29 at 22:38, Joao Miguel Ferreira wrote:
  Hello all,
  
  I'm sorry if this is not the right place...
  
  ... can anyone tell me if there is a mailing list for the Forrest
  project ? where ?
  
  where can I post some newbie questions about Forrest ?
  
  Thank you. Sorry for the inconvenience...
  
  jmf
  
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem withs sessions running JSPs in COCOON (ver. 2.1.4)

2005-04-08 Thread Miguel Angel Marín Moreno
Hi all!
I have a problem with essions in cocoon. In my pipeline I execute a 
piece of code in JSP using CINCLUDE transformer. In this piece of code I 
load some values in the session which ones later I need to get with 
executing another JSP. (I can't use cocoon's sessions/context because I 
can't get its values from the JSP code)

In other words, I'll try to explain it better with the code (read the 
comments please)

this is my pipeline:
map:match pattern=Almacena.jsp
 map:generate type=request
  map:parameter name=generate-attributes value=true/
  /map:generate
!-- the pipeline starts with an XML which contains the REQUEST details --
!-- peticion.xsl is an XSLT that transform the XML to set the correct 
params to apply the CINCLUDE with the params that identify the URL of 
the JSP file that I want to execute --

   map:transform src=xsl/peticion.xsl
   map:parameter name=cms-url
 value=http://mmarin:8080/pruebasSesion/Ejemplos/
   map:parameter name=url-peticion value=AlmacenaSession.jsp/
   /map:transform
!-- I've thought in the posibility of passing the SessionID as a 
parameter to the JSP, but don't know how to set the sessionID in JSP. 
Any idea?--

!-- When I apply the Cinclude transformer, the JSP code RUNS WITH A 
DIFFERENT SESSION EACH TIME (that's my problem!) --

map:transform type=cinclude/
!-- As I am only proving the way of doing this, I'm using a very simple 
 JSP file which set the values of 2 params (nombre, edad) in the 
session and returns an XML file which will be transformed by the XSLT 
Almacena.xsl --

  map:transform src=xsl/Almacena.xsl/
 map:serialize type=html/
   /map:match
This is the piece of JSP code:
%@ page language=Java session=true%?xml version=1.0
encoding=ISO-8859-1?
%@ page import=java.util.* %
%!String nombre;
Integer edad;
String sessionId; %
 %nombre=request.getParameter(nombre);
edad=Integer.parseInt(request.getParameter(edad));
sessionId = session.getId();
session.setAttribute(nombre,nombre);
session.setAttribute(edad,edad);%
AlmacenaEnSession
nombre%=nombre%/nombre
edad%=edad%/edad
sessionID%=sessionId%/sessionID
/AlmacenaEnSession
I get the SessionID so I can prove that it's different of the one I have 
in the browser :((

Finally I try to recovery the info I've saved in the JSP session using 
another pipeline similar to this one which execute a JSP code too.
As the session in which the JSP runs is different each time I cannot get 
the values

Any idea?
Thanks in advance!!
Miguel Angel Marín
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Fwd: problem withs sessions running JSPs in COCOON (ver. 2.1.4)]

2005-04-11 Thread Miguel Angel Marín Moreno
any ideas?
Thanks again...
---BeginMessage---
Hi all!
I have a problem with essions in cocoon. In my pipeline I execute a 
piece of code in JSP using CINCLUDE transformer. In this piece of code I 
load some values in the session which ones later I need to get with 
executing another JSP. (I can't use cocoon's sessions/context because I 
can't get its values from the JSP code)

In other words, I'll try to explain it better with the code (read the 
comments please)

this is my pipeline:
map:match pattern=Almacena.jsp
 map:generate type=request
  map:parameter name=generate-attributes value=true/
  /map:generate
!-- the pipeline starts with an XML which contains the REQUEST details --
!-- peticion.xsl is an XSLT that transform the XML to set the correct 
params to apply the CINCLUDE with the params that identify the URL of 
the JSP file that I want to execute --

   map:transform src=xsl/peticion.xsl
   map:parameter name=cms-url
 value=http://mmarin:8080/pruebasSesion/Ejemplos/
   map:parameter name=url-peticion value=AlmacenaSession.jsp/
   /map:transform
!-- I've thought in the posibility of passing the SessionID as a 
parameter to the JSP, but don't know how to set the sessionID in JSP. 
Any idea?--

!-- When I apply the Cinclude transformer, the JSP code RUNS WITH A 
DIFFERENT SESSION EACH TIME (that's my problem!) --

map:transform type=cinclude/
!-- As I am only proving the way of doing this, I'm using a very simple 
 JSP file which set the values of 2 params (nombre, edad) in the 
session and returns an XML file which will be transformed by the XSLT 
Almacena.xsl --

  map:transform src=xsl/Almacena.xsl/
 map:serialize type=html/
   /map:match
This is the piece of JSP code:
%@ page language=Java session=true%?xml version=1.0
encoding=ISO-8859-1?
%@ page import=java.util.* %
%!String nombre;
Integer edad;
String sessionId; %
 %nombre=request.getParameter(nombre);
edad=Integer.parseInt(request.getParameter(edad));
sessionId = session.getId();
session.setAttribute(nombre,nombre);
session.setAttribute(edad,edad);%
AlmacenaEnSession
nombre%=nombre%/nombre
edad%=edad%/edad
sessionID%=sessionId%/sessionID
/AlmacenaEnSession
I get the SessionID so I can prove that it's different of the one I have 
in the browser :((

Finally I try to recovery the info I've saved in the JSP session using 
another pipeline similar to this one which execute a JSP code too.
As the session in which the JSP runs is different each time I cannot get 
the values

Any idea?
Thanks in advance!!
Miguel Angel Marín

---End Message---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Problem with PAths in JSPGenerator

2005-04-11 Thread Miguel Angel Marín Moreno
Hi you all!
I'm having a trouble with calling JSP files which aren't under cocoon's 
path. Is that a JSPGenerator's Bug?
(using cocoon 2.1.4)

When I execute a pipeline like this one:
   map:generate type=jsp src=jsp/AlmacenaSession2.jsp/
it's run OK, having the file AlmacenaSession2.jsp under the directory 
jsp in the sitemap's path.

The problem comes when I'm trying to execute a JSP file including it's 
entirely path, like the next line:

   map:generate type=jsp 
src=http://mmarin:8080/pruebasSesion/Ejemplos/AlmacenaSession2.jsp/

I obtain an 404 trying to execute this. It seems to be caused because of 
cocoon is searching the a file with a path like src-value in sitemap's 
path, don't know if I'm explainning at all...

Does anybody know how can I execute the JSP file from the complete-path?
Sorry about my english
thanks in advance!
Miguel Angel Marín
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Fwd: problem withs sessions running JSPs in COCOON (ver. 2.1.4)]

2005-04-13 Thread Miguel Angel Marín Moreno




Hi you all again!

I've moved to cocoon 2.1.7 and I persist trying to run up a JSP file
that uses the session information. Beginning with the idea that it's
the CINCLUDE TRANSFORMER the one who don't pass the session to the
called JSP file, I've tried to execute the file directly from the JSP
generator. That's the solution to my problems (I thought) because the
session is processed by the JSP... the problem now is that I NEED to
use the CINCLUDE transformer becasuse of the file I'm trying to execute
is "outside the servlet" and I get the exception:

 org.apache.cocoon.ProcessingException: You must not reference a file
outside of the servlet context at file:/C:/Archivos de programa/Apache
Software Foundation/Tomcat 5.0/webapps/cocoon/.

Does anybody knows a way of doing that? a walkarround to not to use the
cinclude or something like that?

Tanks a lot!!!

Miguel Angel Marn Moreno escribi:

  
  
  

  

Asunto:

[Fwd: problem withs sessions running JSPs in COCOON (ver. 2.1.4)]
  
  

    De: 
Miguel Angel Marn Moreno [EMAIL PROTECTED]
  
  

Fecha: 
Mon, 11 Apr 2005 10:05:46 +0200
  
  

Para: 
users@cocoon.apache.org
  

  
  

  

Para: 
users@cocoon.apache.org
  

  
  
any ideas?
  
  
Thanks again...
  
  
  
  

  

Asunto:

problem withs sessions running JSPs in COCOON (ver. 2.1.4)
  
  

    De: 
Miguel Angel Marn Moreno [EMAIL PROTECTED]
  
  

Fecha: 
Fri, 08 Apr 2005 11:21:00 +0200
  
  

Para: 
users@cocoon.apache.org
  

  
  

  

Para: 
users@cocoon.apache.org
  

  
  
Hi all!
  
  
I have a problem with essions in cocoon. In my pipeline I execute a
piece of code in JSP using CINCLUDE transformer. In this piece of code
I load some values in the session which ones later I need to get with
executing another JSP. (I can't use cocoon's sessions/context because I
can't get its values from the JSP code)
  
  
In other words, I'll try to explain it better with the code (read the
comments please)
  
  
this is my pipeline:
  
  
map:match pattern="Almacena.jsp"
  
 map:generate type="request"
  
 map:parameter name="generate-attributes" value="true"/
  
 /map:generate
  
  
!-- the pipeline starts with an XML which contains the REQUEST
details --
  
!-- peticion.xsl is an XSLT that transform the XML to set the
correct params to apply the CINCLUDE with the params that identify the
URL of the JSP file that I want to execute --
  
  
 map:transform src=""
  
 map:parameter name="cms-url"
  
value="http://mmarin:8080/pruebasSesion/Ejemplos"/
  
 map:parameter name="url-peticion"
value="AlmacenaSession.jsp"/
  
 /map:transform
  
  
!-- I've thought in the posibility of passing the SessionID as a
parameter to the JSP, but don't know how to "set the sessionID" in JSP.
Any idea?--
  
  
!-- When I apply the Cinclude transformer, the JSP code RUNS WITH A
DIFFERENT SESSION EACH TIME (that's my problem!) --
  
  
 map:transform type="cinclude"/
  
  
!-- As I am only proving the way of doing this, I'm using a very
simple JSP file which set the values of 2 params (nombre, edad) in the
session and returns an XML file which will be transformed by the XSLT
"Almacena.xsl" --
  
  
 map:transform src=""/
  
  
 map:serialize type="html"/
  
 /map:match
  
  
This is the piece of JSP code:
  
  
  %@ page language="Java"
session="true"%?xml version="1.0"

encoding="ISO-8859-1"?

%@ page import="java.util.*" %

%!String nombre;

 Integer edad;

 String sessionId; %

%nombre=request.getParameter("nombre");

 edad=Integer.parseInt(request.getParameter("edad"));

 sessionId = session.getId();

 session.setAttribute("nombre",nombre);

 session.setAttribute("edad",edad);%

 AlmacenaEnSession

 nombre%=nombre%/nombre

 edad%=edad%/edad

 sessionID%=sessionId%/sessionID

 /AlmacenaEnSession

  
  
I get the SessionID so I can prove that it's different of the one I
have in the browser :((
  
  
Finally I try to recovery the info I've saved in the JSP session using
another pipeline similar to this one which execute a JSP code too.
  
As the session in which the JSP runs is different each time I cannot
get the values
  
  
Any idea?
  
  
Thanks in advance!!
  
  
Miguel Angel Marn
  
  






Re: [Fwd: problem withs sessions running JSPs in COCOON (ver. 2.1.4)]

2005-04-13 Thread Miguel Angel Marín Moreno




NOdody ahs tried to call an external file

I need your help a lot...

Thanks again

Miguel Angel Marn Moreno escribi:

  
  
Hi you all again!
  
I've moved to cocoon 2.1.7 and I persist trying to run up a JSP file
that uses the session information. Beginning with the idea that it's
the CINCLUDE TRANSFORMER the one who don't pass the session to the
called JSP file, I've tried to execute the file directly from the JSP
generator. That's the solution to my problems (I thought) because the
session is processed by the JSP... the problem now is that I NEED to
use the CINCLUDE transformer becasuse of the file I'm trying to execute
is "outside the servlet" and I get the exception:

 org.apache.cocoon.ProcessingException: You must not reference a file
outside of the servlet context at file:/C:/Archivos
de programa/Apache
Software Foundation/Tomcat 5.0/webapps/cocoon/.
  
Does anybody knows a way of doing that? a walkarround to not to use the
cinclude or something like that?
  
Tanks a lot!!!
  
Miguel Angel Marn Moreno escribi:
  



  

  
  Asunto:
  
[Fwd: problem withs sessions running JSPs in COCOON (ver. 2.1.4)]


  
  De: 
Miguel Angel Marn Moreno [EMAIL PROTECTED]


  
  Fecha:
  
Mon, 11 Apr 2005 10:05:46 +0200


  
  Para:
  
  users@cocoon.apache.org

  


  

  
  Para:
  
  users@cocoon.apache.org

  


any ideas? 

Thanks again... 



  

  
  Asunto:
  
problem withs sessions running JSPs in COCOON (ver. 2.1.4)


  
  De: 
Miguel Angel Marn Moreno [EMAIL PROTECTED]


  
  Fecha:
  
Fri, 08 Apr 2005 11:21:00 +0200


  
  Para:
  
  users@cocoon.apache.org

  


  

  
  Para:
  
  users@cocoon.apache.org

  


Hi all! 

I have a problem with essions in cocoon. In my pipeline I execute a
piece of code in JSP using CINCLUDE transformer. In this piece of code
I load some values in the session which ones later I need to get with
executing another JSP. (I can't use cocoon's sessions/context because I
can't get its values from the JSP code) 

In other words, I'll try to explain it better with the code (read the
comments please) 

this is my pipeline: 

map:match pattern="Almacena.jsp" 
 map:generate type="request" 
 map:parameter name="generate-attributes" value="true"/ 
 /map:generate 

!-- the pipeline starts with an XML which contains the REQUEST
details -- 
!-- peticion.xsl is an XSLT that transform the XML to set the
correct params to apply the CINCLUDE with the params that identify the
URL of the JSP file that I want to execute -- 

 map:transform src="" 
 map:parameter name="cms-url" 
value="http://mmarin:8080/pruebasSesion/Ejemplos"/

 map:parameter name="url-peticion"
value="AlmacenaSession.jsp"/ 
 /map:transform 

!-- I've thought in the posibility of passing the SessionID as a
parameter to the JSP, but don't know how to "set the sessionID" in JSP.
Any idea?-- 

!-- When I apply the Cinclude transformer, the JSP code RUNS WITH A
DIFFERENT SESSION EACH TIME (that's my problem!) -- 

 map:transform type="cinclude"/ 

!-- As I am only proving the way of doing this, I'm using a very
simple JSP file which set the values of 2 params (nombre, edad) in the
session and returns an XML file which will be transformed by the XSLT
"Almacena.xsl" -- 

 map:transform src=""/ 

 map:serialize type="html"/ 
 /map:match 

This is the piece of JSP code: 

%@ page language="Java"
session="true"%?xml version="1.0" 
encoding="ISO-8859-1"? 
%@ page import="java.util.*" % 
%!String nombre; 
 Integer edad; 
 String sessionId; % 
%nombre=request.getParameter("nombre"); 
 edad=Integer.parseInt(request.getParameter("edad")); 
 sessionId = session.getId(); 
 session.setAttribute("nombre",nombre); 
 session.setAttribute("edad",edad);% 
 AlmacenaEnSession 
 nombre%=nombre%/nombre 
 edad%=edad%/edad 
 sessionID%=sessionId%/sessionID 
 /AlmacenaEnSession 


I get the SessionID so I can prove that it's different of the one I
have in the browser :(( 

Finally I try to recovery the info I've saved in the JSP session using
another pipeline similar to this one which execute a JSP code too. 
As the session in which the JSP runs is different each time I cannot
get the values 

Any idea? 

Thanks in advance!! 

Miguel Angel Marn 

  
  






Problems using Saxon

2006-09-07 Thread Jose Miguel Vieira








Hello,



Im trying to add saxon 8.8 to cocoon 2.1.9 installed
under tomcat 5.5. 



I followed the instruction in cocoon wiki (http://wiki.apache.org/cocoon/Saxon):

1. Copied saxon jar files into WEB-INF/lib



2. Added a new component to cocoon.xconf:

component
class=org.apache.cocoon.components.xslt.TraxProcessor
logger=core.xslt-processor


role=org.apache.excalibur.xml.xslt.XSLTProcessor/saxon

 parameter name=use-store
value=true /

 parameter name=transformer-factory
value=net.sf.saxon.TransformerFactoryImpl /

 /component



3. Added the transformer to the sitempap.xmap file:

map:transformer name=xslt-saxon
pool-grow=2 pool-max=32 pool-min=8
src="">


use-request-parametersfalse/use-request-parameters


use-browser-capabilities-dbfalse/use-browser-capabilities-db


xslt-processor-rolesaxon/xslt-processor-role

 /map:transformer



4. Restarted tomcat.



But when I try to access my application I get the following
error message (stacktrace included below):

java.lang.NullPointerException:



Cocoon stacktrace[hide]

Failed to process pipeline

file:/D:/develop/applications/apache/tomcat-5.5.17/webapps/cocoon/crsbi/sitemap.xmap
- 150:38 map:serialize type=html

file:/D:/develop/applications/apache/tomcat-5.5.17/webapps/cocoon/crsbi/sitemap.xmap
- 145:69 map:transform type=xslt-saxon

file:/D:/develop/applications/apache/tomcat-5.5.17/webapps/cocoon/sitemap.xmap
- 944:69 map:mount



Any ideas why this might be happening and possible
solutions?



Thanks in advance,

Miguel



-



Jose Miguel Vieira

Centre for Computing in the Humanities

King's College London

Kay House

7, Arundel Street

London WC2R 3DX



Email: [EMAIL PROTECTED]

Tel: +44 (0)20 78 4812 42

Fax: +44 (0)20 78 48 29 80







Java stacktrace[hide]

java.lang.NullPointerException at net.sf.saxon.expr.ComputedExpression.gatherSlotsUsed(ComputedExpression.java:531) at net.sf.saxon.expr.ComputedExpression.gatherSlotsUsed(ComputedExpression.java:543) at net.sf.saxon.expr.ComputedExpression.gatherSlotsUsed(ComputedExpression.java:543) at net.sf.saxon.expr.ComputedExpression.gatherSlotsUsed(ComputedExpression.java:543) at net.sf.saxon.expr.ComputedExpression.gatherSlotsUsed(ComputedExpression.java:543) at net.sf.saxon.expr.ComputedExpression.gatherSlotsUsed(ComputedExpression.java:543) at net.sf.saxon.expr.ComputedExpression.getSlotsUsed(ComputedExpression.java:517) at net.sf.saxon.value.Closure.make(Closure.java:96) at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:346) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:182) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:163) at net.sf.saxon.expr.ComputedExpression.effectiveBooleanValue(ComputedExpression.java:626) at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:325) at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:353) at net.sf.saxon.instruct.Instruction.process(Instruction.java:91) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:250) at net.sf.saxon.instruct.Instruction.process(Instruction.java:91) at net.sf.saxon.expr.LetExpression.process(LetExpression.java:221) at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:244) at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:353) at net.sf.saxon.instruct.Instruction.process(Instruction.java:91) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:250) at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:338) at net.sf.saxon.instruct.Instruction.process(Instruction.java:91) at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:244) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:99) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:319) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:149) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:250) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:152) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:99) at net.sf.saxon.instruct.Template.apply(Template.java:78) at net.sf.saxon.instruct.ApplyImports.processLeavingTail(ApplyImports.java:180) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:99) at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:319) at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189) at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:149) at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:250) at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:152) at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:99) at net.sf.saxon.instruct.Template.apply(Template.java:78) at net.sf.saxon.instruct.ApplyImports.processLeavingTail(ApplyImports.java:180) at net.sf.saxon.instruct.Template.app

Unsupported grammar language

2006-10-20 Thread José Miguel Vieira
Hello,I'm trying to use the validation report features, using a dtd for the validation.What is the correct grammar value for dtd validation? I'm using http://www.w3.org/TR/REC-xml but it returns an "Unsupported grammar language".Thanks,Miguel Vieira

Build properties, source.vm

2007-12-13 Thread José Miguel Vieira

Hi,

Can someone please explain what the source.vm property in  
build.properties should be. Should it be set accordingly to the JDK  
installed?


Thanks,
Miguel

---

José Miguel Vieira
Centre for Computing in the Humanities
King's College London
26 - 29 Drury Lane
WC2B 5RL London

Email: [EMAIL PROTECTED]
Tel: +44 (0)20 7848 1242
Faxl: +44 (0)20 7848 2980
http://www.kcl.ac.uk/cch/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Java security policy

2007-12-13 Thread José Miguel Vieira

Hello,

Does anybody have a working java security policy for cocoon 2.1.10 /  
tomcat 5.5 / java 1.5?


Thanks,
Miguel

---

José Miguel Vieira
Centre for Computing in the Humanities
King's College London
26 - 29 Drury Lane
WC2B 5RL London

Email: [EMAIL PROTECTED]
Tel: +44 (0)20 7848 1242
Faxl: +44 (0)20 7848 2980
http://www.kcl.ac.uk/cch/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hugo Marcelino - MultiValueField : Cocoon Forms in Cocoon 215

2004-06-03 Thread Hugo Miguel S. V. Marcelino
Hi users of cocoon:

My name is Hugo Marcelino and at the moment i'm buildinga portal with cocoon 2.1.5 and i come across with the following problem.

I have a coplet that contains the "new" cocoon forms ( once Woody) and in the form i use the multivaluefields that will became in twoboxs separated with buttons that transfer the selections made, form one to another box. I use the approach form1-action presented in the samples.

My problem is when i double click in one option that would change to another box, i get an error in the _javascript_. (options.length is null or not an object). This is ,so far, the only error that i get, because when i authenticate and the portal is loading the browser doesn't return any error i the coplet.

The coplet-base-data is URICoplet and i can´t change this.

somehow i believe that the problem is in the sitemap, so:

The structure is:

 +Portal
  +coplets
  +tab-Utilizadores
  +Forms
 +messages 
 +resources (*)

(*) this directory is exactly equal to the samples.

Pipeline:

map:componentsmap:transformers default="xalan"map:transformer name="i18n" src=""catalogues default="other"catalogue id="other" name="OtherMessages" location="messages"/catalogue id="forms" name="FormsMessages" location="messages"//cataloguescache-at-startuptrue/cache-at-startup/map:transformer/map:transformersmap:selectors default="browser"map:selector name="request-method" src=""//map:selectors/map:components

map:flow language="_javascript_"map:script src=""/map:script src=""/map:script src=""/map:script src=""//map:flow
map:match pattern="resources/**"map:read src=""//map:match
map:match pattern="form-*-*.template"map:generate src=""/map:transform type="forms"/map:transform type="i18n"/map:transform src="" map:parameter name="resources-uri" value="coplets/tab-Utilizadores/resources"//map:transformmap:serialize type="html"//map:match
Thanks in advance.

Hugo Marcelino
03-06-2004MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hugo Marcelino : Insert into DB HSQL

2004-08-04 Thread Hugo Miguel S. V. Marcelino
Hi users of cocoon !

My name is Hugo marcelino and i have the following problem.

I have a table that was created in HSQLDB with this script:

create table diagrams (id identity, name varchar, description varchar). 

With this script i have a table that is auto-incremented.

Now after i insert a new record into the table i need to now the value ofthe column idthat was caused by the insert.

How can i get the id of the insert ? Is it possible to get it?

I'm using logicsheet esql and cocoon-2.1.5.1.

Thanks in advance.

Hugo.

STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



oi

2009-01-27 Thread Hugo Miguel S. V. Marcelino

   oi
Caro amigo: 
Nós somos uma grosso produtos electrónicos. Nossos produtos s?o de alta 
qualidade e baixo pre?o. Se você quiser fazer neg 
ócio, nós podemos oferecer-lhe a mais razoável desconto para que você obtenha 
mais lucros. Estamos na expectativa para o seu 
negócio. 
 Por favor visite nosso website: http://www.newpw.com 
Servi?o on-line:MSN: new...@hotmail.comE-mail: newp...@yahoo.com 
   Olhando em frente ao seu contato e longa coopera??o com a gente!Nossos 
produtos, principalmente os telefones, PSP, display TV, notebook, vídeo, 
computadores, Mp4, GPS, xbox 360, cameras 
digitais e assim por diante. 
   Bem-vindo a visitar o nosso site!
_
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/photos.aspx