/*
- * Copyright 2005 the original author or authors.
- *
+ * Copyright 2005-2010 the original author or authors.
+ *
* 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.wamblee.xml;
-import junit.framework.TestCase;
-
-import org.w3c.dom.Document;
-
-import org.wamblee.io.ClassPathResource;
-import org.wamblee.io.FileSystemUtils;
-import org.wamblee.io.InputResource;
-
import java.io.ByteArrayOutputStream;
-import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+import org.wamblee.io.ClassPathResource;
+import org.wamblee.io.FileSystemUtils;
+import org.wamblee.io.InputResource;
+
/**
* Tests the XSL transformer.
*
.read(xmlResource.getInputStream()).getBytes();
try {
- Document output1 = transformer.transform(documentData, xslt);
+ transformer.transform(documentData, xslt);
} catch (TransformerException e) {
return; // ok
}
.read(xmlResource.getInputStream()).getBytes();
try {
- Document output1 = transformer.transform(documentData, xslt);
+ transformer.transform(documentData, xslt);
} catch (TransformerException e) {
return; // ok
}
.read(xmlResource.getInputStream()).getBytes();
try {
- Document output1 = transformer.transform(documentData, xslt);
+ transformer.transform(documentData, xslt);
} catch (TransformerException e) {
return; // ok
}
XslTransformer transformer = new XslTransformer();
try {
- Source source = transformer
+ transformer
.resolve("org/wamblee/xml/utilities-nonexistent.xsl");
} catch (TransformerException e) {
return; // ok