svn commit: r164523 - /cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/forms/templategenerator.xml /cocoon/branches/BRANCH_2_1_X/status.xml
Author: antonio Date: Sun Apr 24 19:26:48 2005 New Revision: 164523 URL: http://svn.apache.org/viewcvs?rev=164523view=rev Log: Fix docs. See bug #33100 Modified: cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/forms/templategenerator.xml cocoon/branches/BRANCH_2_1_X/status.xml Modified: cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/forms/templategenerator.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/forms/templategenerator.xml?rev=164523r1=164522r2=164523view=diff == --- cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/forms/templategenerator.xml (original) +++ cocoon/branches/BRANCH_2_1_X/src/documentation/xdocs/userdocs/forms/templategenerator.xml Sun Apr 24 19:26:48 2005 @@ -43,7 +43,7 @@ pSimply remove the FormsTemplateTransformer from your publishing pipeline, and instead include the following jx statement into your template file:/p - source xml:space=preserve![CDATA[jx:import uri=resource://org/apache/cocoon/forms/generation/template.jx/]]/source + source xml:space=preserve![CDATA[jx:import uri=resource://org/apache/cocoon/forms/generation/jx-macros.xml/]]/source pNote that these macros only work when calling the pipeline from flowscript./p /s1 Modified: cocoon/branches/BRANCH_2_1_X/status.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=164523r1=164522r2=164523view=diff == --- cocoon/branches/BRANCH_2_1_X/status.xml (original) +++ cocoon/branches/BRANCH_2_1_X/status.xml Sun Apr 24 19:26:48 2005 @@ -196,6 +196,9 @@ changes release version=@version@ date=@date@ +action dev=AG type=fix fixes-bug=33100 due-to=Juan Jose Pablos due-to-email=[EMAIL PROTECTED] + form(NOT_FOUND is not a function) error caused by wrong documentation. +/action action dev=AG type=fix fixes-bug=34591 due-to=Jorg Heymans due-to-email=[EMAIL PROTECTED] Fix ContextPathModule name in javadocs. /action
svn commit: r164525 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ContextPathModule.java
Author: antonio Date: Sun Apr 24 19:32:36 2005 New Revision: 164525 URL: http://svn.apache.org/viewcvs?rev=164525view=rev Log: Fix $ Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ContextPathModule.java Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ContextPathModule.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ContextPathModule.java?rev=164525r1=164524r2=164525view=diff == --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ContextPathModule.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/ContextPathModule.java Sun Apr 24 19:32:36 2005 @@ -71,7 +71,7 @@ * /p * * @author a href=mailto:giacomo at apache dor orgGiacomo Pati/a - * @version CVS $Id: RealPathModule.java 30932 2004-07-29 17:35:38Z vgritsenko $ + * @version $Id$ */ public class ContextPathModule extends AbstractInputModule implements Serviceable, ThreadSafe {
svn commit: r164568 - /cocoon/trunk/src/webapp/WEB-INF/logkit.xconf
Author: lgawron Date: Mon Apr 25 06:15:33 2005 New Revision: 164568 URL: http://svn.apache.org/viewcvs?rev=164568view=rev Log: exceptions are not logged anywhere Modified: cocoon/trunk/src/webapp/WEB-INF/logkit.xconf Modified: cocoon/trunk/src/webapp/WEB-INF/logkit.xconf URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/WEB-INF/logkit.xconf?rev=164568r1=164567r2=164568view=diff == --- cocoon/trunk/src/webapp/WEB-INF/logkit.xconf (original) +++ cocoon/trunk/src/webapp/WEB-INF/logkit.xconf Mon Apr 25 06:15:33 2005 @@ -74,7 +74,7 @@ | Please mind that the default format logs request uri along with | query string. This may log confidential data (passwords etc.). +-- - format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n/format + format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%{throwable}/format !--format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%{throwable}/format-- !--+
svn commit: r164569 - /cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/JXTemplateGenerator.java
Author: lgawron Date: Mon Apr 25 06:17:43 2005 New Revision: 164569 URL: http://svn.apache.org/viewcvs?rev=164569view=rev Log: possible NPE Modified: cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/JXTemplateGenerator.java Modified: cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/JXTemplateGenerator.java URL: http://svn.apache.org/viewcvs/cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/JXTemplateGenerator.java?rev=164569r1=164568r2=164569view=diff == --- cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/JXTemplateGenerator.java (original) +++ cocoon/blocks/unsupported/template/trunk/java/org/apache/cocoon/template/jxtg/JXTemplateGenerator.java Mon Apr 25 06:17:43 2005 @@ -120,6 +120,8 @@ public Serializable getKey() { JXTExpression cacheKeyExpr = (JXTExpression) this.startDocument .getTemplateProperty(JXTemplateGenerator.CACHE_KEY); +if ( cacheKeyExpr == null ) +return null; try { final Serializable templateKey = (Serializable) cacheKeyExpr .getValue(this.expressionContext); @@ -135,6 +137,8 @@ public SourceValidity getValidity() { JXTExpression validityExpr = (JXTExpression) this.startDocument .getTemplateProperty(JXTemplateGenerator.VALIDITY); +if ( validityExpr == null ) +return null; try { final SourceValidity sourceValidity = this.startDocument .getSourceValidity();
svn commit: r164581 - /cocoon/trunk/src/webapp/WEB-INF/logkit.xconf
Author: lgawron Date: Mon Apr 25 07:33:22 2005 New Revision: 164581 URL: http://svn.apache.org/viewcvs?rev=164581view=rev Log: use rootThrowable instead of throwable in cocoon.log Modified: cocoon/trunk/src/webapp/WEB-INF/logkit.xconf Modified: cocoon/trunk/src/webapp/WEB-INF/logkit.xconf URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/WEB-INF/logkit.xconf?rev=164581r1=164580r2=164581view=diff == --- cocoon/trunk/src/webapp/WEB-INF/logkit.xconf (original) +++ cocoon/trunk/src/webapp/WEB-INF/logkit.xconf Mon Apr 25 07:33:22 2005 @@ -67,15 +67,16 @@ | Note that newlines are *not* automatic: you have to specify the | newline as '\n' or everything will appear on a single line! | - | The first format below is less verbose because it won't print out - | the error stacktrace (which tend to be very verbose and for little value). - | If you need the stacktraces, uncomment the second format below. + | The first format below is verbose: it includes error stacktraces. + | If you want something even more verbose use %{throwable} which will + | show a full chain of exceptions. Using the second format won't + | output stacktraces at all. | | Please mind that the default format logs request uri along with | query string. This may log confidential data (passwords etc.). +-- - format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%{throwable}/format - !--format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%{throwable}/format-- + format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%{rootThrowable}/format + !--format type=cocoon%5.5{priority} %{time} [%{category}] (%{uri}%{query}) %{thread}/%{class:short}: %{message}\n%/format-- !--+ | append if set to 'true' will make cocoon append the events
svn commit: r164599 - /cocoon/branches/BRANCH_2_1_X/status.xml
Author: vgritsenko Date: Mon Apr 25 10:02:05 2005 New Revision: 164599 URL: http://svn.apache.org/viewcvs?rev=164599view=rev Log: note recent changes Modified: cocoon/branches/BRANCH_2_1_X/status.xml Modified: cocoon/branches/BRANCH_2_1_X/status.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=164599r1=164598r2=164599view=diff == --- cocoon/branches/BRANCH_2_1_X/status.xml (original) +++ cocoon/branches/BRANCH_2_1_X/status.xml Mon Apr 25 10:02:05 2005 @@ -196,6 +196,13 @@ changes release version=@version@ date=@date@ +action dev=VG type=update + AbstractSAXTransformer gets codetransformer-factory/code configuration + parameter. +/action +action dev=VG type=update + XMLFileModule gets codecache-expressions/code configuration parameter. +/action action dev=AG type=fix fixes-bug=33100 due-to=Juan Jose Pablos due-to-email=[EMAIL PROTECTED] form(NOT_FOUND is not a function) error caused by wrong documentation. /action
svn commit: r164600 - /cocoon/trunk/status.xml
Author: vgritsenko Date: Mon Apr 25 10:03:14 2005 New Revision: 164600 URL: http://svn.apache.org/viewcvs?rev=164600view=rev Log: note recent changes Modified: cocoon/trunk/status.xml Modified: cocoon/trunk/status.xml URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=164600r1=164599r2=164600view=diff == --- cocoon/trunk/status.xml (original) +++ cocoon/trunk/status.xml Mon Apr 25 10:03:14 2005 @@ -426,6 +426,13 @@ /action /release release version=2.1.8 date=TBD +action dev=VG type=update + AbstractSAXTransformer gets codetransformer-factory/code configuration + parameter. +/action +action dev=VG type=update + XMLFileModule gets codecache-expressions/code configuration parameter. +/action action dev=AG type=fix fixes-bug=34591 due-to=Jorg Heymans due-to-email=[EMAIL PROTECTED] Fix ContextPathModule name in javadocs. /action
svn commit: r164601 - in /cocoon/branches/BRANCH_2_1_X/src: blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java java/org/apache/cocoon/transformation/SimpleFormTransformer.java
Author: vgritsenko Date: Mon Apr 25 10:03:55 2005 New Revision: 164601 URL: http://svn.apache.org/viewcvs?rev=164601view=rev Log: call super.configure Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java?rev=164601r1=164600r2=164601view=diff == --- cocoon/branches/BRANCH_2_1_X/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/html/java/org/apache/cocoon/transformation/HTMLTransformer.java Mon Apr 25 10:03:55 2005 @@ -1,12 +1,12 @@ /* * Copyright 1999-2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,7 +40,7 @@ import org.xml.sax.SAXException; /** - * Converts (escaped) HTML snippets into JTidied HTML. + * Converts (escaped) HTML snippets into JTidied HTML. * This transformer expects a list of elements, passed as comma separated * values of the tags parameter. It records the text enclosed in such * elements and pass it thru JTidy to obtain valid XHTML. @@ -61,7 +61,7 @@ * Properties for Tidy format */ private Properties properties; - + /** * Tags that must be normalized */ @@ -109,6 +109,8 @@ * a jtidy configuration file location. */ public void configure(Configuration config) throws ConfigurationException { +super.configure(config); + String configUrl = config.getChild(jtidy-config).getValue(null); if (configUrl != null) { org.apache.excalibur.source.SourceResolver resolver = null; @@ -200,10 +202,10 @@ Parameters par) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, par); -String tagsParam = par.getParameter(tags, ); +String tagsParam = par.getParameter(tags, ); if (getLogger().isDebugEnabled()) { getLogger().debug(tags: + tagsParam); -} +} this.tags = new HashMap(); StringTokenizer tokenizer = new StringTokenizer(tagsParam, ,); while (tokenizer.hasMoreElements()) { Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java?rev=164601r1=164600r2=164601view=diff == --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java Mon Apr 25 10:03:55 2005 @@ -345,6 +345,8 @@ * Avalon Configurable Interface */ public void configure(Configuration config) throws ConfigurationException { +super.configure(config); + this.defaultInputConf = config.getChild(input-module); this.defaultInput = this.defaultInputConf.getAttribute(name, this.defaultInput); this.separator = config.getChild(separator).getValue(this.separator);
svn commit: r164602 - /cocoon/trunk/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java
Author: vgritsenko Date: Mon Apr 25 10:04:50 2005 New Revision: 164602 URL: http://svn.apache.org/viewcvs?rev=164602view=rev Log: call super.configure Modified: cocoon/trunk/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java Modified: cocoon/trunk/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java?rev=164602r1=164601r2=164602view=diff == --- cocoon/trunk/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java (original) +++ cocoon/trunk/src/java/org/apache/cocoon/transformation/SimpleFormTransformer.java Mon Apr 25 10:04:50 2005 @@ -350,6 +350,8 @@ * Avalon Configurable Interface */ public void configure(Configuration config) throws ConfigurationException { +super.configure(config); + this.defaultInputConf = config.getChild(input-module); this.defaultInput = this.defaultInputConf.getAttribute(name, this.defaultInput); this.separator = config.getChild(separator).getValue(this.separator);
svn commit: r164603 - /cocoon/blocks/supported/html/trunk/java/org/apache/cocoon/transformation/HTMLTransformer.java
Author: vgritsenko Date: Mon Apr 25 10:05:02 2005 New Revision: 164603 URL: http://svn.apache.org/viewcvs?rev=164603view=rev Log: call super.configure Modified: cocoon/blocks/supported/html/trunk/java/org/apache/cocoon/transformation/HTMLTransformer.java Modified: cocoon/blocks/supported/html/trunk/java/org/apache/cocoon/transformation/HTMLTransformer.java URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/html/trunk/java/org/apache/cocoon/transformation/HTMLTransformer.java?rev=164603r1=164602r2=164603view=diff == --- cocoon/blocks/supported/html/trunk/java/org/apache/cocoon/transformation/HTMLTransformer.java (original) +++ cocoon/blocks/supported/html/trunk/java/org/apache/cocoon/transformation/HTMLTransformer.java Mon Apr 25 10:05:02 2005 @@ -1,12 +1,12 @@ /* * Copyright 1999-2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,7 +40,7 @@ import org.xml.sax.SAXException; /** - * Converts (escaped) HTML snippets into JTidied HTML. + * Converts (escaped) HTML snippets into JTidied HTML. * This transformer expects a list of elements, passed as comma separated * values of the tags parameter. It records the text enclosed in such * elements and pass it thru JTidy to obtain valid XHTML. @@ -51,7 +51,7 @@ * @author a href=mailto:[EMAIL PROTECTED]Daniele Madama/a * @author a href=mailto:[EMAIL PROTECTED]Gianugo Rabellino/a * - * @version CVS $Id: HTMLTransformer.java,v 1.5 2004/06/08 19:02:52 vgritsenko Exp $ + * @version CVS $Id$ */ public class HTMLTransformer extends AbstractSAXTransformer @@ -61,7 +61,7 @@ * Properties for Tidy format */ private Properties properties; - + /** * Tags that must be normalized */ @@ -109,6 +109,8 @@ * a jtidy configuration file location. */ public void configure(Configuration config) throws ConfigurationException { +super.configure(config); + String configUrl = config.getChild(jtidy-config).getValue(null); if (configUrl != null) { org.apache.excalibur.source.SourceResolver resolver = null; @@ -200,10 +202,10 @@ Parameters par) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, par); -String tagsParam = par.getParameter(tags, ); +String tagsParam = par.getParameter(tags, ); if (getLogger().isDebugEnabled()) { getLogger().debug(tags: + tagsParam); -} +} this.tags = new HashMap(); StringTokenizer tokenizer = new StringTokenizer(tagsParam, ,); while (tokenizer.hasMoreElements()) {
svn commit: r164604 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java
Author: vgritsenko Date: Mon Apr 25 10:11:44 2005 New Revision: 164604 URL: http://svn.apache.org/viewcvs?rev=164604view=rev Log: throw exception which has a cause (so that nested configuration exception is not lost) Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java?rev=164604r1=164603r2=164604view=diff == --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java Mon Apr 25 10:11:44 2005 @@ -1,12 +1,12 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. - * + * Copyright 1999-2005 The Apache Software Foundation. + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,10 +30,8 @@ * @author a href=mailto:[EMAIL PROTECTED]Sylvain Wallez/a * @version CVS $Id$ */ - -public class ExtendedComponentSelector -extends ExcaliburComponentSelector -implements ParentAware { +public class ExtendedComponentSelector extends ExcaliburComponentSelector + implements ParentAware { /** The role manager */ protected RoleManager roles; @@ -56,17 +54,18 @@ /** This selector's location (used for debugging purposes) */ private String location; + +/** Create the ComponentSelector with the Thread context ClassLoader */ public ExtendedComponentSelector() { this.classLoader = Thread.currentThread().getContextClassLoader(); } -/** Create the ComponentSelector with a Classloader */ +/** Create the ComponentSelector with a ClassLoader */ public ExtendedComponentSelector(ClassLoader loader) { super(loader); if (loader == null) { this.classLoader = Thread.currentThread().getContextClassLoader(); - } else { this.classLoader = loader; } @@ -132,6 +131,7 @@ this.parentComponents = new HashSet(); } */ + /** * Get the role name for this selector. This is called by codeconfigure()/code * to set the value of codethis.roleName/code. @@ -191,7 +191,6 @@ Configuration[] instances = config.getChildren(); for (int i = 0; i instances.length; i++) { - Configuration instance = instances[i]; Object hint = instance.getAttribute(name).trim(); @@ -228,10 +227,9 @@ Class clazz = this.classLoader.loadClass(className); addComponent(hint, clazz, instance); -} catch(Exception e) { - +} catch (Exception e) { String message = Could not load class + className + for component named ' + -hint + ' at + instance.getLocation(); + hint + ' at + instance.getLocation(); getLogger().error(message, e); throw new ConfigurationException(message, e); @@ -250,25 +248,36 @@ * @see org.apache.avalon.framework.component.ComponentSelector#select(java.lang.Object) */ public Component select(Object hint) throws ComponentException { - if (hint == null) { hint = this.defaultHint; } if (parentSelector == null) { -// No parent : default behaviour +// No parent: default behaviour return super.select(hint); +} -} else { +try { +// Try in this selector first +final Component component = super.select(hint); +return component; -// Try here first +} catch (ComponentException original) { try { -return super.select(hint); - -} catch(ComponentException ce) { -// Doesn't exist here : try in parent selector +// Doesn't exist here: try in parent selector final Component component = this.parentSelector.select(hint); return component; + +} catch (ComponentException nested) { +// Doesn't exist in parent too: throw exception. + +if (nested.getCause() != null) { +// Nested