Added:
trunk/resources/org/rdv/action/resources/OpenSeesHeader.xslt (props
changed)
- copied unchanged from r1339, /trunk/xslt/header.xslt
Removed:
trunk/xslt/header.xslt
Modified:
trunk/src/org/rdv/action/OpenSeesDataImportAction.java
Log:
Move OpenSees xslt file into resource directory.
Modified: trunk/src/org/rdv/action/OpenSeesDataImportAction.java
==============================================================================
--- trunk/src/org/rdv/action/OpenSeesDataImportAction.java (original)
+++ trunk/src/org/rdv/action/OpenSeesDataImportAction.java Mon Dec 8
13:31:37 2008
@@ -42,7 +42,6 @@
import java.io.IOException;
import java.io.StringWriter;
import java.net.URL;
-import java.net.URLDecoder;
import javax.swing.JOptionPane;
import javax.xml.transform.Result;
@@ -199,16 +198,13 @@
Source xmlSource = new StreamSource(input);
- URL stylesheetUrl =
getClass().getClassLoader().getResource("xslt/header.xslt");
+ String styleSheet = "org/rdv/action/resources/OpenSeesHeader.xslt";
+ URL stylesheetUrl =
getClass().getClassLoader().getResource(styleSheet);
if (stylesheetUrl == null)
return null;
- String stylesheetLocation =
URLDecoder.decode(stylesheetUrl.getFile(), "UTF-8");
-
- File stylesheet = new File(stylesheetLocation);
-
- Source xsltSource = new StreamSource(stylesheet);
+ Source xsltSource = new StreamSource(stylesheetUrl.openStream());
StringWriter writer = new StringWriter();
Result result = new StreamResult(writer);