RE: Embedding SVG in PDF

2010-05-11 Thread Laurent Medioni
Hi,

You are probably trying to run an old fop on a java 6 ?

You may have to patch org.apache.fop.image.analyser.SVGReader to remove the 
silly import org.apache.batik.util.UnitProcessor.Context (non existing class, 
now blocking error with java 6…), or you may want to upgrade to fop 0.95.

Been there, done that…

Laurent

 



From: Joshua O'Brien [mailto:jobr...@imagineps.com] 
Sent: lundi, 10. mai 2010 23:36
To: 'users@cocoon.apache.org'
Subject: Embedding SVG in PDF

 

Hello, and thanks in advance for any help you can provide.  I am trying to 
embed (not rasterize) SVG in a PDF using Cocoon.  I have modified the 
application created here: http://cocoon.apache.org/2.2/1159_1_1.html, first to 
use the svg2jpeg serializer which works as it should and now I am trying to get 
it to embed the same svg into a pdf (so if the request is foo.jpg it gets 
rasterized, if the request is foo.pdf, it gets embedded).  I can successfully 
create the pdf here: http://cocoon.apache.org/2.2/1290_1_1.html but once I add 
SVG it breaks.  

 

I am running Cocoon 2.2 using Tomcat 6.0.26 on a Windows Server 2003 SP2 box.  
It’s a 2.93GHz Core2Duo with 4GB RAM. 

 

I’ve attached a log of the error, the sample .fo that I am trying to convert, 
and my sitemap, let me know if there is any more information that would be 
helpful.  In this setup pdfsample.fo goes in resources/COB-INF/fop.  

 

I ran across this: 
http://www.mail-archive.com/fop-u...@xml.apache.org/msg04734.html but it’s 
fairly old and I don’t see the WEB-INF folder that he is talking about.

 

Thanks,

Josh




• This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
  and delete the original.


Re: Very large Generator file

2010-05-11 Thread Huib Verweij
Hi Jeff,

You wrote: I guess I was under the impression that SAX based xsl transformers 
didn't use much memory regardless file size, but perhaps that's not true?

It's true. However, when you do a XSLT transformation the entire XML document 
needs to be available to the XSLT processor, because you can access any node in 
the document, e.g. /very/large/path/to/some/dark/corner/of/the/XML/node.

I'm not sure about your use-case so I don't know if it will help, but you could 
try using the MultiFragmentTraxTransformer from the cocooncomponents project on 
Google code. It reduces memory consumption drastically by allowing you to 
specify a fragment in the XML that you want transformed. If you have a very 
large document that looks like this:

root
   item/
   item/

item/
/root

and all you want to do is transform the item/ elements then the 
MultiFragmentTraxTransformer is your friend.

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



RE: Very large Generator file

2010-05-11 Thread Schmitz, Jeffrey A
Thanks Huib,
   I'm afraid my document is very interconnected.  I'm coming to realize that 
xslt has pretty much a hard limit on the size of files you can process with it, 
i.e. if it can't fit into memory and you need the full power of xslt you're 
pretty much out of luck.  What about going to a 64 bit machine and just 
allocating a huge amount of ram to Tomcat?  Can this been done with 
tomcat/cocoon?

 -Original Message-
 From: Huib Verweij [mailto:h...@home.nl]
 Sent: Tuesday, May 11, 2010 3:51 AM
 To: users@cocoon.apache.org
 Cc: Huib Verweij
 Subject: Re: Very large Generator file
 
 Hi Jeff,
 
 You wrote: I guess I was under the impression that SAX based xsl
 transformers didn't use much memory regardless file size, but perhaps
 that's not true?
 
 It's true. However, when you do a XSLT transformation the entire XML
 document needs to be available to the XSLT processor, because you can
 access any node in the document, e.g.
 /very/large/path/to/some/dark/corner/of/the/XML/node.
 
 I'm not sure about your use-case so I don't know if it will help, but
 you could try using the MultiFragmentTraxTransformer from the
 cocooncomponents project on Google code. It reduces memory consumption
 drastically by allowing you to specify a fragment in the XML that you
 want transformed. If you have a very large document that looks like
 this:
 
 root
item/
item/
 
 item/
 /root
 
 and all you want to do is transform the item/ elements then the
 MultiFragmentTraxTransformer is your friend.
 
 Huib.
 -
 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



Re: Very large Generator file

2010-05-11 Thread Mark H. Wood
On Tue, May 11, 2010 at 07:56:19AM -0500, Schmitz, Jeffrey A wrote:
 Thanks Huib,
