X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fxml%2FXslTransformerTest.java;h=bf46528d4e31a4d304e23af7ca492510ad414fe4;hb=96c8961955a306314dfe0cf9ca192252de39fc1c;hp=8b06f01d683c8bfb47aca058dceb5f2555af1a2f;hpb=539c6d91b7a34e32c6669445d00e9275c337530a;p=utils diff --git a/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java b/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java index 8b06f01d..bf46528d 100644 --- a/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java +++ b/support/general/src/test/java/org/wamblee/xml/XslTransformerTest.java @@ -1,30 +1,21 @@ /* - * 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; @@ -35,6 +26,13 @@ import javax.xml.transform.TransformerException; 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. * @@ -123,7 +121,7 @@ public class XslTransformerTest extends TestCase { .read(xmlResource.getInputStream()).getBytes(); try { - Document output1 = transformer.transform(documentData, xslt); + transformer.transform(documentData, xslt); } catch (TransformerException e) { return; // ok } @@ -148,7 +146,7 @@ public class XslTransformerTest extends TestCase { .read(xmlResource.getInputStream()).getBytes(); try { - Document output1 = transformer.transform(documentData, xslt); + transformer.transform(documentData, xslt); } catch (TransformerException e) { return; // ok } @@ -174,7 +172,7 @@ public class XslTransformerTest extends TestCase { .read(xmlResource.getInputStream()).getBytes(); try { - Document output1 = transformer.transform(documentData, xslt); + transformer.transform(documentData, xslt); } catch (TransformerException e) { return; // ok } @@ -237,7 +235,7 @@ public class XslTransformerTest extends TestCase { XslTransformer transformer = new XslTransformer(); try { - Source source = transformer + transformer .resolve("org/wamblee/xml/utilities-nonexistent.xsl"); } catch (TransformerException e) { return; // ok