[rdv commit] r1340 - in trunk: resources/org/rdv/action/resources src/org/rdv/action xslt

0 views
Skip to first unread message

codesite...@google.com

unread,
Dec 8, 2008, 4:32:56 PM12/8/08
to rdv-c...@googlegroups.com
Author: ja...@paltasoftware.com
Date: Mon Dec 8 13:31:37 2008
New Revision: 1340

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);

Reply all
Reply to author
Forward
0 new messages