You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2005/03/23 06:00:38 UTC
svn commit: r158726 [2/2] - in cocoon/branches/BRANCH_2_1_X:
src/blocks/faces/samples/
src/blocks/forms/java/org/apache/cocoon/forms/resources/htmlarea/
src/blocks/forms/java/org/apache/cocoon/forms/resources/htmlarea/plugins/ContextMenu/
src/blocks/forms/java/org/apache/cocoon/forms/resources/htmlarea/plugins/SpellChecker/
src/blocks/forms/java/org/apache/cocoon/forms/samples/dreamteam/
src/blocks/forms/samples/dreamteam/
src/blocks/forms/samples/dreamteam/content/
src/blocks/forms/samples/dreamteam/flow/
src/blocks/forms/samples/dreamteam/messages/
src/blocks/forms/samples/dreamteam/resources/styles/
src/blocks/forms/samples/forms/binding/ src/blocks/forms/samples/v2/
src/blocks/forms/test/org/apache/cocoon/forms/datatype/
src/blocks/forms/test/org/apache/cocoon/forms/datatype/validationruleimpl/
src/blocks/forms/test/org/apache/cocoon/forms/formmodel/
src/blocks/jms/conf/ src/blocks/jms/java/org/apache/cocoon/acting/
src/blocks/jms/java/org/apache/cocoon/components/jms/
src/blocks/linotype/samples/scripts/
src/blocks/linotype/samples/stylesheets/ src/blocks/ojb/samples/pb/xsp/
src/blocks/petstore/samples/view/velocity/
src/blocks/portal/java/org/apache/cocoon/portal/tools/service/
src/blocks/querybean/WEB-INF/xconf/ src/blocks/querybean/conf/
src/blocks/querybean/java/org/apache/cocoon/bean/query/
src/blocks/querybean/samples/ src/blocks/querybean/samples/flow/
src/blocks/querybean/samples/forms/ src/blocks/querybean/samples/i18n/
src/blocks/querybean/samples/screens/
src/blocks/querybean/samples/stylesheets/ src/blocks/repository/conf/
src/blocks/session-fw/conf/ src/blocks/session-fw/samples/
src/blocks/tour/samples/flow/docs/
src/blocks/tour/samples/flow/java-shapes/ src/blocks/webdav/conf/
src/blocks/webdav/test/org/apache/cocoon/components/source/impl/
src/blocks/woody/samples/resources/htmlarea/
src/documentation/xdocs/userdocs/selectors/
src/java/org/apache/cocoon/components/modules/input/
src/java/org/apache/cocoon/components/store/
src/java/org/apache/cocoon/util/ src/java/org/apache/cocoon/xml/
src/mocks/com/sun/tools/javac/ src/resources/javadoc/log4j/
src/test/anteater/ src/test/org/apache/cocoon/components/thread/
src/test/org/apache/cocoon/core/container/
src/test/org/apache/cocoon/selection/ src/webapp/resources/scripts/
src/webapp/resources/styles/ src/webapp/samples/common/style/xsl/html/
src/webapp/samples/flow/jxcalc/ src/webapp/samples/modules/
src/webapp/samples/test/flowscript-dom-dump/
src/webapp/samples/test/reader-mime-type/ src/webapp/samples/test/redirect/
src/webapp/samples/test/sendpage/ tools/ide/eclipse/
Modified: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/core/container/ContainerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/core/container/ContainerTestCase.java?view=diff&r1=158725&r2=158726
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/core/container/ContainerTestCase.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/core/container/ContainerTestCase.java Tue Mar 22 21:00:32 2005
@@ -1,300 +1,300 @@
-/*
- * Copyright 2002-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.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.core.container;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.avalon.excalibur.component.DefaultRoleManager;
-import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
-import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
-import org.apache.cocoon.util.Deprecation;
-
-/**
- * JUnit TestCase for Cocoon Components.
- * <p>
- * This class extends the JUnit TestCase class to setup an environment which
- * makes it possible to easily test Cocoon Components. The following methods
- * and instance variables are exposed for convenience testing:
- * </p>
- * <dl>
- * <dt>getManager()</dt>
- * <dd>
- * This instance variable contains an initialized service manager which
- * can be used to lookup components configured in the test configuration
- * file. (see below)
- * </dd>
- * <dt>getLogger()</dt>
- * <dd>
- * This method returns a logger for this test case. By default this
- * logger logs with log level DEBUG.
- * </dd>
- * </dl>
- * <p>
- * The following test case configuration can be used as a basis for new tests.
- * Detailed explanations of the configuration elements can be found after
- * the example.
- * </p>
- * <pre>
- * <testcase>
- * <context>
- * <entry name="foo" value="bar"/>
- * <entry name="baz" class="my.context.Class"/>
- * </context>
- *
- * <roles>
- * <role name="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
- * shorthand="datasources"
- * default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
- * <hint shorthand="jdbc" class="org.apache.avalon.excalibur.datasource.JdbcDataSource"/>
- * </role>
- * </roles>
- *
- * <components>
- * <datasources>
- * <jdbc name="personell">
- * <pool-controller min="5" max="10"/>
- * <jdbc name="personnel"/>
- * <dburl>jdbc:odbc:test</dburl>
- * <user>test</user>
- * <password>test</password>
- * <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
- * </jdbc>
- * </datasources>
- * </components>
- * </testcase>
- * </pre>
- * <p>
- * Element Explanation:
- * <dl>
- * <dt>testcase</dt>
- * <dd>Defines a test case configuration. Must contain one each of the
- * following elements: <code>annotation</code>,
- * <code>context</code>, <code>roles</code>, and <code>components</code>
- * </dd>.
- *
- * <dt>context</dt>
- * <dd>Allows context properties to be set in the context passed to any
- * Contextualizable components.</dd>
- *
- * <dt>roles</dt>
- * <dd>Roles configuration for the components configured in the
- * <code>components</code> element.
- * </dd>
- *
- * <dt>components</dt>
- * <dd>Used to configure any Components used by the test cases.
- * </dd>
- *
- * </dl>
- *
- * @version $Id: $
- */
-public class ContainerTestCase extends TestCase {
-
- /** The default logger */
- private Logger logger;
-
- /** The service manager to use */
- private ServiceManager manager;
-
- /** Return the logger */
- protected Logger getLogger() {
- return logger;
- }
-
- /** Return the service manager */
- protected ServiceManager getManager() {
- return this.manager;
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
-
- String level = System.getProperty("junit.test.loglevel", "" + ConsoleLogger.LEVEL_WARN);
- this.logger = new ConsoleLogger(Integer.parseInt(level));
- Deprecation.setLogger(this.logger);
- prepare();
- }
-
- /**
- * Initializes the ComponentLocator
- *
- * The configuration file is determined by the class name plus .xtest appended,
- * all '.' replaced by '/' and loaded as a resource via classpath
- */
- protected void prepare()
- throws Exception {
- final String resourceName = getClass().getName().replace( '.', '/' ) + ".xtest";
- URL resource = getClass().getClassLoader().getResource( resourceName );
-
- if (resource != null) {
- getLogger().debug("Loading resource " + resourceName);
- prepare(resource.openStream());
- } else {
- getLogger().debug("Resource not found " + resourceName);
- }
- }
-
- /**
- * Initializes the ComponentLocator
- *
- * @param testconf The configuration file is passed as a <code>InputStream</code>
- *
- * A common way to supply a InputStream is to overwrite the initialize() method
- * in the sub class, do there whatever is needed to get the right InputStream object
- * supplying a conformant xtest configuartion and pass it to this initialize method.
- * the mentioned initialize method is also the place to set a different logging priority
- * to the member variable m_logPriority.
- */
- protected final void prepare(final InputStream testconf)
- throws Exception {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("ContainerTestCase.initialize");
- }
-
- final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
- final Configuration conf = builder.build(testconf);
-
- Context context = this.setupContext(conf.getChild("context"));
-
- setupManagers(conf.getChild("components"),
- conf.getChild("roles"),
- context);
- }
-
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- done();
- super.tearDown();
- }
-
- /**
- * Disposes the <code>ComponentLocator</code>
- */
- final private void done() {
- if (manager != null) {
- ContainerUtil.dispose(manager);
- manager = null;
- }
- }
-
- /**
- * set up a context according to the xtest configuration specifications context
- * element.
- *
- * A method addContext(DefaultContext context) is called here to enable subclasses
- * to put additional objects into the context programmatically.
- */
- final private Context setupContext( final Configuration conf )
- throws Exception {
- final DefaultContext context = new DefaultContext();
- final Configuration[] confs = conf.getChildren( "entry" );
- for (int i = 0; i < confs.length; i++) {
- final String key = confs[i].getAttribute("name");
- final String value = confs[i].getAttribute("value", null);
- if (value == null) {
- String clazz = confs[i].getAttribute("class");
- Object obj = getClass().getClassLoader().loadClass(clazz).newInstance();
- context.put(key, obj);
- if (getLogger().isInfoEnabled()) {
- getLogger().info("ContainerTestCase: added an instance of class " + clazz + " to context entry " + key);
- }
- } else {
- context.put(key, value);
- if (getLogger().isInfoEnabled()) {
- getLogger().info("ContainerTestCase: added value \"" + value + "\" to context entry " + key);
- }
- }
- }
- addContext(context);
- return context ;
- }
-
- /**
- * This method may be overwritten by subclasses to put additional objects
- * into the context programmatically.
- */
- protected void addContext(DefaultContext context) {
- }
-
- final private void setupManagers(final Configuration confCM,
- final Configuration confRM,
- final Context context)
- throws Exception {
- // Setup the RoleManager
- DefaultRoleManager roleManager = new DefaultRoleManager();
- roleManager.enableLogging(getLogger());
- roleManager.configure(confRM);
-
- // Set up the ComponentLocator
- ExcaliburComponentManager ecManager = new ExcaliburComponentManager();
- ecManager.enableLogging(getLogger());
- ecManager.contextualize(context);
- ecManager.setRoleManager(roleManager);
- ecManager.setLoggerManager(new DefaultLoggerManager(getLogger()));
- ecManager.configure(confCM);
- ecManager.initialize();
- this.manager = new WrapperServiceManager(ecManager);
- }
-
- protected final Object lookup(final String key)
- throws ServiceException {
- return manager.lookup(key);
- }
-
- protected final void release(final Object object) {
- manager.release(object);
- }
-
- protected static class DefaultLoggerManager implements LoggerManager {
- private Logger logger;
-
- public DefaultLoggerManager(Logger logger) {
- this.logger = logger;
- }
- /* (non-Javadoc)
- * @see org.apache.avalon.excalibur.logger.LoggerManager#getDefaultLogger()
- */
- public Logger getDefaultLogger() {
- return this.logger;
- }
- /* (non-Javadoc)
- * @see org.apache.avalon.excalibur.logger.LoggerManager#getLoggerForCategory(java.lang.String)
- */
- public Logger getLoggerForCategory(String arg0) {
- return this.logger;
- }
- }
-}
+/*
+ * Copyright 2002-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.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.core.container;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.avalon.excalibur.component.DefaultRoleManager;
+import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
+import org.apache.avalon.excalibur.logger.LoggerManager;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
+import org.apache.avalon.framework.container.ContainerUtil;
+import org.apache.avalon.framework.context.Context;
+import org.apache.avalon.framework.context.DefaultContext;
+import org.apache.avalon.framework.logger.ConsoleLogger;
+import org.apache.avalon.framework.logger.Logger;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.WrapperServiceManager;
+import org.apache.cocoon.util.Deprecation;
+
+/**
+ * JUnit TestCase for Cocoon Components.
+ * <p>
+ * This class extends the JUnit TestCase class to setup an environment which
+ * makes it possible to easily test Cocoon Components. The following methods
+ * and instance variables are exposed for convenience testing:
+ * </p>
+ * <dl>
+ * <dt>getManager()</dt>
+ * <dd>
+ * This instance variable contains an initialized service manager which
+ * can be used to lookup components configured in the test configuration
+ * file. (see below)
+ * </dd>
+ * <dt>getLogger()</dt>
+ * <dd>
+ * This method returns a logger for this test case. By default this
+ * logger logs with log level DEBUG.
+ * </dd>
+ * </dl>
+ * <p>
+ * The following test case configuration can be used as a basis for new tests.
+ * Detailed explanations of the configuration elements can be found after
+ * the example.
+ * </p>
+ * <pre>
+ * <testcase>
+ * <context>
+ * <entry name="foo" value="bar"/>
+ * <entry name="baz" class="my.context.Class"/>
+ * </context>
+ *
+ * <roles>
+ * <role name="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
+ * shorthand="datasources"
+ * default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
+ * <hint shorthand="jdbc" class="org.apache.avalon.excalibur.datasource.JdbcDataSource"/>
+ * </role>
+ * </roles>
+ *
+ * <components>
+ * <datasources>
+ * <jdbc name="personell">
+ * <pool-controller min="5" max="10"/>
+ * <jdbc name="personnel"/>
+ * <dburl>jdbc:odbc:test</dburl>
+ * <user>test</user>
+ * <password>test</password>
+ * <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
+ * </jdbc>
+ * </datasources>
+ * </components>
+ * </testcase>
+ * </pre>
+ * <p>
+ * Element Explanation:
+ * <dl>
+ * <dt>testcase</dt>
+ * <dd>Defines a test case configuration. Must contain one each of the
+ * following elements: <code>annotation</code>,
+ * <code>context</code>, <code>roles</code>, and <code>components</code>
+ * </dd>.
+ *
+ * <dt>context</dt>
+ * <dd>Allows context properties to be set in the context passed to any
+ * Contextualizable components.</dd>
+ *
+ * <dt>roles</dt>
+ * <dd>Roles configuration for the components configured in the
+ * <code>components</code> element.
+ * </dd>
+ *
+ * <dt>components</dt>
+ * <dd>Used to configure any Components used by the test cases.
+ * </dd>
+ *
+ * </dl>
+ *
+ * @version $Id: $
+ */
+public class ContainerTestCase extends TestCase {
+
+ /** The default logger */
+ private Logger logger;
+
+ /** The service manager to use */
+ private ServiceManager manager;
+
+ /** Return the logger */
+ protected Logger getLogger() {
+ return logger;
+ }
+
+ /** Return the service manager */
+ protected ServiceManager getManager() {
+ return this.manager;
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ String level = System.getProperty("junit.test.loglevel", "" + ConsoleLogger.LEVEL_WARN);
+ this.logger = new ConsoleLogger(Integer.parseInt(level));
+ Deprecation.setLogger(this.logger);
+ prepare();
+ }
+
+ /**
+ * Initializes the ComponentLocator
+ *
+ * The configuration file is determined by the class name plus .xtest appended,
+ * all '.' replaced by '/' and loaded as a resource via classpath
+ */
+ protected void prepare()
+ throws Exception {
+ final String resourceName = getClass().getName().replace( '.', '/' ) + ".xtest";
+ URL resource = getClass().getClassLoader().getResource( resourceName );
+
+ if (resource != null) {
+ getLogger().debug("Loading resource " + resourceName);
+ prepare(resource.openStream());
+ } else {
+ getLogger().debug("Resource not found " + resourceName);
+ }
+ }
+
+ /**
+ * Initializes the ComponentLocator
+ *
+ * @param testconf The configuration file is passed as a <code>InputStream</code>
+ *
+ * A common way to supply a InputStream is to overwrite the initialize() method
+ * in the sub class, do there whatever is needed to get the right InputStream object
+ * supplying a conformant xtest configuartion and pass it to this initialize method.
+ * the mentioned initialize method is also the place to set a different logging priority
+ * to the member variable m_logPriority.
+ */
+ protected final void prepare(final InputStream testconf)
+ throws Exception {
+ if (getLogger().isDebugEnabled()) {
+ getLogger().debug("ContainerTestCase.initialize");
+ }
+
+ final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
+ final Configuration conf = builder.build(testconf);
+
+ Context context = this.setupContext(conf.getChild("context"));
+
+ setupManagers(conf.getChild("components"),
+ conf.getChild("roles"),
+ context);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ done();
+ super.tearDown();
+ }
+
+ /**
+ * Disposes the <code>ComponentLocator</code>
+ */
+ final private void done() {
+ if (manager != null) {
+ ContainerUtil.dispose(manager);
+ manager = null;
+ }
+ }
+
+ /**
+ * set up a context according to the xtest configuration specifications context
+ * element.
+ *
+ * A method addContext(DefaultContext context) is called here to enable subclasses
+ * to put additional objects into the context programmatically.
+ */
+ final private Context setupContext( final Configuration conf )
+ throws Exception {
+ final DefaultContext context = new DefaultContext();
+ final Configuration[] confs = conf.getChildren( "entry" );
+ for (int i = 0; i < confs.length; i++) {
+ final String key = confs[i].getAttribute("name");
+ final String value = confs[i].getAttribute("value", null);
+ if (value == null) {
+ String clazz = confs[i].getAttribute("class");
+ Object obj = getClass().getClassLoader().loadClass(clazz).newInstance();
+ context.put(key, obj);
+ if (getLogger().isInfoEnabled()) {
+ getLogger().info("ContainerTestCase: added an instance of class " + clazz + " to context entry " + key);
+ }
+ } else {
+ context.put(key, value);
+ if (getLogger().isInfoEnabled()) {
+ getLogger().info("ContainerTestCase: added value \"" + value + "\" to context entry " + key);
+ }
+ }
+ }
+ addContext(context);
+ return context ;
+ }
+
+ /**
+ * This method may be overwritten by subclasses to put additional objects
+ * into the context programmatically.
+ */
+ protected void addContext(DefaultContext context) {
+ }
+
+ final private void setupManagers(final Configuration confCM,
+ final Configuration confRM,
+ final Context context)
+ throws Exception {
+ // Setup the RoleManager
+ DefaultRoleManager roleManager = new DefaultRoleManager();
+ roleManager.enableLogging(getLogger());
+ roleManager.configure(confRM);
+
+ // Set up the ComponentLocator
+ ExcaliburComponentManager ecManager = new ExcaliburComponentManager();
+ ecManager.enableLogging(getLogger());
+ ecManager.contextualize(context);
+ ecManager.setRoleManager(roleManager);
+ ecManager.setLoggerManager(new DefaultLoggerManager(getLogger()));
+ ecManager.configure(confCM);
+ ecManager.initialize();
+ this.manager = new WrapperServiceManager(ecManager);
+ }
+
+ protected final Object lookup(final String key)
+ throws ServiceException {
+ return manager.lookup(key);
+ }
+
+ protected final void release(final Object object) {
+ manager.release(object);
+ }
+
+ protected static class DefaultLoggerManager implements LoggerManager {
+ private Logger logger;
+
+ public DefaultLoggerManager(Logger logger) {
+ this.logger = logger;
+ }
+ /* (non-Javadoc)
+ * @see org.apache.avalon.excalibur.logger.LoggerManager#getDefaultLogger()
+ */
+ public Logger getDefaultLogger() {
+ return this.logger;
+ }
+ /* (non-Javadoc)
+ * @see org.apache.avalon.excalibur.logger.LoggerManager#getLoggerForCategory(java.lang.String)
+ */
+ public Logger getLoggerForCategory(String arg0) {
+ return this.logger;
+ }
+ }
+}
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/core/container/ContainerTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/BrowserSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/BrowserSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/CookieSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/CookieSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/ExceptionSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/ExceptionSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/HeaderSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/HeaderSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/HostSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/HostSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/ParameterSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/ParameterSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RegexpHeaderSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RegexpHeaderSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RegexpRequestParameterSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RegexpRequestParameterSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RequestAttributeSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RequestAttributeSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RequestMethodSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RequestMethodSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RequestParameterSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/RequestParameterSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/ResourceExistsSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/ResourceExistsSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/SessionAttributeSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/SimpleSelectorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/selection/SimpleSelectorTestCase.xtest
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/resources/scripts/prettycontent.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/resources/styles/prettycontent.css
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/common/style/xsl/html/adding-header.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/common/style/xsl/html/adding-header.xsl?view=diff&r1=158725&r2=158726
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/common/style/xsl/html/adding-header.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/common/style/xsl/html/adding-header.xsl Tue Mar 22 21:00:32 2005
@@ -1,40 +1,40 @@
-<?xml version="1.0"?>
-<!--
- 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.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:param name="contextPath"/>
- <xsl:param name="servletPath" select="string('/samples')"/>
- <xsl:param name="sitemapURI"/>
- <xsl:variable name="directory" select="substring-before($servletPath,$sitemapURI)"/>
- <!-- assume that sitemapURIs don't occur in servletPath more than once -->
- <xsl:variable name="sitemap" select="concat($directory,'sitemap.xmap')"/>
- <xsl:template match="body">
- <div style="text-align:right;width:100%;">
- <a href="?cocoon-view=content">Content View</a> |
- <a href="?cocoon-view=pretty-content">Source</a> |
- <a href="{$sitemap}?cocoon-view=pretty-content">Sitemap</a>
- </div>
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="@*|node()" priority="-2">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="text()" priority="-1">
- <xsl:value-of select="."/>
- </xsl:template>
-</xsl:stylesheet>
+<?xml version="1.0"?>
+<!--
+ 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="contextPath"/>
+ <xsl:param name="servletPath" select="string('/samples')"/>
+ <xsl:param name="sitemapURI"/>
+ <xsl:variable name="directory" select="substring-before($servletPath,$sitemapURI)"/>
+ <!-- assume that sitemapURIs don't occur in servletPath more than once -->
+ <xsl:variable name="sitemap" select="concat($directory,'sitemap.xmap')"/>
+ <xsl:template match="body">
+ <div style="text-align:right;width:100%;">
+ <a href="?cocoon-view=content">Content View</a> |
+ <a href="?cocoon-view=pretty-content">Source</a> |
+ <a href="{$sitemap}?cocoon-view=pretty-content">Sitemap</a>
+ </div>
+ <xsl:apply-templates/>
+ </xsl:template>
+ <xsl:template match="@*|node()" priority="-2">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template match="text()" priority="-1">
+ <xsl:value-of select="."/>
+ </xsl:template>
+</xsl:stylesheet>
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/common/style/xsl/html/adding-header.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/flow/jxcalc/calc.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/flow/jxcalc/calc.js
('svn:mime-type' removed)
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/modules/menu2content.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/modules/menu2navigation.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/flowscript-dom-dump/dom-dump.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/flowscript-dom-dump/dom-dumper.jx.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/flowscript-dom-dump/explain-test.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/flowscript-dom-dump/sitemap.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/flowscript-dom-dump/test-transform.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/reader-mime-type/test.foo
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/reader-mime-type/test.foo?view=diff&r1=158725&r2=158726
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/reader-mime-type/test.foo (original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/reader-mime-type/test.foo Tue Mar 22 21:00:32 2005
@@ -1,20 +1,20 @@
-<!--
- Copyright 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.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
- <body>
- This should have the text/xml mime type.
- </body>
-</html>
+<!--
+ Copyright 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.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+ <body>
+ This should have the text/xml mime type.
+ </body>
+</html>
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/reader-mime-type/test.foo
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/redirect/flow.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/redirect/flow.js
('svn:mime-type' removed)
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/sendpage/flow.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/sendpage/flow.js
('svn:mime-type' removed)
Propchange: cocoon/branches/BRANCH_2_1_X/tools/ide/eclipse/blocks-classpath.xsl
------------------------------------------------------------------------------
svn:eol-style = native