Commit 4cf12192 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

Added Id

Added tran,smorpher transformations
Added API documentation skeleton
parent 55d5cf76
......@@ -23,12 +23,12 @@
<p></p>
<P><B>Next chapter: <A HREF="main.html">Export interface</A></B></P>
<P><B>Next chapter: <A HREF="install.html">Getting started with Transmorpher</A></B></P>
<HR>
<SMALL>
<ADDRESS>Feel free to comment to
<a href="mailto:transmorpher-dev@fluxmedia.fr">transmorpher-dev@fluxmedia.fr</a>,
$Id: annot.html,v 1.4 2002-10-15 16:38:11 serge Exp $
$Id: annot.html,v 1.5 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -62,12 +62,7 @@ useful and has to be ignored. This special channel is denoted by the
<SMALL>
<ADDRESS>Feel free to comment to
<a href="mailto:transmorpher-dev@fluxmedia.fr">transmorpher-dev@fluxmedia.fr</a>,
<!-- Created: Fri Feb 26 09:18:20 MET 1999 -->
<!-- hhmts start -->
Last modified: Tue May 29 14:16:53 CEST 2001
<!-- hhmts end -->
<BR />
$Id: channels.html,v 1.3 2002-10-13 19:20:21 jerome Exp $
$Id: channels.html,v 1.4 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -19,7 +19,7 @@
<P>Requires: </P>
-->
<H2>Generators</H2>
<H2><a name="generator">Generators</a></H2>
<H3>readvcs</H3>
<P>Author: Bruno Charre (INRIA Rhne-Alpes)</P>
......@@ -67,7 +67,7 @@
&lt;/generate&gt;</PRE></P>
<P>Requires: JTidy by ...</P>
<H2>Serializers</H2>
<H2><a name="serializer">Serializers</a></H2>
<H3>writevcs</H3>
<P>Author: Bruno Charre (INRIA Rhne-Alpes)</P>
......@@ -137,15 +137,15 @@ corresponding RTF file.</P>
<P>Requires: jfor (0.7.1)</P>
<H2>Mergers</H2>
<H2><a name="merger">Mergers</a></H2>
<H2>Dispatchers</H2>
<H2><a name="dispatcher">Dispatchers</a></H2>
<H2>External transformations</H2>
<H2><a name="external">External transformations</a></H2>
<H2>Iterators</H2>
<H2><a name="iterator">Iterators</a></H2>
<H2>Queries</H2>
<H2><a name="query">Queries</a></H2>
<P><B><A HREF="index.html">Back home</A></B></P>
<HR>
......@@ -154,7 +154,7 @@ corresponding RTF file.</P>
<SMALL>
<ADDRESS>Feel free to comment to
<a href="mailto:transmorpher-dev@fluxmedia.fr">transmorpher-dev@fluxmedia.fr</a>,
$Id: contrib.html,v 1.5 2002-10-13 19:20:21 jerome Exp $
$Id: contrib.html,v 1.6 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -67,8 +67,7 @@
<SMALL>
<ADDRESS>Feel free to comment to
<a href="mailto:transmorpher-dev@fluxmedia.fr">transmorpher-dev@fluxmedia.fr</a>,
<BR />
$Id: depend.html,v 1.3 2002-10-08 10:15:26 jerome Exp $
$Id: depend.html,v 1.4 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -71,6 +71,42 @@ Total time: 5 seconds
</pre>
</p>
<H2><A NAME="extend">Extending Transmorpher</A></H2>
<p>Transmorpher can be extended by adding new implementations of
Transmorpher components. The "theoretical" way to proceed is
described in the Extension API subsections.</p>
<p>Extensions share a <tt>parameter</tt> attribute that they can
access for getting the value of their parameters through
the <tt>fr.fluxmedia.transmorpher.Utils.Parameters</tt> interface.</p>
<p>The extensions must be declared for being taken into account by
Transmorpher.This declaration can be made either by providing the
full class name of the extension:
<listing>
&lt;call type="my.class.path.Extension"/&gt;
</listing>
or by declaring the extension:
<listing>
&lt;defextern name="ext" class="my.class.path.Extension" type="call"/&gt;
...
&lt;call type="ext"/&gt;
</listing>
</p>
<p>You are encouraged to take inspiration from the standard
implementations found in the stdlib package and the contributed
modules described <A HREF="contrib.html">here</A>.</p>
<H2><A NAME="manip">Manipulating Transmorpher</A></H2>
<p>Transmorpher can be manipulated, e.g., for embedding in other
software, through the manipulation API.</p>
<p>Good example of manipulation can be found in the sources of
Transmorpher. The API has been briefly described in this
manual. Some more information can be found in the <a
href="../api">javadoc</a> and the <a
href="../src">sources</a>.</p>
<P><B>Next chapter: <A HREF="contrib.html">Contributed modules</A></B></P>
<HR>
<CENTER><SMALL>http://transmorpher.inrialpes.fr/refman/dev.html</SMALL></CENTER>
......@@ -78,7 +114,7 @@ Total time: 5 seconds
<SMALL>
<ADDRESS>Feel free to comment to
<a href="mailto:transmorpher-dev@fluxmedia.fr">transmorpher-dev@fluxmedia.fr</a>,
$Id: dev.html,v 1.2 2002-10-13 19:20:21 jerome Exp $
$Id: dev.html,v 1.3 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -11,6 +11,9 @@
<p>The dispatcher is an element that has one input and many outputs. It can
be used for broadcasting the input to several channels or to selectively
separate some elements from others.</p>
<h2>XML declaration</h2>
<p>The <tt>dispatch</tt> element introduces the use of a dispatcher in a process
body. Its structure is the following:
<listing>
......@@ -19,8 +22,10 @@ body. Its structure is the following:
&lt;/dispatch&gt;
</listing></p>
<H2>Built-in dispatchers</H2>
<p>Transmorpher provides a basic implementation of a
dispatcher, its behavior is to copy the input to the
dispatcher (<tt>broadcast</tt>), its behavior is to copy the input to the
different outputs. It is used in the bibliography example for dispatching the input:
<listing>
&lt;dispatch type="broadcast" id="dispatch 2" in="R112" out="D1 D3"/&gt;
......@@ -29,6 +34,13 @@ different outputs. It is used in the bibliography example for dispatching the in
</p>
<center><p><img src="images/DispatchBasic.jpg" alt="DispatchBasic"/>
<br>Figure: Basic dispatcher</br></p></center>
<p>References to contributed extensions can be found <a href="contrib.html#dispatcher">here</a></p>
<h2>Manipulation API</h2>
<h2>Extension API</h2>
<p>
One can imagine more complex dispatchers. In the
bibliography example, a dispatcher could split the reference elements into a regular
......@@ -39,11 +51,28 @@ paper in order to transform the TIFF pictures into JPEG.
</p>
<center><p><img src="images/DispatchComplex.jpg" alt="DispatchComplex"/>
<br>Figure: Complex dispatcher</br></p></center>
<p>Implementing new dispatchers can be achieved by extending
the <tt>fr.fluxmedia.transmorpher.TProcessFactory.TDispatcher</tt>
class. This class extends the <tt>org.xml.sax.ContentHandler</tt>
interface which must be implemented in your class. This means that
the SAX events arriving by the input channel must be handled by the
new class.</p>
<p>Moreover, the class will have to communicate to the handlers that
implements the output channels the SAX events that you want to send
to them (at least, <tt>startDocument</tt> and <tt>endDocument</tt>).
These content handlers are found in the <tt>contentHandlers</tt>
variable (the content handler corresponding to output of rank <i>i</i>
by <tt>contentHandlers[<i>i</i>]</tt>).
</p>
<IMG SRC="images/merge.gif" ALIGN="RIGHT" ALT=" [ merge icon ] " WIDTH="80"/>
<H1><A NAME="dispatch">Mergers</A></H1>
<H1><A NAME="merge">Mergers</A></H1>
<p>The merger is a process that has several inputs and one output.</p>
<h2>XML declaration</h2>
<p>The <tt>merge</tt> element introduces the use of a merger in a process
body. Its structure is the following:
<listing>
......@@ -52,7 +81,10 @@ body. Its structure is the following:
&lt;/merge&gt;
</listing></p>
<p>Transmorpher provides a simple notion of merger that copies all
<h2>Built-in mergers</h2>
<p>Transmorpher provides two simple built-in mergers.
<tt>concat</tt> is a simple merger that copies all
the 2..n channels under the root element of
the first channel (preserving order). This merger is used in the
bibliography example for merging two source XML documents:
......@@ -61,12 +93,29 @@ the first channel (preserving order). This merger is used in the
</listing>
</p>
<center><p><img src="images/ConnectorBasic.jpg" alt="ConnectorBasic"/><br>Figure: Basic merger</br></p></center>
<p>A second merger, <tt>wrap</tt> wraps the tree corresponding of all
its input channels under a wrapping tag which will be the root element
of the output channel. It thus takes a <tt>tag</tt> parameter
containing the name of this root element.</p>
<p>References to contributed extensions can be found <a href="contrib.html#merger">here</a></p>
<h2>Manipulation API</h2>
<h2>Extension API</h2>
<p>One can imagine more complex mergers. For instance,
in the bibliography example, one can define a merger which merges a channel
of titles with a channel of authors to produce a channel of references.
</p>
<center><p><img src="images/ConnectorComplex.jpg" alt="ConnectorComplex"/><br>Figure: complex merger</br></p></center>
<center><p><img src="images/ConnectorComplex.jpg"
alt="ConnectorComplex"/><br>Figure: complex
merger</br></center></p>
<p>New mergers must extend
the <tt>fr.fluxmedia.transmorpher.TProcessFactory.TMerger</tt>
class. This class must provide handlers for handling input channels
and send resulting SAX events to the handler of the output channel.
TO BE COMPLETED, THIS IS MORE COMPLICATED.</p>
<P><B>Next chapter: <A HREF="import.html">External processes</A></B></P>
......@@ -79,7 +128,7 @@ of titles with a channel of authors to produce a channel of references.
Last modified: Tue May 29 14:16:53 CEST 2001
<!-- hhmts end -->
<BR />
$Id: dispatch.html,v 1.2 2001-10-10 07:29:23 jerome Exp $
$Id: dispatch.html,v 1.3 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -12,198 +12,13 @@ The actual DTD can be found at:
<A
HREF="http://transmorpher.inrialpes.fr/dtd/">http://transmorpher.inrialpes.fr/dtd/</A>
<!--center>
<hr WIDTH="100%">
<br><b>Process &amp; ruleset DTD</b>
<br>&nbsp;
<br>&nbsp;
<p><a NAME="Rule set"></a><b>Rule set</b></center>
<b></b>
<center><table BORDER COLS=2 WIDTH="80%" >
<tr>
<td>
<br>&lt;!<font color="#3366FF">ELEMENT</font> ruleset (maptag|remtag|flatten|modTag)*>
<br>&lt;!ATTLIST ruleset
<br>&nbsp;&nbsp; name CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> remtag EMPTY>
<br>&lt;!ATTLIST remtag
<br>&nbsp;match CDATA #REQUIRED
<br>&nbsp;content CDATA #REQUIRED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> flatten EMPTY>
<br>&lt;!ATTLIST flatten
<br>&nbsp;&nbsp; match CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> maptag EMPTY>
<br>&lt;!ATTLIST maptag
<br>&nbsp;match CDATA #REQUIRED
<br>&nbsp;target CDATA #REQUIRED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> modtag (mapatt|addatt|rematt)*>
<br>&lt;!ATTLIST modtag
<br>&nbsp;&nbsp; name CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> addatt EMPTY>
<br>&lt;!ATTLIST addatt
<br>&nbsp;value CDATA #REQUIRED
<br>&nbsp;name CDATA #REQUIRED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> rematt EMPTY>
<br>&lt;!ATTLIST rematt
<br>&nbsp;name CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> mapatt EMPTY>
<br>&lt;!ATTLIST mapatt
<br>&nbsp;name CDATA #REQUIRED
<br>&nbsp;target CDATA #REQUIRED></td>
<td>
<br>/<i>/This element allow to define ruleset element, this rule set is
a // set of elementary transformation</i>
<br><i></i>&nbsp;<i></i>
<p><i>//This element allow to delete a XML element&nbsp;</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//This element allow to flatten a XML element&nbsp;</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//This element allow to rename a XML element&nbsp;</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//This element allow to edit a XML element. The modification</i>
<br><i>of the XML element is a set of modification of attributes.</i>
<br><i></i>&nbsp;<i></i>
<p><i>//Add an attribute on the XML element with is value</i>
<br><i></i>&nbsp;<i></i>
<p><i>/Delete an Attribute on the XML element</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//Rename an Attribute on the XML element</i>
<br><i></i>&nbsp;
<br>&nbsp;</td>
</tr>
</table></center>
<b></b>
<br>&nbsp;
<center>
<p><a NAME="Process"></a><b>Process</b></center>
<p>s
<center><table BORDER COLS=2 WIDTH="80%" >
<tr>
<td>&lt;!<font color="#3366FF">ELEMENT</font> process (dispatch|generator|apply-ruleset|dispatch|apply-external|query|repeat)*>
<br>&lt;!ATTLIST process
<br>&nbsp;in CDATA #REQUIRED
<br>&nbsp;out CDATA #REQUIRED
<br>&nbsp;name CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> apply-external EMPTY>
<br>&lt;!ATTLIST apply-external
<br>&nbsp;&nbsp; type CDATA #REQUIRED
<br>&nbsp;&nbsp; in CDATA #REQUIRED
<br>&nbsp;&nbsp; out CDATA #REQUIRED
<br>&nbsp;&nbsp; name CDATA #IMPLIED
<br>&nbsp;&nbsp; file CDATA #REQUIRED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> apply-process EMPTY>
<br>&lt;!ATTLIST apply-process
<br>&nbsp;in CDATA #REQUIRED
<br>&nbsp;out CDATA #REQUIRED
<br>&nbsp;name CDATA #REQUIRED
<br>&nbsp;refOn CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> dispatch EMPTY>
<br>&lt;!ATTLIST dispatch
<br>&nbsp;&nbsp; type CDATA #REQUIRED
<br>&nbsp;&nbsp; in CDATA #REQUIRED
<br>&nbsp;&nbsp; out CDATA #REQUIRED
<br>&nbsp;&nbsp; name CDATA #IMPLIED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> generate EMPTY>
<br>&lt;!ATTLIST generate
<br>&nbsp;&nbsp; type CDATA #REQUIRED
<br>&nbsp;&nbsp; out CDATA #REQUIRED
<br>&nbsp;&nbsp; name CDATA #IMPLIED
<br>&nbsp;&nbsp; file CDATA #REQUIRED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> repeat EMPTY>
<br>&lt;!ATTLIST repeat
<br>&nbsp;in CDATA #REQUIRED
<br>&nbsp;out CDATA #REQUIRED
<br>&nbsp;name CDATA #IMPLIED
<br>&nbsp;time CDATA #REQUIRED>
<br>&nbsp;
<p>&lt;!<font color="#3366FF">ELEMENT</font> query EMPTY>
<br>&lt;!ATTLIST query
<br>&nbsp;in CDATA #REQUIRED
<br>&nbsp;out CDATA #REQUIRED
<br>&nbsp;name CDATA #IMPLIED
<br>&nbsp;file CDATA #REQUIRED>
<p>&lt;!<font color="#3366FF">ELEMENT</font> serialize EMPTY>
<br>&lt;!ATTLIST serialize
<br>&nbsp;in CDATA #REQUIRED
<br>&nbsp;name CDATA #IMPLIED
<br>&nbsp;file CDATA #REQUIRED></td>
<td><i>// This element allow to define an Compexe process as a combination
of basic (or complex) existing or defined process.</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//Apply an external transformation, by the way of</i>
<br><i>// an XSLT file</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//Apply a process defined previously</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//create a dispatch element</i>
<br><i>// The type attribute allow to chose the dispatcher</i>
<br><i>//use</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//create a generator element</i>
<br><i>// The type attribute allow to chose the generator</i>
<br><i>//use</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//create a repeat element</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//Create a query element</i>
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;
<br><i></i>&nbsp;<i></i>
<p><i>//create a serializer element</i>
<br><i>// The type attribute allow to chose the serializer</i>
<br><i>//use</i>
<br><i></i>&nbsp;</td>
</tr>
</table></center>
<br>&nbsp;
<center>
<p><a NAME="Main"></a><b>Main</b></center>
<p>&lt;!<font color="#3366FF">ELEMENT</font> main (((dispatch|generator|apply-ruleset|dispatch|apply-external|query|repeat|process))*)>
<br>&lt;!ATTLIST main
<br>&nbsp;&nbsp; name CDATA #IMPLIED>
<br>&nbsp;
<p>&lt;!<font color="#3366FF">ELEMENT</font> transmorpher ((ruleset|process)*,main)>
<br>&lt;!ATTLIST transmorpher
<br>&nbsp;xmlns:FM CDATA #IMPLIED>
<br-->
<P><B>Next chapter: <A HREF="gui.html">GUI chart</A></B></P>
<HR>
<SMALL>
<ADDRESS>Feel free to comment to
<a href="mailto:transmorpher-dev@fluxmedia.fr">transmorpher-dev@fluxmedia.fr</a>,
<BR />
$Id: dtd.html,v 1.5 2002-09-19 08:13:57 jerome Exp $
$Id: dtd.html,v 1.6 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -5,7 +5,74 @@
</HEAD>
<BODY TEXT="black" bgcolor="#FFFFFF">
<H1>The bibliography example</H1>
<H1>NEW EXAMPLE: Discography and gigs</H1>
<H2>Data</H2>
<H2>Transmorpher transformation</H2>
<LISTING>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE transmorpher SYSTEM "../../dtd/transmorpher.dtd"&gt;
&lt;transmorpher name="Music" version="1.0" xmlns:tm="http://transmorpher.fluxmedia.fr/"&gt;
&lt;query name="artist" type="tmq" root="music-collection"&gt;
&lt;param name="artist" select="TEST"/&gt;
&lt;select match="music-collection/owner"/&gt;
&lt;select match="music-collection/artist[name=$artist]"/&gt;
&lt;/query&gt;
&lt;ruleset name="stripTime"&gt;
&lt;remtag match="time" context="track"/&gt;
&lt;/ruleset&gt;
&lt;main name="Collection"&gt;
&lt;param name="artist"&gt;Dire Straits&lt;/param&gt;
&lt;param name="filename"&gt;Music-collection&lt;/param&gt;
&lt;generate id="generateXML" type="readfile" out="o"&gt;
&lt;with-param name="file"&gt;../samples/music/input/${filename}.xml&lt;/with-param&gt;
&lt;/generate&gt;
&lt;dispatch id="disp" type="broadcast" in="o" out="o1 o2"/&gt;
&lt;!-- page html
&lt;apply-ruleset ref="stripTime" id="Strip" in="o1" out="o11"/&gt;
&lt;apply-external id="xml2html" in="o11" out="o12" type="xslt"&gt;
&lt;with-param name="file"&gt;../samples/music/xslt/${filename}.xsl&lt;/with-param&gt;
&lt;/apply-external&gt;
&lt;serialize id="FormHTML" type="writefile" in="o12"&gt;
&lt;with-param name="file"&gt;../samples/music/results/${filename}.html&lt;/with-param&gt;
&lt;with-param name="indent"&gt;yes&lt;/with-param&gt;
&lt;/serialize&gt;
&lt;!-- page HTML de $artist --&gt;
&lt;apply-query type="tmq" ref="artist" id="query" in="o2" out="o22"&gt;
&lt;with-param name="artist"&gt;${artist}&lt;/with-param&gt;
&lt;/apply-query&gt;
&lt;apply-external id="xml2html" in="o22" out="o23" type="xslt"&gt;
&lt;with-param name="file"&gt;../samples/music/xslt/${filename}.xsl&lt;/with-param&gt;
&lt;with-param name="artist"&gt;${artist}&lt;/with-param&gt;
&lt;/apply-external&gt;
&lt;serialize id="FormDireHTML" type="writefile" in="o23"&gt;
&lt;with-param name="file"&gt;../samples/music/results/${artist}.html&lt;/with-param&gt;
&lt;with-param name="indent"&gt;yes&lt;/with-param&gt;
&lt;/serialize&gt;
&lt;/main&gt;
&lt;/transmorpher&gt;
</LISTING>
<H2>Results</H2>
<H1>OLD EXAMPLE: The bibliography example</H1>
<H2>Data</H2>
......@@ -79,8 +146,8 @@ productions. .&lt;/abstract>
<H2><A NAME="sample1">Sample 1 : this is a simple transformation</A></H2>
For example :
<br> this description define a complexe transformation
show in figure 1.0
<br> this description defines a complex transformation
shown in figure 1.0
<br>
<center><table BORDER COLS=1 WIDTH="90%" >
<tr>
......@@ -337,12 +404,7 @@ See <a href="perfs.html">performance</a>.
<SMALL>
<ADDRESS>Feel free to comment to
<A HREF="mailto:Jerome.Euzenat@inrialpes.fr?subject=comment on Transmorpher">J&eacute;r&ocirc;me Euzenat</A>,
<!-- Created: Fri Feb 26 09:18:20 MET 1999 -->
<!-- hhmts start -->
Last modified: Thu Apr 19 18:36:01 CEST 2001
<!-- hhmts end -->
<BR />
$Id: examples.html,v 1.3 2002-10-15 16:38:11 serge Exp $
$Id: examples.html,v 1.4 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>
</SMALL>
</body>
......
......@@ -20,6 +20,7 @@ output respectively).
<IMG SRC="images/generator.gif" ALIGN="RIGHT" ALT=" [ generator icon ] " WIDTH="80"/>
<H1><A NAME="generator">Generators</A></H1>
<h2>XML declaration</h2>
<p>The <tt>generate</tt> element introduces the use of a generator in a process
body. Its structure is the following:
<listing>
......@@ -40,9 +41,32 @@ These files are read through the use of the <tt>generate</tt> element:
&lt;/generate&gt;
</listing></p>
<IMG SRC="images/serializer.gif" ALIGN="RIGHT" ALT=" [ serializer icon ] " WIDTH="80"/>
<h2>Built-in generators</h2>
<p>Transmorpher offers the <tt>readfile</tt> built-in generator which
reads an XML file or an URL (identified through a <tt>file</tt>
parameter and output the SAX events corresponding to its content.</p>
<p>References to contributed generators can be found <a href="contrib.html#generator">here</a></p>
<h2>Manipulation API</h2>
<h2>Extension API</h2>
<p>A generator extends
the <tt>fr.fluxmedia.transmorpher.TProcessFactory.TReader</tt>
class. It will be connected to the next SAX handler (contained in
its <tt></tt> attribute) to which it must send the SAX events
generated.</p>
<p>In addition, <tt>TReader</tt> implements the <tt>Runnable</tt>
class. This means that the generators must provide
the <tt>execProcess()</tt> and <tt>run()</tt> methods. TO BE COMPLETED.</tt>
<IMG SRC="images/serializer.gif" ALIGN="RIGHT" ALT=" [ serializer icon
] " WIDTH="80"/>
<H1><A NAME="serial">Serializers</A></H1>
<h2>XML declaration</h2>
<p>The <tt>serialize</tt> element introduces the use of a serializer in a process
body. Its structure is the following:
<listing>
......@@ -75,6 +99,25 @@ elements:
or the Internet. It can also generate XML from a database.</p>
<p/>
<h2>Built-in serializers</h2>
<p>Transmorpher provides built-in serializers for writing XML in a
file (<tt>writefile</tt> which takes a <tt>file</tt> parameter
identifying this file) or for writting to standard output
(<tt>stdout</tt>). Both serializers takes additionnal parameters
corresponding to the attributes of an <tt>xsl:output</tt> element:
</p>
<p>References to contributed extensions can be found <a href="contrib.html#serializer">here</a></p>
<h2>Manipulation API</h2>
<h2>Extension API</h2>
<p>A serializer extends
the <tt>fr.fluxmedia.transmorpher.TProcessFactory.TSerializer</tt>
class. It must implement a SAX <tt>ContentHandler</tt> and
serialize the SAX events the appropriate way. This handler will be
called directly by the process connected by the input channel.</p>
<P><B>Next chapter: <A HREF="dispatch.html">Dispatchers</A></B></P>
<HR>
......@@ -86,7 +129,7 @@ or the Internet. It can also generate XML from a database.</p>
Last modified: Tue May 29 14:16:53 CEST 2001
<!-- hhmts end -->
<BR />
$Id: generators.html,v 1.3 2002-10-13 19:20:21 jerome Exp $
$Id: generators.html,v 1.4 2002-10-16 07:30:32 jerome Exp $
</ADDRESS>