I'm afraid my document is very interconnected.  I'm coming to realize that 
 xslt has pretty much a hard limit on the size of files you can process with 
 it, i.e. if it can't fit into memory and you need the full power of xslt 
 you're pretty much out of luck.  What about going to a 64 bit machine and 
 just allocating a huge amount of ram to Tomcat?  Can this been done with 
 tomcat/cocoon?

It can be done with a 64-bit JVM.  Tomcat won't know and neither will Cocoon.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Balance your desire for bells and whistles with the reality that only a 
little more than 2 percent of world population has broadband.
-- Ledford and Tyler, _Google Analytics 2.0_


pgpzEqtBX6xps.pgp
Description: PGP signature


Re: Very large Generator file

2010-05-11 Thread Steven D. Majewski


[1] You might look at using Joost/STX which does streaming transforms.
It's not XSLT -- it's an xslt-like transformation language designed  
for one pass processing,

so STXPath is more restricted than XPath.

http://joost.sourceforge.net/

We've used it within cocoon to extract data which is then may be  
transformed in a 2nd stage.
We've run into a few bugs, but we're not using the latest current  
version.
( I think there were some incompatibilities with the cocoon 2.1.* stx  
transformer and
  the newer joost libraries, but I haven't looked at this in quite a  
while. )



[2] I believe Saxon can do some transforms in a streaming mode. I  
think this extension
 requires one of the paid licensed versions of Saxon. I haven't tried  
this myself.


http://saxonica.blogharbor.com/blog/_archives/2006/7/4/2084120.html

-- Steve Majewski


On May 11, 2010, at 4:51 AM, Huib Verweij wrote:


Hi Jeff,

You wrote: I guess I was under the impression that SAX based xsl  
transformers didn't use much memory regardless file size, but  
perhaps that's not true?


It's true. However, when you do a XSLT transformation the entire XML  
document needs to be available to the XSLT processor, because you  
can access any node in the document, e.g. /very/large/path/to/some/ 
dark/corner/of/the/XML/node.


I'm not sure about your use-case so I don't know if it will help,  
but you could try using the MultiFragmentTraxTransformer from the  
cocooncomponents project on Google code. It reduces memory  
consumption drastically by allowing you to specify a fragment in the  
XML that you want transformed. If you have a very large document  
that looks like this:


root
  item/
  item/

   item/
/root

and all you want to do is transform the item/ elements then the  
MultiFragmentTraxTransformer is your friend.





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



How can I create a new browser window from flowscript?

2010-05-11 Thread Alberto Brosich


Hi,

I have to create a new window (tab or popup, it's the same) where to put 
results after the user submits a form (builded with cform and controlled 
by a flowscript).
The result is a page generated with a pipeline that I call now with 
cocoon.sendPage().

How can I achieve it?
I tried some tests with PopupWindow.js lib but it gives errors.

thanks in advance

Alberto

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



RE: How can I create a new browser window from flowscript?

2010-05-11 Thread Robby Pelssers
http://developer.yahoo.com/yui/container/

It's very simple to use but feel free to ask for some samples if you can't work 
your way around it.

Cheers,
Robby

-Original Message-
From: Alberto Brosich [mailto:abros...@ogs.trieste.it] 
Sent: Tuesday, May 11, 2010 4:28 PM
To: users@cocoon.apache.org
Subject: How can I create a new browser window from flowscript?


Hi,

I have to create a new window (tab or popup, it's the same) where to put 
results after the user submits a form (builded with cform and controlled 
by a flowscript).
The result is a page generated with a pipeline that I call now with 
cocoon.sendPage().
How can I achieve it?
I tried some tests with PopupWindow.js lib but it gives errors.

thanks in advance

Alberto

-
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



Re: How can I create a new browser window from flowscript?

2010-05-11 Thread Andre Juffer

On 05/11/2010 05:27 PM, Alberto Brosich wrote:


Hi,

I have to create a new window (tab or popup, it's the same) where to 
put results after the user submits a form (builded with cform and 
controlled by a flowscript).
The result is a page generated with a pipeline that I call now with 
cocoon.sendPage().

How can I achieve it?
I tried some tests with PopupWindow.js lib but it gives errors.


Flowscript runs on the server. You would need to accomplish this on the 
client, e.g. with the Dojo toolkit.




thanks in advance

Alberto

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




--
Andre H. Juffer  | Phone: +358-8-553 1161
Biocenter Oulu and   | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat   | WWW: www.strubiocat.oulu.fi
NordProt | WWW: www.nordprot.org
Triacle Biocomputing | WWW: www.triacle-bc.com


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



RE: How can I create a new browser window from flowscript?

2010-05-11 Thread Robby Pelssers
Andre is completely right by the way...

What you could do is make an asynchronous request posting the form data and 
create the popup on the fly on the client... 

Robby

-Original Message-
From: Andre Juffer [mailto:andre.juf...@oulu.fi] 
Sent: Tuesday, May 11, 2010 4:40 PM
To: users@cocoon.apache.org
Subject: Re: How can I create a new browser window from flowscript?

On 05/11/2010 05:27 PM, Alberto Brosich wrote:

 Hi,

 I have to create a new window (tab or popup, it's the same) where to 
 put results after the user submits a form (builded with cform and 
 controlled by a flowscript).
 The result is a page generated with a pipeline that I call now with 
 cocoon.sendPage().
 How can I achieve it?
 I tried some tests with PopupWindow.js lib but it gives errors.

Flowscript runs on the server. You would need to accomplish this on the 
client, e.g. with the Dojo toolkit.


 thanks in advance

 Alberto

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



-- 
Andre H. Juffer  | Phone: +358-8-553 1161
Biocenter Oulu and   | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juf...@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat   | WWW: www.strubiocat.oulu.fi
NordProt | WWW: www.nordprot.org
Triacle Biocomputing | WWW: www.triacle-bc.com


-
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



Re: How can I create a new browser window from flowscript?

2010-05-11 Thread Alberto Brosich

On 05/11/2010 04:46 PM, Robby Pelssers wrote:

Andre is completely right by the way...

What you could do is make an asynchronous request posting the form data and 
create the popup on the fly on the client...
   


Yes, but I tried to add an onclick attribute to the submit widget 
without success (with fd:attribute tag).

Any other way to do it?

A


Robby

-Original Message-
From: Andre Juffer [mailto:andre.juf...@oulu.fi]
Sent: Tuesday, May 11, 2010 4:40 PM
To: users@cocoon.apache.org
Subject: Re: How can I create a new browser window from flowscript?

On 05/11/2010 05:27 PM, Alberto Brosich wrote:
   

Hi,

I have to create a new window (tab or popup, it's the same) where to
put results after the user submits a form (builded with cform and
controlled by a flowscript).
The result is a page generated with a pipeline that I call now with
cocoon.sendPage().
How can I achieve it?
I tried some tests with PopupWindow.js lib but it gives errors.
 

Flowscript runs on the server. You would need to accomplish this on the
client, e.g. with the Dojo toolkit.

   

thanks in advance

Alberto

-
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



RE: How can I create a new browser window from flowscript?

2010-05-11 Thread Robby Pelssers
That's not the way to do this...

Just use an action instead of a form submit and add an event handler in your 
form definition...

I added some samples of a complex application I built so you can check some 
stuff out if you like.

Cheers,
Robby


 formdefinition -


?xml version=1.0 encoding=UTF-8?
fd:form id=objectsearcherForm 
xmlns:fd=http://apache.org/cocoon/forms/1.0#definition;
  fd:widgets
fd:action id=refresh
  fd:on-action
javascript
  var objectSearcher = 
event.getSource().getForm().getAttribute(objectSearcher);
  objectSearcher.refresh();
/javascript
  /fd:on-action
/fd:action
fd:action id=reset
  fd:on-action
javascript
  var objectSearcher = 
event.getSource().getForm().getAttribute(objectSearcher);
  objectSearcher.reset();
/javascript
  /fd:on-action
/fd:action
fd:repeater id=properties
  fd:widgets
fd:booleanfield id=showField
  fd:initial-valuefalse/fd:initial-value
/fd:booleanfield
fd:field id=propertyKey state=invisible
  fd:datatype base=string/  
/fd:field
fd:field id=propertyName state=output
  fd:datatype base=string/  
/fd:field
fd:field id=datatype state=output
  fd:datatype base=string/
/fd:field
fd:union id=datatype-union case=datatype
  fd:widgets
  
fd:group id=String
  fd:widgets
fd:field id=operator
  fd:datatype base=string/
  fd:selection-list
fd:item value=-- operator --/
fd:item 
value=EQUALSfd:label=/fd:label/fd:item
fd:item 
value=CONTAINSfd:labelcontains/fd:label/fd:item
fd:item value=IS_NULLfd:labelis 
null/fd:label/fd:item  
fd:item value=IS_EMPTYfd:labelis 
empty/fd:label/fd:item
fd:item value=INfd:labelin/fd:label/fd:item   


  /fd:selection-list
  fd:on-value-changed
javascript
  var objectSearcher = 
event.getSource().getForm().getAttribute(objectSearcher);
  objectSearcher.handleOperatorChangedEvent(event); 

/javascript
  /fd:on-value-changed
/fd:field  
fd:union id=operator-union case=operator
  fd:widgets
fd:group id=-- operator --/  
fd:group id=CONTAINS
  fd:widgets  
fd:field id=criterium1 required=true
  fd:datatype base=string/  

/fd:field
  /fd:widgets
/fd:group
fd:group id=EQUALS
  fd:widgets
fd:action id=lookup
  fd:on-action
javascript
  var objectSearcher = 
event.getSource().getForm().getAttribute(objectSearcher);
  objectSearcher.handleLookupClickEvent(event);
/javascript
  /fd:on-action
/fd:action
fd:field id=criterium1 required=true
  fd:datatype base=string/  

/fd:field
  /fd:widgets
/fd:group
fd:group id=IS_NULL/
fd:group id=IS_EMPTY/
fd:group id=IN
  fd:widgets
fd:multivaluefield id=criteria
  fd:datatype base=string/  
  
/fd:multivaluefield
  /fd:widgets
/fd:group 
   
  /fd:widgets
/fd:union
  /fd:widgets
/fd:group

fd:group id=Integer
  fd:widgets
fd:field id=operator
  fd:datatype base=string/
  fd:selection-list
fd:item value=-- operator --/
fd:item 
value=EQUALSfd:label=/fd:label/fd:item 
fd:item value=IS_NULLfd:labelis 
null/fd:label/fd:item  
fd:item 

Re: Understanding Cocoon 2.2 URL Request Handlers

2010-05-11 Thread Mark Diggory
Ok,

I have finally uncovered what is happening to cause error in loading
blocks and testing which lead to the previous error.  I've determined
that with the last release of the cocoon-servlet-service-impl (1.1.0
and 1.2.0), that something is just not right with the URL Protocol
Handler resolution in cocoon-jnet.  My solution has been to release
our own version of cocoon-servlet-service-impl with the necessary
fixes and no dependency on this jnet implementation.

However, now I have uncovered that when using Intellij IDEA, because
we are trying to execute blocks that are not packaged in jars, we get
the following error. Can anyone recommend a solution that will allow
blocks to be executed when working with unpackaged maven
target/classes directories such as those in IDEA and Eclipse?  Ideally
it would be great to not have to have everything packaged up into jars
to test/debug the webapplication, this defeats the point of using a
debugging IDE.

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.cocoon.spring.configurator.BlockResourcesHolder':
Invocation of init method failed; nested exception is
java.lang.NullPointerException
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

Mark


On Sat, May 8, 2010 at 4:01 PM, Mark Diggory mdigg...@gmail.com wrote:
 Likewise,

 I'd like to get advice on the following... Which SitemapServlet should
 we be using in Cocoon 2.2?

 http://cocoon.apache.org/2.2/core-modules/core/2.2/apidocs/org/apache/cocoon/servlet/SitemapServlet.html

 or

 http://cocoon.apache.org/2.2/core-modules/core/2.2/apidocs/org/apache/cocoon/sitemap/SitemapServlet.html

 Mark

 On Sat, May 8, 2010 at 3:37 PM, Mark Diggory mdigg...@gmail.com wrote:
 Cocoon Developers,

 We continue to have problems utilizing the Cocoon 2.2 block
 capabilities dues to not being able to resolve cocoon request handlers
 where necessary.  Could someone please be so kind as to clarify where
 the following request handlers are defined and how to configure them
 appropriately now that there is no cocoon.xconf?

 When we try to enable using cocoon blocks by adding the the cocoon
 maven plugin to maven and defining our rcl.properties we get the
 following type of error:

 ava.net.MalformedURLException: unknown protocol: resource
        at java.net.URL.init(URL.java:574)
        at java.net.URL.init(URL.java:464)
        at java.net.URL.init(URL.java:413)
        at 
 org.apache.cocoon.core.container.spring.avalon.SourceResource.getURL(SourceResource.java:97)
        at 
 org.apache.cocoon.core.container.spring.avalon.ConfigurationReader.convertSitemap(ConfigurationReader.java:263)
        at 
 org.apache.cocoon.core.container.spring.avalon.ConfigurationReader.readSitemap(ConfigurationReader.java:104)
        at 
 org.apache.cocoon.core.container.spring.avalon.SitemapElementParser.readConfiguration(SitemapElementParser.java:99)
        at 
 org.apache.cocoon.core.container.spring.avalon.BridgeElementParser.parse(BridgeElementParser.java:78)
        at 
 org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)

 or in another place...

 Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
 Unable to read Avalon configuration from 'sitemap.xmap'.; nested
 exception is java.net.MalformedURLException: unknown protocol:
 resource
        at 
 org.apache.cocoon.core.container.spring.avalon.BridgeElementParser.parse(BridgeElementParser.java:86)
        at 
 org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
        at 
 org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
        at 
 org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
        at