42 |
42 |
43 static final int SIMPLE_HIERARCHY_XSL = 4; |
43 static final int SIMPLE_HIERARCHY_XSL = 4; |
44 |
44 |
45 static final int SIMPLE_PBL_NODE = 5; |
45 static final int SIMPLE_PBL_NODE = 5; |
46 |
46 |
47 //static String destination_ = "/netshares/studenthomes/mlang/proto_v2/isac/proto2/isac/xmldata/"; |
47 static String destination_ = "/home/neuper/proto2/www/kbase/"; |
48 static String destination_ = "/netshares/studenthomes/mlang/xmldata/"; |
48 |
49 // static String destination_ = "/netshares/studenthomes/mlang/test_xml/"; |
49 public static void main(String[] argv) { |
50 |
|
51 /** |
|
52 * Method derived from HttpServlet to react on an request by an web-browser |
|
53 * AG? ................^^^^^^^^^^^ ??? |
|
54 * |
|
55 * @param request |
|
56 * object which holds informations about the request like the URL |
|
57 * used to access this servlet |
|
58 * @param arg1 |
|
59 * object which provides methods to return the results to the |
|
60 * web-browser. |
|
61 * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, |
|
62 * javax.servlet.http.HttpServletResponse) |
|
63 */ |
|
64 |
|
65 |
|
66 //FIXXME arguments for destination_ in main |
|
67 public static void main(String[] argv) { |
|
68 if (argv.length > 0) destination_ = argv[0]; |
50 if (argv.length > 0) destination_ = argv[0]; |
69 GenHTML genhtml = new GenHTML(); |
51 GenHTML genhtml = new GenHTML(); |
70 genhtml.buildHierarchy("met/code.html"); |
52 genhtml.buildHierarchy("met/code.html"); |
71 genhtml.buildHierarchy("met/index.html"); |
53 genhtml.buildHierarchy("met/index.html"); |
72 genhtml.buildHierarchy("met/heading.html"); |
54 genhtml.buildHierarchy("met/heading.html"); |
376 String contentfile = tokens.nextToken(); |
358 String contentfile = tokens.nextToken(); |
377 parameter.add(contentfile); |
359 parameter.add(contentfile); |
378 |
360 |
379 if (!contentfile.trim().endsWith(".xml")) { return; } |
361 if (!contentfile.trim().endsWith(".xml")) { return; } |
380 out = new FileWriter(destination_ + path + ".html"); |
362 out = new FileWriter(destination_ + path + ".html"); |
381 |
363 xmlSource = new StreamSource(new StringReader(InformationProcessor |
382 String test = InformationProcessor.loadXML(session, command, contentfile); |
364 .loadXML(session, command, contentfile))); |
383 System.out.println(test); |
|
384 xmlSource = new StreamSource(new StringReader(test)); |
|
385 |
|
386 xslSource = new StreamSource(getClass().getResourceAsStream( |
365 xslSource = new StreamSource(getClass().getResourceAsStream( |
387 "/isac/util/genhtml/templates/pbl_node_content.xsl")); |
366 "/isac/util/genhtml/templates/pbl_node_content.xsl")); |
388 // } |
367 // } |
389 // Perform the transformation, sending the output to the response. |
368 // Perform the transformation, sending the output to the response. |
390 out.write(header); |
369 out.write(header); |