Re: map:aggregate / map:part does only work with XML files?
on Mon, 01 Sep 2003 13:37:20 -0700 Miles Elam [EMAIL PROTECTED] wrote: Also, something like map:aggregate map:generate type=file src=foo.xml/ map:generate type=directory src=foo// map:generate type=custom src=bar/ /map:aggregate looks a bit odd to me. Then again, that may simply be because I'm not used to it. It would definitely require some retooling of the pipeline code to accommodate. This looks odd, but think os using two generators of the same type used on different source or used on the same source but with different parameters; aggregator's params allow you to make output looking like directly from generator. whatever/ It just so happens that the developers have been talking about doing away with resources in favor of pipeline fragments. The thread appears to be missing(!?!) on marc.theaimsgroup.com. However, in the real-time.com archives, you can find Stefano's proposal and resulting thread of discussion (http://archives.real-time.com/pipermail/cocoon-devel/2003-August/018 386.html). Couldn't open the url nor find the result (big tree thread), but after reading the first paragraph of the Stefano's proposal I think VPC could resolve problems I mentioned. But the same point applies to aggegated generators too I guess. Virtual Pipeline Componets + aggregator taking any generator would made aggregating resources problem nonexisted. BTW about=map:resource map:resource really looks like map:match with literal pattern (no special chars) that ends with xml serializer and is putted in internal pipeline, ie. resource looks like pipeline part and AFAIR docs doesn't say it's not. Considering this, map:resource looks like component intended for sitemap modularisation, and internal pipelines looks like workaround for use with aggregators. IMO simplest workaround for this would be special protocol for map:resources (probably outdated by virtual pipeline components). /BTW I think that's all. Regards, Rufio -- nmap -sS -O -p80,81 www.microsoft.com [..] Running: Linux 2.5.X OS details: Linux Kernel 2.4.18 - 2.5.70 (X86) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NEWBIE: Using request-scope XML doc as generator source?
Hi all, I have a Tomcat/Struts web app using JSP that Im trying to convert to Cocoon. I have it working with the action classes writing temp XML files to disk and Cocoons file generator using the temp files for the XSLT transform, clearly not a very scalable setup. Is it possible to configure Cocoon to use a JDOM document stored as a request or session attribute as the generator XML source? Or perhaps some other alternative? Thanks very much for any hints! David Benoff --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
RE: NEWBIE: Using request-scope XML doc as generator source?
What are you starting from? In my case we are using EJBs that return Transfer Objects. I have written a generic BeanGenerator that uses Betwixt to convert the Transfer Objects directly into SAX events. Ralph -Original Message-From: David Benoff [mailto:[EMAIL PROTECTED]Sent: Monday, September 01, 2003 6:23 PMTo: [EMAIL PROTECTED]Subject: NEWBIE: Using request-scope XML doc as generator source? Hi all, I have a Tomcat/Struts web app using JSP that Im trying to convert to Cocoon. I have it working with the action classes writing temp XML files to disk and Cocoons file generator using the temp files for the XSLT transform, clearly not a very scalable setup. Is it possible to configure Cocoon to use a JDOM document stored as a request or session attribute as the generator XML source? Or perhaps some other alternative? Thanks very much for any hints! David Benoff ---Outgoing mail is certified Virus Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
RE: tescase avalon component in cocoon
Try extending Cocoon's AbstractCompositeTestCase. It sets up mock objects and is set up to test generators, transformers and serializers. You can configure basic components and test them as well. The only thing I haven't figured out how to test with it is an input module. Ralph -Original Message-From: Nicolas Maisonneuve [mailto:[EMAIL PROTECTED]Sent: Monday, September 01, 2003 2:24 PMTo: cocoon userSubject: tescase avalon component in cocoon hy, i would like use the Excalibur Testcase for test my avalon component in cocoon but i don't know how do ? i tried with this code but my component use contextualize method and there is a contextException because the context object isnota cocoon context note : i have not experience in TestCase.. my code : public class TestIndexComponentImpl extends ExcaliburTestCase { public TestIndexComponentImpl(String name) { super(name); } protected void setUp() throws Exception { super.setUp(); FileInputStream reader=new FileInputStream("d://testcase.xml"); this.prepare(reader); } protected void tearDown() throws Exception { super.tearDown(); } public void testAnalyzer() { try { AnalyzerManager manager = (AnalyzerManager)this.lookup(AnalyzerManager.ROLE); } catch (ComponentException ex) { ex.printStackTrace(); } this.assertNotNull(manager); }
RE: tescase avalon component in cocoon
Oops. AbstractCompositeTestCase is set up to test generators, transformers and actions. -Original Message-From: Ralph Goers Sent: Monday, September 01, 2003 11:56 PMTo: '[EMAIL PROTECTED]'Subject: RE: tescase avalon component in cocoon Try extending Cocoon's AbstractCompositeTestCase. It sets up mock objects and is set up to test generators, transformers and serializers. You can configure basic components and test them as well. The only thing I haven't figured out how to test with it is an input module. Ralph -Original Message-From: Nicolas Maisonneuve [mailto:[EMAIL PROTECTED]Sent: Monday, September 01, 2003 2:24 PMTo: cocoon userSubject: tescase avalon component in cocoon hy, i would like use the Excalibur Testcase for test my avalon component in cocoon but i don't know how do ? i tried with this code but my component use contextualize method and there is a contextException because the context object isnota cocoon context note : i have not experience in TestCase.. my code : public class TestIndexComponentImpl extends ExcaliburTestCase { public TestIndexComponentImpl(String name) { super(name); } protected void setUp() throws Exception { super.setUp(); FileInputStream reader=new FileInputStream("d://testcase.xml"); this.prepare(reader); } protected void tearDown() throws Exception { super.tearDown(); } public void testAnalyzer() { try { AnalyzerManager manager = (AnalyzerManager)this.lookup(AnalyzerManager.ROLE); } catch (ComponentException ex) { ex.printStackTrace(); } this.assertNotNull(manager); }
Re: Mysql i Cocoon 2.1
On Mon, 1 Sep 2003, Marcin Stefaniuk wrote: Hello! I have problem with connection to mysql. Sample for hsqldb works ok. I installed mysql_connector_java_3.0.8-stable.jar from mysql.com in WEB-INF. I checked that I have excalibur-datasource-1.1.1.jar I put entry in web.xml: init-param param-nameload-class/param-name param-valuecom.mysql.jdbc.Driver/param-value param-value !-- For parent ComponentManager sample: org.apache.cocoon.samples.parentcm.Configurator -- !-- For IBM WebSphere: com.ibm.servlet.classloader.Handler -- !-- For Database Driver: -- org.hsqldb.jdbcDriver /param-value /init-param my entry in web.xml init-param param-nameload-class/param-name param-value org.hsqldb.jdbcDriver !-- mysql -- org.gjt.mm.mysql.Driver /param-value /init-param -- stavros I extended datasource: datasources jdbc logger=core.datasources.personnel name=personnel pool-controller max=10 min=5/ auto-commitfalse/auto-commit dburljdbc:hsqldb:hsql://localhost:9002/dburl usersa/user password/ /jdbc jdbc logger=core.datasources.test name=test pool-controller max=10 min=5/ dburljdbc:mysql://host.pl:3306/vshopTest/dburl usersuperReader/user passwordtest/password /jdbc /datasources I added to sitemap (in main context): map:match pattern=sqltest map:generate src=sql/test.xsql/ map:transform type=sql map:parameter name=use-connection value=personnel/ /map:transform map:transform src=samples/databases/stylesheets/sql2html.xsl map:parameter name=servletPath value={request:servletPath}/ map:parameter name=sitemapURI value={request:sitemapURI}/ map:parameter name=contextPath value={request:contextPath}/ map:parameter name=file value=.xsql/ /map:transform map:serialize/ /map:match But I receive Failed to obtain connection. Made 5 attempts with 5000ms interval In core.log it shows: WARN(2003-09-01) 20:50.21:019 [core.datasources.test] (/cocoon/sqltest) Thread-66/ResourceLimitingJdbcDataSource: Could not return Connection java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(DriverManager.java:532) at java.sql.DriverManager.getConnection(DriverManager.java:171) at org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(Jdb cConnectionFactory.java:185) at org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLi mitingPool.java:672) at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.newPoolable(V alidatedResourceLimitingPool.java:178) at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.ne wPoolable(ResourceLimitingJdbcConnectionPool.java:123) at org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPo ol.java:402) at org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(Validated ResourceLimitingPool.java:130) at org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getCon nection(ResourceLimitingJdbcDataSource.java:222) at org.apache.cocoon.transformation.SQLTransformer$Query.getConnection(SQLTrans former.java:988) at org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer .java:1061) at org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer. java:309) at org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTr ansformer.java:466) at org.apache.cocoon.transformation.SQLTransformer.endTransformingElement(SQLTr ansformer.java:747) at org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractS AXTransformer.java:358) at org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeePipe.java:124) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:137) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:110) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline .processXMLPipeline(AbstractCachingProcessingPipeline.java:270) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs tractProcessingPipeline.java:492) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri alizeNode.java:150) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok e(PreparableMatchNode.java:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:108) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel ineNode.java:164) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo keNodes(AbstractParentProcessingNode.java:108) at
RE: XMLForm Deprecated?
I think about XForm compliance because it's difficult with XMLForm to have a pretty GUI for users. You have to add lot of things and Javascript code in the stylesheet to improve the presentation. It's lot of work and the XSLT language isn't very easy. And it's not very reusable. Do you think that JXForm is better for this point? Regards Sylvain T -Message d'origine- De: Sylvain Wallez [mailto:[EMAIL PROTECTED] Date: lundi, 1. septembre 2003 17:31 À: [EMAIL PROTECTED] Objet: Re: XMLForm Deprecated? [EMAIL PROTECTED] wrote: Hello, You're right, deprecated doesn't mean deleted. But I'm not really happy because XMLForm doesn't support all the XForm stuffs. And JXForm? XForms compliance is not a goal and is IMO very difficult to achieve on the server side, the XForms specification being intrinsically client-side. For example, it defines a lot of event handlers whose implementation server-side would require a lot of frequent interactions on the server (think one request a each mouse click in the screen). For a more in-depth analysis on this, you can read my post comparing Woody and XMLForm ([1]) which started the current work on Woody : [1] http://marc.theaimsgroup.com/?l=xml-cocoon-devm=105881304808076w=2 Do you have some information about differences between XMLForm and JXForm and how to migrate? IIRC this is mainly a rewrite of the transformer which is faster and updated to the latest XForms element names. The main work should be related to this update of element names. But I'm not the most qualified person to answer this question and there maybe other people that already did this migration. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com - 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]
XMLForm to JXForm migration
Hello, I'm looking for information how to migrate my XMLForm applications to JXForm. What to change, what are the same, ... Who have some experience about that? Thanks Sylvain T - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getting parameters from the sitemap for my own transformer
Hello, i have written a transformer which is needed for my project. This transformer has to work in two modes which should be specified by a parameter passed in the sitemap: -- this is what i wrote in my sitemap -- map:transformer name=acltransformer src= com.daimlerchrysler.mediathek.acl.ACLTransformer /map:transformer ... map:transform type=acltransformer map:parameter name=ignore_type value=true/ /map:transform -- this is what i wrote in my transformer -- public class ACLTransformer extends AbstractSAXTransformer implements Parameterizable, Poolable { ... public void parameterize(Parameters parameters) throws ParameterException { this.ignore_type = parameters.getParameterAsBoolean(ignore_type, false); } The value of my Boolean variable ignore_type is set to false, which means that the parameter from the sitemap couldn' t be passed to my class. I think the way I use the interface Parameterizable is correct and i' d like to know if i have to do further modifications to my sitemap or perhaps to the cocoon.xconf file. Thank you for your help. Gregor Bertrand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tescase avalon component in cocoon
i find a solution add this parameters in the testcase configuration file context entry name="environment-context" class="org.apache.cocoon.environment.mock.MockContext"//context Actually i use the contextfor the getRealPath method but in MockContext , this method return the input path parameter.. there is a addContext method in Excalibur TestCase, but i don't know how it work (i try to use but no success with this sample DefaultContext avalonContext = new DefaultContext(); avalonContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, new MockContext()); this.addContext(avalonContext); FileInputStream reader = new FileInputStream("d:\\testcase.xml"); this.prepare(reader); ) the Ideal will be to create a MockContext Object set The root path ( no possible in this version ) void setRootPath (String root) { this.root=root; } void getRealPath(String path) { return root+path; } and use the addContext method Excalibur TestCase - Original Message - From: Ralph Goers To: '[EMAIL PROTECTED]' Sent: Tuesday, September 02, 2003 8:59 AM Subject: RE: tescase avalon component in cocoon Oops. AbstractCompositeTestCase is set up to test generators, transformers and actions. -Original Message-From: Ralph Goers Sent: Monday, September 01, 2003 11:56 PMTo: '[EMAIL PROTECTED]'Subject: RE: tescase avalon component in cocoon Try extending Cocoon's AbstractCompositeTestCase. It sets up mock objects and is set up to test generators, transformers and serializers. You can configure basic components and test them as well. The only thing I haven't figured out how to test with it is an input module. Ralph -Original Message-From: Nicolas Maisonneuve [mailto:[EMAIL PROTECTED]Sent: Monday, September 01, 2003 2:24 PMTo: cocoon userSubject: tescase avalon component in cocoon hy, i would like use the Excalibur Testcase for test my avalon component in cocoon but i don't know how do ? i tried with this code but my component use contextualize method and there is a contextException because the context object isnota cocoon context note : i have not experience in TestCase.. my code : public class TestIndexComponentImpl extends ExcaliburTestCase { public TestIndexComponentImpl(String name) { super(name); } protected void setUp() throws Exception { super.setUp(); FileInputStream reader=new FileInputStream("d://testcase.xml"); this.prepare(reader); } protected void tearDown() throws Exception { super.tearDown(); } public void testAnalyzer() { try { AnalyzerManager manager = (AnalyzerManager)this.lookup(AnalyzerManager.ROLE); } catch (ComponentException ex) { ex.printStackTrace(); } this.assertNotNull(manager); }
RE: thread safety of cocoon
From: Jorg Heymans Ok now I'm confused again :) Say I have my transformer with following code (hope the indentation stays) MyTransformer extends AbstractDOMTransformer implements LogEnabled, Cacheable { //instance variable private StringBuffer sb; public void transform{ /// } public void startDocument ... { sb=new StringBuffer(); } public void startElement(...) ...{ //add certain elements to our stringbuffer } public void endDocument ... { //process stringbuffer sb.append(...); sb.replace(); sb = null; } } Can my stringbuffer be overwritten by the second request during processing of the first request if two near concurrent requests hit the same pipeline? No, a transformer is a pooled component. During pipeline execution it is taken from the pool, used and then returned to the pool. You only have to be sure that you reset all your instance variables in the recyle() method because otherwise a following pipeline that gets the transformer again from the pool will find a prefilled variable. HTH Reinhard Sorry to drill down into this but I need to be sure. Thanks Jorg -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED] Sent: Montag, 1. September 2003 21:06 To: [EMAIL PROTECTED] Subject: Re: thread safety of cocoon Upayavira wrote: Jorg Heymans wrote: Say i write my own transformer (or serializer, or generator doesn't matter), Transformers, in particular, can not be threadsafe. They are all Recyclable. This is due Transformer interface design (setContentHandler method in AbstractXMLProducer.java). Vadim is it true then that a new instance of my custom class is created each time it is executed in a pipeline? (uncached) My code relies on a few instance variables (simple ones like Logger but also more crucial ones like StringBuffers for SAX parsing ), I'ld really hate to find out now that instance variables aren't thread safe in cocoon. AFAIU, you need to make your component implement ThreadSafe for it to be shared across threads. The default is that a new component is created for each invocation. Regards, Upayavira - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: Incremental Processing in Cocoon 2.1
-Ursprüngliche Nachricht- Von: Bruno Dumon [mailto:[EMAIL PROTECTED] Gesendet: Montag, 1. September 2003 17:58 An: [EMAIL PROTECTED] Betreff: Re: AW: AW: Incremental Processing in Cocoon 2.1 On Mon, 2003-09-01 at 16:23, Hauke Ernst wrote: On Mon, 2003-09-01 at 14:04, Hauke Ernst wrote: Hello, yes, this is how it worked for 2.0.3. The problem only occurs with 2.1. My configuration in cocoon.xconf is xslt-processor logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=true/ /xslt-processor !--+ | Xalan XSLT Processor +-- component class=org.apache.excalibur.xml.xslt.XSLTProcessorImpl logger=core.xslt-processor role=org.apache.excalibur.xml.xslt.XSLTProcessor/xalan parameter name=use-store value=true/ parameter name=incremental-processing value=true/ parameter name=transformer-factory value=org.apache.xalan.processor.TransformerFactoryImpl/ /component Unfortunately, this does not lead to a streamed output. - How can you be so sure? One of my test-transformations applied on a huge dataset takes between 1 and minutes. In cocoon 2.0.3, I can see that the output is delivered immediately, in 2.1 the output starts to appear on the screen after 1-2 minutes. The pipeline is map:match pattern=renderhierarchicalfiletoc_xalan.xml map:generate src=Testfiles/hierarchicalTOC.xml/ map:transform type=xalan src=stylesheets/toc_fromhierarchicaltoc2.xsl/ map:serialize encoding=UTF-8 type=html/ BTW, that encoding attribute doesn't exist. /map:match There is no sorting in the transformation which could prevent it from streaming. ok, you might be right, though AFAIK nothing changed in Cocoon that should prevent this behaviour. To be absolutely sure that it's Cocoon who doesn't set the incremental-processing parameter, could you try out using the attached transformer? It prints the name of the current thread to standard output. If you put one such transformer right before and one right after your XSLT transform, it should print out two different names. If you need more instructions on how to do this, just let me know. Thanx for your help. That transformation prints Thread = Thread-13 Thread = Thread-22 Greetings, Hauke Ernst -- 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]
AW: AW: AW: Incremental Processing in Cocoon 2.1
-Ursprüngliche Nachricht- Von: Bruno Dumon [mailto:[EMAIL PROTECTED] Gesendet: Montag, 1. September 2003 19:21 An: [EMAIL PROTECTED] Betreff: Re: AW: AW: Incremental Processing in Cocoon 2.1 On Mon, 2003-09-01 at 17:57, Bruno Dumon wrote: On Mon, 2003-09-01 at 16:23, Hauke Ernst wrote: On Mon, 2003-09-01 at 14:04, Hauke Ernst wrote: Hello, yes, this is how it worked for 2.0.3. The problem only occurs with 2.1. My configuration in cocoon.xconf is xslt-processor logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=true/ /xslt-processor !--+ | Xalan XSLT Processor +-- component class=org.apache.excalibur.xml.xslt.XSLTProcessorImpl logger=core.xslt-processor role=org.apache.excalibur.xml.xslt.XSLTProcessor/xalan parameter name=use-store value=true/ parameter name=incremental-processing value=true/ parameter name=transformer-factory value=org.apache.xalan.processor.TransformerFactoryImpl/ /component Unfortunately, this does not lead to a streamed output. - How can you be so sure? One of my test-transformations applied on a huge dataset takes between 1 and minutes. In cocoon 2.0.3, I can see that the output is delivered immediately, in 2.1 the output starts to appear on the screen after 1- 2 minutes. The pipeline is map:match pattern=renderhierarchicalfiletoc_xalan.xml map:generate src=Testfiles/hierarchicalTOC.xml/ map:transform type=xalan src=stylesheets/toc_fromhierarchicaltoc2.xsl/ map:serialize encoding=UTF-8 type=html/ BTW, that encoding attribute doesn't exist. /map:match There is no sorting in the transformation which could prevent it from streaming. ok, you might be right, though AFAIK nothing changed in Cocoon that should prevent this behaviour. To be absolutely sure that it's Cocoon who doesn't set the incremental-processing parameter, could you try out using the attached transformer? It prints the name of the current thread to standard output. If you put one such transformer right before and one right after your XSLT transform, it should print out two different names. Since I had that class lying around anyway, I thought I might as well check myself, and for me it works, it prints out something like this: Thread = PoolThread-4 Thread = Thread-16 I'm using the same changes to cocoon.xconf like you. Maybe the fact that you're seeing other behaviour is caused by a change in Xalan, or by an increased buffer size somewhere (less likely I think). Maybe try using Xalan 2.5.1 with Cocoon 2.0 to see what that gives. I tried Xalan 2.5.1 with cocoon 2.0.3. It still streamed as expected. Here is my 2.1 configuration: - checkEnvironmentExtension - EnvironmentCheck version=$Revision: 1.20 $ - environment item key=version.DOM.draftlevel2.0fd/item item key=java.class.pathC:\j2sdk1.4.2_01\lib\tools.jar;C:\Programme\jakarta-tomcat-5.0.5_exist_0.9.2\bin\bootstrap.jar/item item key=version.JAXP1.1 or higher/item item key=java.ext.dirsC:\j2sdk1.4.2_01\jre\lib\ext/item foundJar desc=apis.jar-apparent.version name=xmlxml-apis.jar present-unknown-version/foundJar foundJar desc=apis.jar-path name=xmlC:\Programme\jakarta-tomcat-5.0.5_exist_0.9.2\common\endorsed\xml-apis.jar/foundJar item key=version.xerces2Xerces-J 2.4.0/item item key=version.xerces1not-present/item item key=version.xalan2_2Xalan Java 2.5.1/item item key=version.xalan1not-present/item item key=version.antApache Ant version 1.5.3 compiled on April 16 2003/item item key=java.version1.4.2/item item key=version.DOM2.0/item item key=version.crimsonpresent-unknown-version/item item key=sun.boot.class.pathC:\Programme\jakarta-tomcat-5.0.5_exist_0.9.2\common\endorsed\xalan-2.5.1.jar;C:\Programme\jakarta-tomcat-5.0.5_exist_0.9.2\common\endorsed\xercesImpl-2.4.0.jar;C:\Programme\jakarta-tomcat-5.0.5_exist_0.9.2\common\endorsed\xml-apis.jar;C:\j2sdk1.4.2_01\jre\lib\rt.jar;C:\j2sdk1.4.2_01\jre\lib\i18n.jar;C:\j2sdk1.4.2_01\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_01\jre\lib\jsse.jar;C:\j2sdk1.4.2_01\jre\lib\jce.jar;C:\j2sdk1.4.2_01\jre\lib\charsets.jar;C:\j2sdk1.4.2_01\jre\classes/item item key=version.SAX2.0/item item key=version.xalan2xXalan Java 2.5.1/item /environment status result=OK / /EnvironmentCheck /checkEnvironmentExtension Regards, Hauke Ernst -- 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]
Flow: creating an object inside the flowscript is always NativeJavaObject?and can't be casted back?
Hello there, Creating an object inside the flow script always has the type org.mozilla.javascript.NativeJavaObject ? Something like : var x = new AnyKindOfObject(); Then how can I cast this org.mozilla.javascript.NativeJavaObject to the original type, to use in XSP for example, it throws a CastException ! I'm using the cocoon-2.1 cvs Thanks Ramy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
list of all built-in variables
Hi, I'm looking for a list of built-in variables lie ${context-root} or {request:contextPath} ... when something like this is available.. Thanks Rgds, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Flow: creating an object inside the flowscript is always NativeJavaObject?and can't be casted back?
Hi, Now I found a unwrap() on the NativeJavaObject, that returns the right object. Is that the right way of doing such stuff, or I'm missing something? Thanks Ramy Ramy Mamdouh wrote: Hello there, Creating an object inside the flow script always has the type org.mozilla.javascript.NativeJavaObject ? Something like : var x = new AnyKindOfObject(); Then how can I cast this org.mozilla.javascript.NativeJavaObject to the original type, to use in XSP for example, it throws a CastException ! I'm using the cocoon-2.1 cvs Thanks Ramy - 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]
[HELP]No pipeline matched request: Gla/shop/shopForm
Description:org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: Gla/shop/shopForm
RE: [HELP]No pipeline matched request: Gla/shop/shopForm
I don't think questioning this way will lead to success. Please try to be more specific and don't use HTML mails. Cheers, Reinhard -Original Message- From: Zerrouka Abdesselam [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 2:55 PM To: [EMAIL PROTECTED] Subject: [HELP]No pipeline matched request: Gla/shop/shopForm Description:org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: Gla/shop/shopForm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: AW: Incremental Processing in Cocoon 2.1
On Tue, 2003-09-02 at 13:44, Hauke Ernst wrote: -Ursprüngliche Nachricht- Von: Bruno Dumon [mailto:[EMAIL PROTECTED] Gesendet: Montag, 1. September 2003 17:58 An: [EMAIL PROTECTED] Betreff: Re: AW: AW: Incremental Processing in Cocoon 2.1 On Mon, 2003-09-01 at 16:23, Hauke Ernst wrote: On Mon, 2003-09-01 at 14:04, Hauke Ernst wrote: Hello, yes, this is how it worked for 2.0.3. The problem only occurs with 2.1. My configuration in cocoon.xconf is xslt-processor logger=core.xslt-processor parameter name=use-store value=true/ parameter name=incremental-processing value=true/ /xslt-processor !--+ | Xalan XSLT Processor +-- component class=org.apache.excalibur.xml.xslt.XSLTProcessorImpl logger=core.xslt-processor role=org.apache.excalibur.xml.xslt.XSLTProcessor/xalan parameter name=use-store value=true/ parameter name=incremental-processing value=true/ parameter name=transformer-factory value=org.apache.xalan.processor.TransformerFactoryImpl/ /component Unfortunately, this does not lead to a streamed output. - How can you be so sure? One of my test-transformations applied on a huge dataset takes between 1 and minutes. In cocoon 2.0.3, I can see that the output is delivered immediately, in 2.1 the output starts to appear on the screen after 1-2 minutes. The pipeline is map:match pattern=renderhierarchicalfiletoc_xalan.xml map:generate src=Testfiles/hierarchicalTOC.xml/ map:transform type=xalan src=stylesheets/toc_fromhierarchicaltoc2.xsl/ map:serialize encoding=UTF-8 type=html/ BTW, that encoding attribute doesn't exist. /map:match There is no sorting in the transformation which could prevent it from streaming. ok, you might be right, though AFAIK nothing changed in Cocoon that should prevent this behaviour. To be absolutely sure that it's Cocoon who doesn't set the incremental-processing parameter, could you try out using the attached transformer? It prints the name of the current thread to standard output. If you put one such transformer right before and one right after your XSLT transform, it should print out two different names. If you need more instructions on how to do this, just let me know. Thanx for your help. That transformation prints Thread = Thread-13 Thread = Thread-22 Ok, then we're sure Xalan is working in streaming mode. So it's something else that makes the streaming not work. Do you have any other components in your pipeline which could break the streaming? I've checked the serializers and their default buffer size is 8192, I guess that shouldn't be a problem. You could always try changing it to 0 by adding: outputBufferSize0/outputBufferSize inside the map:pipe element of the pipeline implementation you're using (likely the caching one). -- 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]
RE: Is it possible to make a redirect() from the FOM?
can anyone give more information about cocoon.redirectTo ??? Not sure if there is more info on that method, though it's fairly straight forward. For more javascript API docs try: FOM_Cocoon class in the package org.apache.cocoon.components.flow.javascript.fom in the API docs, you see the javascript methods available - they are prefixed with jsFunction_ Other more user friendly docs are in the user documentation: User GuideControl FlowJavascript API, though it doesn't include redirectTo. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 September 2003 08:38 To: [EMAIL PROTECTED] Subject: RE: Is it possible to make a redirect() from the FOM? can anyone give more information about cocoon.redirectTo ??? some urls with description or documentation? thnx --stavros On Mon, 1 Sep 2003, Mark H wrote: Use: cocoon.redirectTo(someURL); Mark -Original Message- From: Ramy Mamdouh [mailto:[EMAIL PROTECTED] Sent: 01 September 2003 18:10 To: [EMAIL PROTECTED] Subject: Is it possible to make a redirect() from the FOM? Hello, Is it possible to make a redirect() from the FOM? a complete redirect, that's not a cocoon:/ sendPage() one. That used to be in cocoon.environment.redirect() , but now in the new FOM this is deleted? I'm using Cocoon-2.1 CVS. Thanks in advance. Ramy - 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] - 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]
How to take advantage of flow model, XML binding and custom actions for validation in Woody
I've been reading and trying to understand what I found in terms of documentation and code for Woody, binding to XML and the flow concept. I see there is a binding_example.js file with a "form2xml" function in it. As far as I understand, this is the one that invokes the binding to/from XMLand the display of the form. But what if I want to stay away from _javascript_ing and take advantage of the Woody flow model with binding to XML and, as part of the form validation, do further validation of the XML document the form data was bound to (either by means of a custom action or one or more XSLT stylesheets)? Thanks, jlerm
Question on Woody flow internals...
I've been taking a look at the following function found in file "woody.js". What I would like to understand is exactly how the form would be displayed to the user and, upon (re-)submission, the execution return to where the comment reads: "_show creates a continuation, the invocation of which will return right here". Digging through code appears to be encouraged by the Cocoon community (and actually in many instances the only way of understanding how things work). So, I guess you would not mind this question... Thanks, jlerm Form.prototype.show = function(uri, validator, locale) { var lastWebCont = this.lastWebContinuation; // create a continuation, the invocation of which will resend // the page: this will be used to implement automated "back" // navigation var wk = this.start(lastWebCont); if (locale == null) locale = java.util.Locale.getDefault(); while (true) { if (cocoon.request == null) { // this continuation has been invalidated this.dead = true; handleInvalidContinuation(); Woody.suicide(); } var thisWebCont = this._show(uri, locale, wk); // _show creates a continuation, the invocation of which // will return right here: it is used to implement // automated "next" navigation if (this.dead || cocoon.request == null) { // this continuation has been invalidated handleInvalidContinuation(); suicide(); } var formContext = new Packages.org.apache.cocoon.woody.FormContext(this.woody.request, locale); var finished = this.form.process(formContext); var evt = formContext.getActionEvent(); if (evt != null) { this.submitId = String(evt.getActionCommand()); } else { this.submitId = undefined; } if (validator != undefined) { finished = validator(this) finished; } if (finished) { break; } }}