Commit 5f82c972 authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Now, generated servlet doesn't write in a file but in the standard output.

servlet request parameters are compared with parameters of each serializer.
If all parameters are equals then the serializer is plug to standard output.
Changes in process file take care about that.
parent 578d572b
# README for confpgm sample:
# demonstration of servlet generation and installation from Transmorpher
# $Id: README.TXT,v 1.2 2002-10-18 14:05:02 triolet Exp $
# $Id: README.TXT,v 1.3 2002-11-08 09:46:50 triolet Exp $
1 - generate java code of the servlet
cd samples/confpgm/WAR/
java ../../../lib/transmo.jar -compile ../process.xml
java -jar ../../../lib/transmo.jar ../process.xml -compile
The generated file is in confpgm/WAR/WEB-INF/result
......
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<!-- DOCTYPE xsl:stylesheet SYSTEM ""-->
<!-- $Id: form-htab.xsl,v 1.1 2002-10-07 14:36:20 triolet Exp $
<!-- $Id: form-htab.xsl,v 1.2 2002-11-08 09:46:50 triolet Exp $
This stylesheet convert a conference program document into a table formated
program
-->
......@@ -26,24 +26,27 @@ program
<xsl:template match="pgm:conference">
<h1><xsl:value-of select="@name"/> overview</h1>
<small>Detailled technical program:
<a href="program.html">HTML</a> !
<a href="program.vcs">vCal</a> !
<a href="/ProcessProgram/ProcessProgram?filename=program.html">HTML</a> !
<a href="/ProcessProgram/ProcessProgram?filename=program.vcs">vCal</a> !
<!--
<a href="program.daml">DAML+OIL</a> !
-->
<a href="overview.rdf">RDF/iCal</a> !
<a href="program.xml">XML/Confpgm</a></small><br />
<a href="/ProcessProgram/ProcessProgram?filename=overview.rdf">RDF/iCal</a> !
<a href="/ProcessProgram/ProcessProgram?filename=program.daml">DAML</a> !
<a href="/ProcessProgram/ProcessProgram?filename=program.xml">XML</a></small><br />
<table width="100%" border="1">
<xsl:apply-templates/>
</table>
<small><a href="program.html">technical program in HTML</a><br/>
<a href="program.vcs">vCal format (for Palm, Calendar, PocketPC)</a><br />
<small><a href="/ProcessProgram/ProcessProgram?filename=program.html">technical program in HTML</a><br/>
<a href="/ProcessProgram/ProcessProgram?filename=program.vcs">vCal format (for Palm, Calendar, PocketPC)</a><br />
<!--
<a href="program.daml">DAML+OIL format</a><br />
-->
<a href="overview.rdf">RDF/iCal format</a><br />
<a href="program.xml">raw XML/Confpgm format (source)</a></small><br />
<a href="/ProcessProgram/ProcessProgram?filename=overview.rdf">RDF/iCal format</a><br />
<a href="/ProcessProgram/ProcessProgram?filename=program.daml">DAML</a><br />
<a href="/ProcessProgram/ProcessProgram?filename=program.xml">raw XML/Confpgm format (source)</a></small><br />
</xsl:template>
<xsl:template match="pgm:day">
......
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<!-- $Id: form-iswc.xsl,v 1.1 2002-10-07 14:36:20 triolet Exp $ -->
<!-- $Id: form-iswc.xsl,v 1.2 2002-11-08 09:46:50 triolet Exp $ -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
......@@ -93,12 +93,13 @@ width="80%" /></a>
<tr>
<td colspan="2">
<p>
<a href="overview.html">Overview</a><br/>
<a href="program.html">Detailled technical program</a><br/>
<a href="program.vcs">vCal</a><br/>
<a href="overview.rdf">RDF/iCal</a><br/>
<a href="program.xml">XML/Confpgm</a><br/>
<br/></p>
<a href="/ProcessProgram/ProcessProgram?filename=overview.html">Overview</a><br/>
<a href="/ProcessProgram/ProcessProgram?filename=program.html">Detailled technical program</a><br/>
<a href="/ProcessProgram/ProcessProgram?filename=program.vcs">vCal</a><br/>
<a href="/ProcessProgram/ProcessProgram?filename=overview.rdf">RDF/iCal</a><br/>
<a href="/ProcessProgram/ProcessProgram?filename=program.daml">DAML</a><br/>
<a href="/ProcessProgram/ProcessProgram?filename=program.xml">XML</a><br/>
<br/></p>
</td>
</tr>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE transmorpher SYSTEM "../../dtd/transmorpher.dtd">
<!-- $Id: process.xml,v 1.3 2002-10-30 12:33:46 triolet Exp $ -->
<!-- $Id: process.xml,v 1.4 2002-11-08 09:46:50 triolet Exp $ -->
<!-- ############################################################
Generates program of the International Semantic Web Conference
......@@ -24,100 +24,95 @@
</ruleset>
<!-- ############# MAIN ############### -->
<servlet name="ProcessProgram">
<param name="filename">default</param>
<!-- ############# GENERATE ############### -->
<generate type="readfile" id="source" out="R1">
<with-param name="file">WEB-INF/input/program.xml</with-param>
</generate>
<!-- ############# DISPATCH ############### -->
<dispatch type="broadcast" id="dispatch1" in="R1" out="X1 X2 X3 X4 X5 X6"/>
<dispatch type="broadcast" id="dispatch1" in="R1" out="X1 X2 X3 X4 X5"/>
<!-- ############# APPLY-RULESET ############### -->
<apply-ruleset ref="stripDetails" id="StripTalks" in="X1" out="Y1"/>
<!-- ############# DISPATCH ############### -->
<dispatch type="broadcast" id="dispatch1" in="Y1" out="YY1 YY2"/>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatHTML" in="YY1" out="Z1">
<with-param name="file">WEB-INF/xslt/form-htab.xsl</with-param>
</apply-external>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeHTML" in="Z1">
<with-param name="file">overview.html</with-param>
<with-param name="method">xml</with-param>
<with-param name="filename">overview.html</with-param>
<with-param name="method">xhtml</with-param>
<with-param name="content-type">text/html</with-param>
</serialize>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatRDF" in="YY2" out="ZZ1">
<with-param name="file">WEB-INF/xslt/form-rdf.xsl</with-param>
</apply-external>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeXML" in="ZZ1">
<serialize type="writefile" id="writeRDF" in="ZZ1">
<with-param name="filename">overview.rdf</with-param>
<with-param name="file">overview.rdf</with-param>
<with-param name="method">xml</with-param>
<with-param name="content-type">text/plain</with-param>
<with-param name="standalone">yes</with-param>
</serialize>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatHTML2" in="X2" out="Z2">
<with-param name="file">WEB-INF/xslt/form-html.xsl</with-param>
</apply-external>
<dispatch type="broadcast" id="dispatch" in="Z2" out="Z21 Z22"/>
<!-- ############# SERIALIZER ############### -->
<serialize type="standardOutput" id="writeHTML2SO" in="Z21">
<with-param name="method">xml</with-param>
</serialize>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeHTML2" in="Z22">
<serialize type="writefile" id="writeHTML2" in="Z2">
<with-param name="filename">program.html</with-param>
<with-param name="file">program.html</with-param>
<with-param name="method">xml</with-param>
<with-param name="content-type">text/html</with-param>
</serialize>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatVCAL" in="X3" out="Z3">
<with-param name="file">WEB-INF/xslt/form-vcal.xsl</with-param>
</apply-external>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeVCAL" in="Z3">
<with-param name="filename">program.vcs</with-param>
<with-param name="file">program.vcs</with-param>
<with-param name="method">text</with-param>
<with-param name="content-type">text/plain</with-param>
</serialize>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatXML" in="X4" out="Y2">
<with-param name="file">WEB-INF/xslt/form-vxml.xsl</with-param>
</apply-external>
<!-- ############# DISPATCH ############### -->
<dispatch type="broadcast" id="dispatch1" in="Y2" out="Z4 Y3"/>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeXML" in="Z4">
<with-param name="file">essai.xml</with-param>
<with-param name="method">xml</with-param>
<with-param name="encoding">ISO-8859-1</with-param>
<with-param name="omit-xml-declaration">no</with-param>
<with-param name="standalone">no</with-param>
<with-param name="doctype-system">/WEB-INF/input/vcalxml.dtd</with-param>
<with-param name="indent">yes</with-param>
</serialize>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatVCAL2" in="Y3" out="Z5">
<with-param name="file">WEB-INF/xslt/form-xvcs.xsl</with-param>
</apply-external>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeVCAL2" in="Z5">
<with-param name="file">essai.vcs</with-param>
<with-param name="method">text</with-param>
<with-param name="omit-xml-declaration">yes</with-param>
</serialize>
<!-- ############# APPLY-EXTERNAL ############### -->
<apply-external type="xslt" id="FormatDAML" in="X5" out="Y5">
<apply-external type="xslt" id="FormatDAML" in="X4" out="Y4">
<with-param name="file">WEB-INF/xslt/form-daml.xsl</with-param>
</apply-external>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeDAML" in="Y5">
<serialize type="writefile" id="writeDAML" in="Y4">
<with-param name="filename">program.daml</with-param>
<with-param name="file">program.daml</with-param>
<with-param name="method">xml</with-param>
<with-param name="content-type">text/plain</with-param>
</serialize>
<!-- ############# SERIALIZER ############### -->
<serialize type="writefile" id="writeXML" in="X6">
<serialize type="writefile" id="writeXML" in="X5">
<with-param name="filename">program.xml</with-param>
<with-param name="file">program.xml</with-param>
<with-param name="method">xml</with-param>
<with-param name="content-type">text/plain</with-param>
</serialize>
</servlet>
</transmorpher>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment