You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2009/12/21 14:53:56 UTC
svn commit: r892822 - in /cocoon/cocoon3/trunk:
cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/fop/
cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/solr/
cocoon-sax/src/main/java/org/ap...
Author: reinhard
Date: Mon Dec 21 13:53:55 2009
New Revision: 892822
URL: http://svn.apache.org/viewvc?rev=892822&view=rev
Log:
Rename general purpose generators (both SAX and StAX) to XMLGenerator and also rename the general purpose StAXSerializer to XMLSerializer. See http://cocoon.markmail.org/message/jj4mvha6p4n4g26h
Added:
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XMLGenerator.java
- copied, changed from r890314, cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/CleaningTransformer.java
- copied, changed from r824908, cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/StAXCleaningTransformer.java
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLGenerator.java
- copied, changed from r824908, cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXGenerator.java
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLSerializer.java
- copied, changed from r824908, cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXSerializer.java
Removed:
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXGenerator.java
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXSerializer.java
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/StAXCleaningTransformer.java
Modified:
cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/fop/FopSerializerTestCase.java
cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/solr/SolrConsumerTestCase.java
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/TransformationUtils.java
cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/PipelineTest.java
cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/SchemaProcessorTransformerTest.java
cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/SAXGeneratorTest.java
cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/XIncludeTransformerTest.java
cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml
cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/IncludeTransformer.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/CleaningTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/IncludeTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/StAXPipelineTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/SAXForStAXPipelineWrapperTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/StAXToSAXPipelineAdapterTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/AddTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DaisyLinkRewriteTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModificationTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModificationTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/SubSetTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/EmitTransformerTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/GeneratingStarterTest.java
cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/HugeDataTest.java
Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/fop/FopSerializerTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/fop/FopSerializerTestCase.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/fop/FopSerializerTestCase.java (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/fop/FopSerializerTestCase.java Mon Dec 21 13:53:55 2009
@@ -25,7 +25,7 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.sax.SAXPipelineComponent;
-import org.apache.cocoon.sax.component.SAXGenerator;
+import org.apache.cocoon.sax.component.XMLGenerator;
import org.apache.cocoon.sax.component.XSLTTransformer;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
@@ -35,7 +35,7 @@
@Test
public void testPipelineWithFOPSerializer() throws Exception {
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator(this.getClass().getResource("page.xml")));
+ pipeline.addComponent(new XMLGenerator(this.getClass().getResource("page.xml")));
pipeline.addComponent(new XSLTTransformer(this.getClass().getResource("page2fo.xsl")));
pipeline.addComponent(new FopSerializer());
Modified: cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/solr/SolrConsumerTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/solr/SolrConsumerTestCase.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/solr/SolrConsumerTestCase.java (original)
+++ cocoon/cocoon3/trunk/cocoon-optional/src/test/java/org/apache/cocoon/optional/pipeline/components/sax/solr/SolrConsumerTestCase.java Mon Dec 21 13:53:55 2009
@@ -27,7 +27,7 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.sax.SAXPipelineComponent;
-import org.apache.cocoon.sax.component.SAXGenerator;
+import org.apache.cocoon.sax.component.XMLGenerator;
import org.apache.cocoon.sax.component.XMLSerializer;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer;
@@ -58,7 +58,7 @@
public void testPipelineWithSolrConsumer() throws Exception {
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator(this.getClass().getResource("sample.xml")));
+ pipeline.addComponent(new XMLGenerator(this.getClass().getResource("sample.xml")));
pipeline.addComponent(new SolrConsumer(this.solr));
pipeline.addComponent(new XMLSerializer());
Copied: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XMLGenerator.java (from r890314, cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java)
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XMLGenerator.java?p2=cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XMLGenerator.java&p1=cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java&r1=890314&r2=892822&rev=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/SAXGenerator.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XMLGenerator.java Mon Dec 21 13:53:55 2009
@@ -50,45 +50,45 @@
/**
* General purpose SAX generator that produces SAX events from different sources.
*/
-public class SAXGenerator extends AbstractSAXGenerator implements CachingPipelineComponent {
+public class XMLGenerator extends AbstractSAXGenerator implements CachingPipelineComponent {
private Starter generator;
private final Log logger = LogFactory.getLog(this.getClass());
- public SAXGenerator() {
+ public XMLGenerator() {
this((URL) null);
}
- public SAXGenerator(byte[] bytes) {
+ public XMLGenerator(byte[] bytes) {
this.generator = new ByteArrayGenerator(bytes);
}
- public SAXGenerator(byte[] bytes, String encoding) {
+ public XMLGenerator(byte[] bytes, String encoding) {
this.generator = new ByteArrayGenerator(bytes, encoding);
}
- public SAXGenerator(File file) {
+ public XMLGenerator(File file) {
this.generator = new FileGenerator(file);
}
- public SAXGenerator(InputStream inputStream) {
+ public XMLGenerator(InputStream inputStream) {
this.generator = new InputStreamGenerator(inputStream);
}
- public SAXGenerator(Node node) {
+ public XMLGenerator(Node node) {
this.generator = new NodeGenerator(node);
}
- public SAXGenerator(SAXBuffer saxBuffer) {
+ public XMLGenerator(SAXBuffer saxBuffer) {
this.generator = new SAXBufferGenerator(saxBuffer);
}
- public SAXGenerator(String xmlString) {
+ public XMLGenerator(String xmlString) {
this.generator = new StringGenerator(xmlString);
}
- public SAXGenerator(URL url) {
+ public XMLGenerator(URL url) {
this.generator = new URLGenerator(url);
}
@@ -139,14 +139,14 @@
public void execute() {
try {
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using a byte array as source to produce SAX events.");
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using a byte array as source to produce SAX events.");
}
if (this.encoding == null) {
- XMLUtils.toSax(new ByteArrayInputStream(this.bytes), SAXGenerator.this.getSAXConsumer());
+ XMLUtils.toSax(new ByteArrayInputStream(this.bytes), XMLGenerator.this.getSAXConsumer());
} else {
- XMLUtils.toSax(new String(this.bytes, this.encoding), SAXGenerator.this.getSAXConsumer());
+ XMLUtils.toSax(new String(this.bytes, this.encoding), XMLGenerator.this.getSAXConsumer());
}
} catch (PipelineException e) {
throw e;
@@ -177,12 +177,12 @@
public void execute() {
try {
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using file " + this.file.getAbsolutePath()
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using file " + this.file.getAbsolutePath()
+ " as source to produce SAX events.");
}
- XMLUtils.toSax(new FileInputStream(this.file), SAXGenerator.this.getSAXConsumer());
+ XMLUtils.toSax(new FileInputStream(this.file), XMLGenerator.this.getSAXConsumer());
} catch (PipelineException e) {
throw e;
} catch (Exception e) {
@@ -212,12 +212,12 @@
public void execute() {
try {
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using input stream " + this.inputStream
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using input stream " + this.inputStream
+ " as source to produce SAX events.");
}
- XMLUtils.toSax(this.inputStream, SAXGenerator.this.getSAXConsumer());
+ XMLUtils.toSax(this.inputStream, XMLGenerator.this.getSAXConsumer());
} catch (PipelineException e) {
throw e;
@@ -245,11 +245,11 @@
}
public void execute() {
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using a DOM node to produce SAX events.");
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using a DOM node to produce SAX events.");
}
- DOMStreamer streamer = new DOMStreamer(SAXGenerator.this.getSAXConsumer());
+ DOMStreamer streamer = new DOMStreamer(XMLGenerator.this.getSAXConsumer());
try {
streamer.stream(this.node);
} catch (SAXException e) {
@@ -278,12 +278,12 @@
}
public void execute() {
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using a SAXBuffer to produce SAX events.");
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using a SAXBuffer to produce SAX events.");
}
try {
- this.saxBuffer.toSAX(SAXGenerator.this.getSAXConsumer());
+ this.saxBuffer.toSAX(XMLGenerator.this.getSAXConsumer());
} catch (SAXException e) {
throw new ProcessingException("Can't stream " + this + " into the content handler.", e);
}
@@ -315,11 +315,11 @@
*/
public void execute() {
try {
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using a string to produce SAX events.");
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using a string to produce SAX events.");
}
- XMLUtils.toSax(new ByteArrayInputStream(this.xmlString.getBytes()), SAXGenerator.this.getSAXConsumer());
+ XMLUtils.toSax(new ByteArrayInputStream(this.xmlString.getBytes()), XMLGenerator.this.getSAXConsumer());
} catch (PipelineException e) {
throw e;
} catch (Exception e) {
@@ -358,7 +358,7 @@
TimestampCacheKey timestampCacheKey = new TimestampCacheKey(this.source, connection.getLastModified());
return timestampCacheKey;
} catch (IOException e) {
- SAXGenerator.this.logger
+ XMLGenerator.this.logger
.error("Can't construct cache key. Error while connecting to " + this.source, e);
} finally {
URLConnectionUtils.closeQuietly(connection);
@@ -377,12 +377,12 @@
throw new ProcessingException(this.getClass().getSimpleName() + " has no source.");
}
- if (SAXGenerator.this.logger.isDebugEnabled()) {
- SAXGenerator.this.logger.debug("Using the URL " + this.source + " to produce SAX events.");
+ if (XMLGenerator.this.logger.isDebugEnabled()) {
+ XMLGenerator.this.logger.debug("Using the URL " + this.source + " to produce SAX events.");
}
try {
- XMLUtils.toSax(this.source.openConnection(), SAXGenerator.this.getSAXConsumer());
+ XMLUtils.toSax(this.source.openConnection(), XMLGenerator.this.getSAXConsumer());
} catch (IOException e) {
throw new ProcessingException("Can't open connection to " + this.source, e);
}
Modified: cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/TransformationUtils.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/TransformationUtils.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/TransformationUtils.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/util/TransformationUtils.java Mon Dec 21 13:53:55 2009
@@ -25,7 +25,7 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.sax.SAXPipelineComponent;
-import org.apache.cocoon.sax.component.SAXGenerator;
+import org.apache.cocoon.sax.component.XMLGenerator;
import org.apache.cocoon.sax.component.XMLSerializer;
import org.apache.cocoon.sax.component.XSLTTransformer;
@@ -162,7 +162,7 @@
OutputStream outputStream, URL... xsltUrls) throws Exception {
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator(xmlString));
+ pipeline.addComponent(new XMLGenerator(xmlString));
for (URL xsltUrl : xsltUrls) {
XSLTTransformer xsltTransformer = new XSLTTransformer(xsltUrl);
xsltTransformer.setParameters(xsltParameters);
Modified: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/PipelineTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/PipelineTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/PipelineTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/PipelineTest.java Mon Dec 21 13:53:55 2009
@@ -26,7 +26,7 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.sax.component.SAXGenerator;
+import org.apache.cocoon.sax.component.XMLGenerator;
import org.apache.cocoon.sax.component.XMLSerializer;
import org.apache.cocoon.sax.component.XSLTTransformer;
import org.custommonkey.xmlunit.Diff;
@@ -39,7 +39,7 @@
*/
public void testPipelineWithTransformer() throws Exception {
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator("<x></x>"));
+ pipeline.addComponent(new XMLGenerator("<x></x>"));
pipeline.addComponent(new XSLTTransformer(this.getClass().getResource("/test.xslt")));
pipeline.addComponent(new XMLSerializer());
@@ -63,7 +63,7 @@
attributes.put("package-name", "org.apache.cocoon.sax");
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator("<x></x>"));
+ pipeline.addComponent(new XMLGenerator("<x></x>"));
pipeline.addComponent(new XSLTTransformer(this.getClass().getResource("/test.xslt"), attributes));
pipeline.addComponent(new XMLSerializer());
Modified: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/SchemaProcessorTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/SchemaProcessorTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/SchemaProcessorTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/SchemaProcessorTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -24,7 +24,7 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.sax.component.SAXGenerator;
+import org.apache.cocoon.sax.component.XMLGenerator;
import org.apache.cocoon.sax.component.SchemaProcessorTransformer;
import org.apache.cocoon.sax.component.SchemaValidationException;
import org.apache.cocoon.sax.component.XMLSerializer;
@@ -67,7 +67,7 @@
private Pipeline<SAXPipelineComponent> createValidatingPipeline(String xmlInput) {
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator(xmlInput));
+ pipeline.addComponent(new XMLGenerator(xmlInput));
pipeline.addComponent(new SchemaProcessorTransformer(this.getClass().getResource("/test.xsd")));
pipeline.addComponent(new XMLSerializer());
Modified: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/SAXGeneratorTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/SAXGeneratorTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/SAXGeneratorTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/SAXGeneratorTest.java Mon Dec 21 13:53:55 2009
@@ -46,23 +46,23 @@
@Test
public void execByteArrayGenerator() throws Exception {
- runPipeline(new SAXGenerator(VALID_XML_STRING.getBytes()), VALID_XML_STRING);
+ runPipeline(new XMLGenerator(VALID_XML_STRING.getBytes()), VALID_XML_STRING);
}
@Test
public void execFileGenerator() throws Exception {
- runPipeline(new SAXGenerator(createXMLFile(VALID_XML_STRING)), VALID_XML_STRING);
+ runPipeline(new XMLGenerator(createXMLFile(VALID_XML_STRING)), VALID_XML_STRING);
}
@Test
public void execInputStreamGenerator() throws Exception {
- runPipeline(new SAXGenerator(new FileInputStream(createXMLFile(VALID_XML_STRING))), VALID_XML_STRING);
+ runPipeline(new XMLGenerator(new FileInputStream(createXMLFile(VALID_XML_STRING))), VALID_XML_STRING);
}
@Test
public void execSAXBufferGenerator() throws Exception {
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator(VALID_XML_STRING));
+ pipeline.addComponent(new XMLGenerator(VALID_XML_STRING));
final SAXBuffer saxBuffer = new SAXBuffer();
pipeline.addComponent(new AbstractSAXSerializer() {
@@ -77,22 +77,22 @@
pipeline.setup(baos);
pipeline.execute();
- runPipeline(new SAXGenerator(saxBuffer), VALID_XML_STRING);
+ runPipeline(new XMLGenerator(saxBuffer), VALID_XML_STRING);
}
@Test
public void execStringGenerator() throws Exception {
- runPipeline(new SAXGenerator(VALID_XML_STRING), VALID_XML_STRING);
+ runPipeline(new XMLGenerator(VALID_XML_STRING), VALID_XML_STRING);
}
@Test
public void execURLGenerator() throws Exception {
- runPipeline(new SAXGenerator(createXMLFile(VALID_XML_STRING).toURL()), VALID_XML_STRING);
+ runPipeline(new XMLGenerator(createXMLFile(VALID_XML_STRING).toURL()), VALID_XML_STRING);
}
@Test
public void execURLGeneratorBySeparatelyPassingURL() throws Exception {
- SAXGenerator generator = new SAXGenerator();
+ XMLGenerator generator = new XMLGenerator();
Map<String, Object> configurationParams = new HashMap<String, Object>();
configurationParams.put("source", createXMLFile(VALID_XML_STRING).toURL());
@@ -103,56 +103,56 @@
@Test(expected = ProcessingException.class)
public void execURLGeneratorWithEmptySource() throws Exception {
- runPipeline(new SAXGenerator((URL) null), VALID_XML_STRING);
+ runPipeline(new XMLGenerator((URL) null), VALID_XML_STRING);
}
@Test(expected = ProcessingException.class)
public void invalidExecByteArrayGenerator() throws Exception {
- runPipeline(new SAXGenerator(INVALID_XML_STRING.getBytes()), INVALID_XML_STRING);
+ runPipeline(new XMLGenerator(INVALID_XML_STRING.getBytes()), INVALID_XML_STRING);
}
@Test(expected = ProcessingException.class)
public void invalidExecFileGenerator() throws Exception {
- runPipeline(new SAXGenerator(createXMLFile(INVALID_XML_STRING)), INVALID_XML_STRING);
+ runPipeline(new XMLGenerator(createXMLFile(INVALID_XML_STRING)), INVALID_XML_STRING);
}
@Test(expected = ProcessingException.class)
public void invalidExecInputStreamGenerator() throws Exception {
- runPipeline(new SAXGenerator(new FileInputStream(createXMLFile(INVALID_XML_STRING))), INVALID_XML_STRING);
+ runPipeline(new XMLGenerator(new FileInputStream(createXMLFile(INVALID_XML_STRING))), INVALID_XML_STRING);
}
@Test(expected = ProcessingException.class)
public void invalidExecStringGenerator() throws Exception {
- runPipeline(new SAXGenerator(INVALID_XML_STRING), INVALID_XML_STRING);
+ runPipeline(new XMLGenerator(INVALID_XML_STRING), INVALID_XML_STRING);
}
@Test(expected = SetupException.class)
public void newStringGenerator() {
- new SAXGenerator((String) null);
+ new XMLGenerator((String) null);
}
@Test(expected = SetupException.class)
public void testByteArrayGenerator() {
- new SAXGenerator((byte[]) null);
+ new XMLGenerator((byte[]) null);
}
@Test(expected = SetupException.class)
public void testFileGenerator() {
- new SAXGenerator((File) null);
+ new XMLGenerator((File) null);
}
@Test(expected = SetupException.class)
public void testInputStreamGenerator() {
- new SAXGenerator((InputStream) null);
+ new XMLGenerator((InputStream) null);
}
@Test(expected = SetupException.class)
public void testSAXBufferGenerator() {
- new SAXGenerator((SAXBuffer) null);
+ new XMLGenerator((SAXBuffer) null);
}
public void testURLGenerator() {
- new SAXGenerator((URL) null);
+ new XMLGenerator((URL) null);
}
private static File createXMLFile(String xmlString) throws IOException {
Modified: cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/XIncludeTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/XIncludeTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/XIncludeTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-sax/src/test/java/org/apache/cocoon/sax/component/XIncludeTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -114,7 +114,7 @@
URL source = new URL(base, testResource);
Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
- pipeline.addComponent(new SAXGenerator(source));
+ pipeline.addComponent(new XMLGenerator(source));
pipeline.addComponent(new XIncludeTransformer(base));
pipeline.addComponent(new XMLSerializer());
Modified: cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml (original)
+++ cocoon/cocoon3/trunk/cocoon-sitemap/src/main/resources/META-INF/cocoon/spring/cocoon-pipeline-component.xml Mon Dec 21 13:53:55 2009
@@ -34,7 +34,7 @@
<bean name="serializer:html" class="org.apache.cocoon.sax.component.XMLSerializer" scope="prototype"
factory-method="createHTML4Serializer" />
- <bean name="generator:url" class="org.apache.cocoon.sax.component.SAXGenerator" scope="prototype" />
+ <bean name="generator:url" class="org.apache.cocoon.sax.component.XMLGenerator" scope="prototype" />
<alias name="generator:url" alias="generator:file"/>
Copied: cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/CleaningTransformer.java (from r824908, cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/StAXCleaningTransformer.java)
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/CleaningTransformer.java?p2=cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/CleaningTransformer.java&p1=cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/StAXCleaningTransformer.java&r1=824908&r2=892822&rev=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/StAXCleaningTransformer.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/CleaningTransformer.java Mon Dec 21 13:53:55 2009
@@ -5,9 +5,9 @@
* licenses this file to you 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
@@ -22,21 +22,20 @@
import javax.xml.stream.events.StartElement;
import javax.xml.stream.events.XMLEvent;
-import org.apache.cocoon.sax.component.CleaningTransformer;
import org.apache.cocoon.stax.AbstractStAXTransformer;
/**
- * Transformer which is used to clean a xml document from all whitespaces,
- * comments and namespace start prefixes and end prefixes. Works similar to the
- * {@link CleaningTransformer} for SAX pipelines.
+ * Transformer which is used to clean a xml document from all whitespaces, comments and namespace
+ * start prefixes and end prefixes. Works similar to the
+ * {@link org.apache.cocoon.sax.component.CleaningTransformer} for SAX pipelines.
*/
-public class StAXCleaningTransformer extends AbstractStAXTransformer {
+public class CleaningTransformer extends AbstractStAXTransformer {
private static XMLEventFactory eventFactory = XMLEventFactory.newInstance();
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.cocoon.stax.AbstractStAXTransformer#produceEvents()
*/
@Override
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/IncludeTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/IncludeTransformer.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/IncludeTransformer.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/IncludeTransformer.java Mon Dec 21 13:53:55 2009
@@ -30,7 +30,6 @@
import org.apache.cocoon.pipeline.component.AbstractPipelineComponent;
import org.apache.cocoon.pipeline.util.StringRepresentation;
import org.apache.cocoon.stax.AbstractStAXTransformer;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXProducer;
import org.apache.cocoon.stax.navigation.Navigator;
import org.apache.commons.logging.Log;
@@ -116,7 +115,7 @@
Attribute sourceAttribute = event.asStartElement().getAttributeByName(new QName(SRC_ATTR));
URL source = this.createSource(sourceAttribute.getValue());
try {
- this.includeDelegate = new StAXGenerator(source.openConnection().getInputStream());
+ this.includeDelegate = new XMLGenerator(source.openConnection().getInputStream());
} catch (IOException e) {
String message = "Can't read from URL " + sourceAttribute.getValue();
this.logger.error(message, e);
Copied: cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLGenerator.java (from r824908, cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXGenerator.java)
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLGenerator.java?p2=cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLGenerator.java&p1=cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXGenerator.java&r1=824908&r2=892822&rev=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXGenerator.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLGenerator.java Mon Dec 21 13:53:55 2009
@@ -14,7 +14,7 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package org.apache.cocoon.stax;
+package org.apache.cocoon.stax.component;
import java.io.InputStream;
import java.net.URL;
@@ -27,24 +27,26 @@
import org.apache.cocoon.pipeline.SetupException;
import org.apache.cocoon.pipeline.component.Starter;
+import org.apache.cocoon.stax.AbstractStAXProducer;
+import org.apache.cocoon.stax.StAXProducer;
/**
* General element generator for a StAX pipeline directly taking all elements from an internal
* {@link XMLEventReader} created from an {@link InputStream} or directly from an {@link URL}.
*/
-public class StAXGenerator extends AbstractStAXProducer implements Starter {
+public class XMLGenerator extends AbstractStAXProducer implements Starter {
private XMLEventReader reader;
/**
- * Creating an {@link StAXGenerator} with an {@link XMLEventReader} from an {@link InputStream}.
+ * Creating an {@link XMLGenerator} with an {@link XMLEventReader} from an {@link InputStream}.
*
* @param inputStream from which a {@link XMLEventReader} is produced read from during the
- * {@link StAXGenerator#execute()} method call.
+ * {@link XMLGenerator#execute()} method call.
* @throws SetupException if any error occurred during the creation of the
* {@link XMLEventReader}.
*/
- public StAXGenerator(InputStream inputStream) {
+ public XMLGenerator(InputStream inputStream) {
try {
this.reader = XMLInputFactory.newInstance().createXMLEventReader(inputStream);
} catch (XMLStreamException e) {
Copied: cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLSerializer.java (from r824908, cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXSerializer.java)
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLSerializer.java?p2=cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLSerializer.java&p1=cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXSerializer.java&r1=824908&r2=892822&rev=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/StAXSerializer.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/main/java/org/apache/cocoon/stax/component/XMLSerializer.java Mon Dec 21 13:53:55 2009
@@ -14,7 +14,7 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package org.apache.cocoon.stax;
+package org.apache.cocoon.stax.component;
import java.io.OutputStream;
@@ -27,13 +27,15 @@
import org.apache.cocoon.pipeline.SetupException;
import org.apache.cocoon.pipeline.component.AbstractPipelineComponent;
import org.apache.cocoon.pipeline.component.Finisher;
+import org.apache.cocoon.stax.StAXConsumer;
+import org.apache.cocoon.stax.StAXProducer;
/**
* Standard implementation of the cocoon {@link Finisher} for StAX pipelines. This pipeline pushes
* all events through the pipeline and write them UTF-8 encoded to an {@link XMLEventWriter} created
* from an {@link OutputStream} inserted in the {@link Finisher#setOutputStream(OutputStream)}.
*/
-public class StAXSerializer extends AbstractPipelineComponent implements StAXConsumer, Finisher {
+public class XMLSerializer extends AbstractPipelineComponent implements StAXConsumer, Finisher {
private StAXProducer parent;
private XMLEventWriter writer;
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/CleaningTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/CleaningTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/CleaningTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/CleaningTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -22,38 +22,36 @@
import java.io.InputStream;
import org.apache.cocoon.pipeline.NonCachingPipeline;
-import org.apache.cocoon.pipeline.component.PipelineComponent;
-import org.apache.cocoon.sax.component.CleaningTransformer;
-import org.apache.cocoon.sax.component.SAXGenerator;
-import org.apache.cocoon.sax.component.XMLSerializer;
-import org.apache.cocoon.stax.component.StAXCleaningTransformer;
+import org.apache.cocoon.sax.SAXPipelineComponent;
+import org.apache.cocoon.stax.component.CleaningTransformer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.Test;
/**
- * Contains unit tests for a {@link StAXCleaningTransformer}.<br> * Compares if SAX and StAX
- * Cleaning Transformer work identically.
+ * Contains unit tests for a {@link CleaningTransformer}.<br> *
+ * Compares if SAX and StAX Cleaning Transformer work identically.
*/
public class CleaningTransformerTest {
/**
- * Compares the output of the {@link StAXCleaningTransformer} with the output of the
+ * Compares the output of the {@link CleaningTransformer} with the output of the
* {@link CleaningTransformer} to show that they process input data identically.
*
* @throws Exception Is thrown if an error occurs loading the files or in the pipeline itself.
*/
@Test
public void testCleaningTransformer() throws Exception {
- // TODO andreas.pieber [2009-01-27] use the correct generic parameter
- // (SAXPipelineComponent) as soon as the SAX module allows this
- NonCachingPipeline<PipelineComponent> pipeSAX = new NonCachingPipeline<PipelineComponent>();
- pipeSAX.addComponent(new SAXGenerator(IOUtils.toString(CleaningTransformerTest.class.getResource(
- "/org/apache/cocoon/stax/" + "complex-stax-test-document.xml").openStream())));
+ NonCachingPipeline<SAXPipelineComponent> pipeSAX = new NonCachingPipeline<SAXPipelineComponent>();
+ pipeSAX.addComponent(new org.apache.cocoon.sax.component.XMLGenerator(IOUtils
+ .toString(CleaningTransformerTest.class.getResource(
+ "/org/apache/cocoon/stax/complex-stax-test-document.xml").openStream())));
- pipeSAX.addComponent(new CleaningTransformer());
- pipeSAX.addComponent(new XMLSerializer());
+ pipeSAX.addComponent(new org.apache.cocoon.sax.component.CleaningTransformer());
+ pipeSAX.addComponent(new org.apache.cocoon.sax.component.XMLSerializer());
ByteArrayOutputStream outputSAX = new ByteArrayOutputStream();
pipeSAX.setup(outputSAX);
@@ -68,9 +66,9 @@
ByteArrayOutputStream outputStAX = new ByteArrayOutputStream();
NonCachingPipeline<StAXPipelineComponent> pipeStAX = new NonCachingPipeline<StAXPipelineComponent>();
- pipeStAX.addComponent(new StAXGenerator(input));
- pipeStAX.addComponent(new StAXCleaningTransformer());
- pipeStAX.addComponent(new StAXSerializer());
+ pipeStAX.addComponent(new XMLGenerator(input));
+ pipeStAX.addComponent(new CleaningTransformer());
+ pipeStAX.addComponent(new XMLSerializer());
pipeStAX.setup(outputStAX);
pipeStAX.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/IncludeTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/IncludeTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/IncludeTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/IncludeTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -26,6 +26,8 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.stax.component.IncludeTransformer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -62,9 +64,9 @@
FileUtils.writeStringToFile(input, inputSource);
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(new FileInputStream(input)));
+ pipe.addComponent(new XMLGenerator(new FileInputStream(input)));
pipe.addComponent(new IncludeTransformer());
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
ByteArrayOutputStream out = new ByteArrayOutputStream();
pipe.setup(out);
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/StAXPipelineTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/StAXPipelineTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/StAXPipelineTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/StAXPipelineTest.java Mon Dec 21 13:53:55 2009
@@ -25,7 +25,8 @@
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.pipeline.SetupException;
import org.apache.cocoon.pipeline.component.PipelineComponent;
-import org.apache.cocoon.sax.component.SAXGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
@@ -54,8 +55,8 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLGenerator(input));
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -75,8 +76,8 @@
@Test(expected = SetupException.class)
public void pipelineWithWrongComponents() {
Pipeline<PipelineComponent> pipeline = new NonCachingPipeline<PipelineComponent>();
- pipeline.addComponent(new SAXGenerator("<test/>"));
- pipeline.addComponent(new StAXSerializer());
+ pipeline.addComponent(new org.apache.cocoon.sax.component.XMLGenerator("<test/>"));
+ pipeline.addComponent(new XMLSerializer());
pipeline.setup(new ByteArrayOutputStream());
fail("Mixing wrong components which has to result in a SetupException");
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/SAXForStAXPipelineWrapperTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/SAXForStAXPipelineWrapperTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/SAXForStAXPipelineWrapperTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/SAXForStAXPipelineWrapperTest.java Mon Dec 21 13:53:55 2009
@@ -24,12 +24,10 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.sax.SAXPipelineComponent;
import org.apache.cocoon.sax.component.CleaningTransformer;
-import org.apache.cocoon.sax.component.SAXGenerator;
-import org.apache.cocoon.sax.component.XMLSerializer;
+import org.apache.cocoon.sax.component.XMLGenerator;
import org.apache.cocoon.stax.CleaningTransformerTest;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
@@ -57,10 +55,10 @@
public void testSAXComponentInStAXPipeline() throws Exception {
NonCachingPipeline<SAXPipelineComponent> pipeSAX = new NonCachingPipeline<SAXPipelineComponent>();
ByteArrayOutputStream outputSAX = new ByteArrayOutputStream();
- pipeSAX.addComponent(new SAXGenerator(IOUtils.toString(CleaningTransformerTest.class.getResource(
+ pipeSAX.addComponent(new XMLGenerator(IOUtils.toString(CleaningTransformerTest.class.getResource(
"/org/apache/cocoon/stax/converter/complex-stax-test-document.xml").openStream())));
pipeSAX.addComponent(new CleaningTransformer());
- pipeSAX.addComponent(new XMLSerializer());
+ pipeSAX.addComponent(new org.apache.cocoon.sax.component.XMLSerializer());
pipeSAX.setup(outputSAX);
pipeSAX.execute();
@@ -72,9 +70,9 @@
"/org/apache/cocoon/stax/converter/complex-stax-test-document.xml").openStream();
ByteArrayOutputStream outputStAX = new ByteArrayOutputStream();
NonCachingPipeline<StAXPipelineComponent> pipeStAX = new NonCachingPipeline<StAXPipelineComponent>();
- pipeStAX.addComponent(new StAXGenerator(input));
+ pipeStAX.addComponent(new org.apache.cocoon.stax.component.XMLGenerator(input));
pipeStAX.addComponent(new SAXForStAXPipelineWrapper(new CleaningTransformer()));
- pipeStAX.addComponent(new StAXSerializer());
+ pipeStAX.addComponent(new XMLSerializer());
pipeStAX.setup(outputStAX);
pipeStAX.execute();
input.close();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/StAXToSAXPipelineAdapterTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/StAXToSAXPipelineAdapterTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/StAXToSAXPipelineAdapterTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/converter/StAXToSAXPipelineAdapterTest.java Mon Dec 21 13:53:55 2009
@@ -25,12 +25,10 @@
import org.apache.cocoon.pipeline.component.PipelineComponent;
import org.apache.cocoon.sax.SAXPipelineComponent;
import org.apache.cocoon.sax.component.CleaningTransformer;
-import org.apache.cocoon.sax.component.SAXGenerator;
import org.apache.cocoon.sax.component.XMLSerializer;
import org.apache.cocoon.stax.CleaningTransformerTest;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXProducer;
-import org.apache.commons.io.IOUtils;
+import org.apache.cocoon.stax.component.XMLGenerator;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.Test;
@@ -54,8 +52,8 @@
public void testSAXComponentInStAXPipeline() throws Exception {
NonCachingPipeline<SAXPipelineComponent> pipeSAX = new NonCachingPipeline<SAXPipelineComponent>();
ByteArrayOutputStream outputSAX = new ByteArrayOutputStream();
- pipeSAX.addComponent(new SAXGenerator(IOUtils.toString(CleaningTransformerTest.class.getResource(
- "/org/apache/cocoon/stax/converter/complex-stax-test-document.xml").openStream())));
+ pipeSAX.addComponent(new org.apache.cocoon.sax.component.XMLGenerator(CleaningTransformerTest.class
+ .getResource("/org/apache/cocoon/stax/converter/complex-stax-test-document.xml").openStream()));
pipeSAX.addComponent(new CleaningTransformer());
pipeSAX.addComponent(new XMLSerializer());
pipeSAX.setup(outputSAX);
@@ -69,7 +67,7 @@
"/org/apache/cocoon/stax/converter/complex-stax-test-document.xml").openStream();
ByteArrayOutputStream outputStAX = new ByteArrayOutputStream();
NonCachingPipeline<PipelineComponent> pipeStAX = new NonCachingPipeline<PipelineComponent>();
- pipeStAX.addComponent(new StAXGenerator(input));
+ pipeStAX.addComponent(new XMLGenerator(input));
pipeStAX.addComponent(new StAXToSAXPipelineAdapter());
pipeStAX.addComponent(new CleaningTransformer());
pipeStAX.addComponent(new XMLSerializer());
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/AddTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/AddTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/AddTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/AddTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -23,9 +23,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.ExampleAddTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -56,9 +56,9 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
pipe.addComponent(new ExampleAddTransformer("somethingdifferent", null));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/ComplexTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -23,9 +23,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.ExampleComplexTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -54,9 +54,9 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
pipe.addComponent(new ExampleComplexTransformer());
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DaisyLinkRewriteTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DaisyLinkRewriteTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DaisyLinkRewriteTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DaisyLinkRewriteTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -23,9 +23,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.DaisyLinkRewriteTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -48,9 +48,9 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
pipe.addComponent(new DaisyLinkRewriteTransformer("site/test/"));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/DeletionTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -28,9 +28,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.DeletionTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -61,13 +61,13 @@
"/org/apache/cocoon/stax/sample/stax-test-document.xml").openStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
DeletionTransformer deleter = new DeletionTransformer("anyelement", atts);
pipe.addComponent(deleter);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
ByteArrayOutputStream out = new ByteArrayOutputStream();
pipe.setup(out);
@@ -97,14 +97,14 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
atts.add(factory.createAttribute("attribute", "good"));
DeletionTransformer deleter = new DeletionTransformer("anyelement", atts);
pipe.addComponent(deleter);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModifaicationTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -28,9 +28,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.StartElementAttributeModificationTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -59,7 +59,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
@@ -68,7 +68,7 @@
StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
"anyelement", atts, newAtts);
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -97,7 +97,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
@@ -106,7 +106,7 @@
StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
"anyelement", atts, newAtts);
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModificationTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModificationTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModificationTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartElementAttributeModificationTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -28,9 +28,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.StartElementAttributeModificationTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -58,7 +58,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
@@ -67,7 +67,7 @@
StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
"anyelement", atts, newAtts);
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -96,7 +96,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
@@ -105,7 +105,7 @@
StartElementAttributeModificationTransformer modifier = new StartElementAttributeModificationTransformer(
"anyelement", atts, newAtts);
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModifaicationTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -28,9 +28,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.StartEndElementPairModificationTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -66,14 +66,14 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
"anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -102,7 +102,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
@@ -110,7 +110,7 @@
StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
"anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -139,14 +139,14 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
"anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModificationTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModificationTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModificationTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/StartEndElementPairModificationTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -28,9 +28,9 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.StartEndElementPairModificationTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -68,14 +68,14 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
"anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -106,7 +106,7 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
@@ -114,7 +114,7 @@
StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
"anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -145,14 +145,14 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
List<Attribute> atts = new ArrayList<Attribute>();
atts.add(factory.createAttribute("attribute", "bad"));
StartEndElementPairModificationTransformer modifier = new StartEndElementPairModificationTransformer(
"anyelement", atts, "somethingdifferent", new ArrayList<Attribute>());
pipe.addComponent(modifier);
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/SubSetTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/SubSetTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/SubSetTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/sample/test/SubSetTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -26,10 +26,10 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
-import org.apache.cocoon.stax.component.StAXCleaningTransformer;
+import org.apache.cocoon.stax.component.CleaningTransformer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.sample.src.SubSetTransformer;
import org.apache.commons.io.IOUtils;
import org.custommonkey.xmlunit.Diff;
@@ -64,10 +64,10 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
pipe.addComponent(new SubSetTransformer("element", factory.createAttribute(new QName("attribute"), "first")));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -95,10 +95,10 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
pipe.addComponent(new SubSetTransformer("element", factory.createAttribute(new QName("attribute"), "second")));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -126,12 +126,12 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
XMLEventFactory factory = XMLEventFactory.newInstance();
- pipe.addComponent(new StAXCleaningTransformer());
+ pipe.addComponent(new CleaningTransformer());
pipe.addComponent(new SubSetTransformer("element", factory.createAttribute(new QName("attribute"), "second"),
factory.createAttribute(new QName("attribute"), "first")));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
@@ -158,9 +158,9 @@
ByteArrayOutputStream out = new ByteArrayOutputStream();
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(input));
+ pipe.addComponent(new XMLGenerator(input));
pipe.addComponent(new SubSetTransformer("element"));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/EmitTransformerTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/EmitTransformerTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/EmitTransformerTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/EmitTransformerTest.java Mon Dec 21 13:53:55 2009
@@ -33,10 +33,10 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.pipeline.component.Consumer;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
import org.apache.cocoon.stax.StAXProducer;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.stress.src.EmitElementTransformer;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
@@ -132,9 +132,9 @@
InputStream in = new ByteArrayInputStream("<root/>".getBytes());
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(in));
+ pipe.addComponent(new XMLGenerator(in));
pipe.addComponent(new EmitElementTransformer("root", new ArrayList<Attribute>(), "element", 5));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/GeneratingStarterTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/GeneratingStarterTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/GeneratingStarterTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/GeneratingStarterTest.java Mon Dec 21 13:53:55 2009
@@ -23,7 +23,7 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.stress.src.GeneratingStarter;
import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit;
@@ -79,7 +79,7 @@
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
pipe.addComponent(new GeneratingStarter("root", "element", count));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
Modified: cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/HugeDataTest.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/HugeDataTest.java?rev=892822&r1=892821&r2=892822&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/HugeDataTest.java (original)
+++ cocoon/cocoon3/trunk/cocoon-stax/src/test/java/org/apache/cocoon/stax/stress/test/HugeDataTest.java Mon Dec 21 13:53:55 2009
@@ -30,10 +30,10 @@
import org.apache.cocoon.pipeline.NonCachingPipeline;
import org.apache.cocoon.pipeline.Pipeline;
-import org.apache.cocoon.stax.StAXGenerator;
import org.apache.cocoon.stax.StAXPipelineComponent;
-import org.apache.cocoon.stax.StAXSerializer;
import org.apache.cocoon.stax.component.IncludeTransformer;
+import org.apache.cocoon.stax.component.XMLGenerator;
+import org.apache.cocoon.stax.component.XMLSerializer;
import org.apache.cocoon.stax.stress.src.EmitElementTransformer;
import org.apache.cocoon.stax.stress.src.GeneratingStarter;
import org.apache.cocoon.stax.stress.src.OmitElementTransformer;
@@ -70,7 +70,7 @@
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
pipe.addComponent(new GeneratingStarter("root", "element", this.TEST_SIZE));
pipe.addComponent(new OmitElementTransformer("element", new ArrayList<Attribute>()));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
ByteArrayOutputStream out = new ByteArrayOutputStream();
pipe.setup(out);
@@ -93,9 +93,9 @@
InputStream in = new ByteArrayInputStream("<root/>".getBytes());
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(in));
+ pipe.addComponent(new XMLGenerator(in));
pipe.addComponent(new EmitElementTransformer("root", new ArrayList<Attribute>(), "element", this.TEST_SIZE));
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();
}
@@ -129,9 +129,9 @@
FileUtils.writeStringToFile(input, inputSource);
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(output));
Pipeline<StAXPipelineComponent> pipe = new NonCachingPipeline<StAXPipelineComponent>();
- pipe.addComponent(new StAXGenerator(new FileInputStream(input)));
+ pipe.addComponent(new XMLGenerator(new FileInputStream(input)));
pipe.addComponent(new IncludeTransformer());
- pipe.addComponent(new StAXSerializer());
+ pipe.addComponent(new XMLSerializer());
pipe.setup(out);
pipe.execute();