ML: implemented a testcase for generating a html-file out of ine xml-file ML_test
authormlang
Wed, 06 Jul 2005 11:08:50 +0200
branchML_test
changeset 2896d7b07dc8e91
parent 288 88d53ecfb298
child 290 3f76f7d39384
ML: implemented a testcase for generating a html-file out of ine xml-file
src/java/isac/util/genhtml/GenHTML.java
     1.1 --- a/src/java/isac/util/genhtml/GenHTML.java	Wed Jul 06 11:08:50 2005 +0200
     1.2 +++ b/src/java/isac/util/genhtml/GenHTML.java	Wed Jul 06 11:08:50 2005 +0200
     1.3 @@ -40,13 +40,14 @@
     1.4  
     1.5      static final int EXPTREE_XSL = 3;
     1.6  
     1.7 +    //FIXXME looking for simple hierachys for exp, pbl, and met
     1.8      static final int SIMPLE_HIERARCHY_XSL = 4;
     1.9  
    1.10      static final int SIMPLE_PBL_NODE = 5;
    1.11  
    1.12      //static String destination_ = "/netshares/studenthomes/mlang/proto_v2/isac/proto2/isac/xmldata/";
    1.13      static String destination_ = "/netshares/studenthomes/mlang/xmldata/";	
    1.14 -    
    1.15 +   // static String destination_ = "/netshares/studenthomes/mlang/test_xml/";	
    1.16      
    1.17      /**
    1.18       * Method derived from HttpServlet to react on an request by an web-browser
    1.19 @@ -62,6 +63,8 @@
    1.20       *      javax.servlet.http.HttpServletResponse)
    1.21       */
    1.22  
    1.23 +   
    1.24 +   //FIXXME arguments for destination_ in main 
    1.25      public static void main(String[] argv) {
    1.26          if (argv.length > 0) destination_ = argv[0];
    1.27          GenHTML genhtml = new GenHTML();
    1.28 @@ -376,8 +379,11 @@
    1.29  
    1.30              if (!contentfile.trim().endsWith(".xml")) { return; }
    1.31              out = new FileWriter(destination_ + path + ".html");
    1.32 -            xmlSource = new StreamSource(new StringReader(InformationProcessor
    1.33 -                    .loadXML(session, command, contentfile)));
    1.34 +            
    1.35 +            String test = InformationProcessor.loadXML(session, command, contentfile);
    1.36 +            System.out.println(test);
    1.37 +            xmlSource = new StreamSource(new StringReader(test));
    1.38 +                       
    1.39              xslSource = new StreamSource(getClass().getResourceAsStream(
    1.40                      "/isac/util/genhtml/templates/pbl_node_content.xsl"));
    1.41              //		}