incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r794851 - /websites/staging/odftoolkit/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.html
Date Wed, 24 Aug 2011 21:39:22 GMT
Author: buildbot
Date: Wed Aug 24 21:39:22 2011
New Revision: 794851

Log:
Staging update by buildbot

Modified:
    websites/staging/odftoolkit/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.html

Modified: websites/staging/odftoolkit/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.html (original)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.html Wed
Aug 24 21:39:22 2011
@@ -21,7 +21,7 @@
 
 <link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
 
-<title></title>
+<title>ODF XSLT Runner</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
 </head>
@@ -70,52 +70,92 @@
   </div>
   <div id="contenta">
   
-    
-    <p><strong>TOC</strong></p>
-<p>== Simplify the application of XSLT stylesheets to ODF documents ==
-'''ODF XSLT Runner''' is a small Java application that allows you to apply XSLT stylesheets
to XML streams included in ODF packages without extracting them from the package. It can be
used from the command line. A driver to use it within Ant buildfiles is also [[ODFXSLTRunnerTask|available]].</p>
-<p>== Getting and building ODF XSLT Runner ==</p>
-<p>'''ODF XSLT Runner''' is build by a NetBeans project. After you have <a href="{{project
help page SourceControl}}">checked out</a> the [http://odftoolkit.org/projects/conformancetools/sources/odf-xslt-runner-src/show
sources] from the Mercurial repository, you can open the project in [http://www.netbeans.info/downloads/index.php
NetBeans] and build '''odfxsltrunner'''.</p>
-<p>A binary release of '''odfxsltrunner.jar''' is available in the [http://odftoolkit.org/projects/conformancetools/downloads
download section].</p>
-<p>Building and running '''odfxsltrunner.jar''' requires additional jar files. Please
see [[#Requirements|Requirements]] for details.</p>
-<p>== Command Line Options ==</p>
-<p>'''ODF XSLT Runner''' is called by one of the below command lines:</p>
-<p>java -jar odfxsltrunner.jar &lt;style sheet&gt; [-v] [-f &lt;factory&gt;]
[-p &lt;path in package&gt;]
-  [-l log file] &lt;input package&gt; [&lt;output package&gt; [name=value
...]</p>
-<p>java -jar odfxsltrunner.jar &lt;style sheet&gt; [-v] [-f &lt;factory&gt;]
[-p &lt;path in package&gt;]
- [-l log file] -t &lt;input package&gt; &lt;output package&gt; [name=value
...]</p>
-<p>java -jar odfxsltrunner.jar &lt;style sheet&gt; [-v] [-f &lt;factory&gt;]
[-p &lt;path in package&gt;]
-  [-l log file] -r &lt;package&gt; [name=value ...]</p>
-<p>java -jar odfxsltrunner.jar &lt;style sheet&gt; [-v] [-f &lt;factory&gt;]
[-p &lt;path in package&gt;]
-  [-l log file] [-x &lt;extract path&gt; ...] -o &lt;input package&gt; &lt;output
file&gt; [name=value ...]</p>
-<p>java -jar odfxsltrunner.jar &lt;style sheet&gt; [-v] [-f &lt;factory&gt;]
[-p &lt;path in package&gt;]
-  [-l log file] -i &lt;input file&gt; &lt;output package&gt; [name=value
...]</p>
-<p>The default is to apply the XSLT stylesheet '''&lt;style-sheet&gt;''' to
the stream '''content.xml''' of the ODF file '''&lt;input package&gt;'''. If no '''&lt;output
package&gt;''' parameter is specified, then the result of the transformation will be printed
to the standard output. If an '''&lt;output package&gt;''' is specified, the '''&lt;input
package&gt;''' is copied to the '''&lt;output package&gt;''', and the steam '''content.xml'''
of the '''&lt;output package&gt;''' is replaced with the result of the transformation.</p>
-<p>The '''-p''' option allows to specify another stream in the package as source of
the transformation than '''content.xml'''.</p>
-<p>The '''-t''' options allows to specify a template for the output package. If it
is used, the result of the transformation is stored in the '''content.xml''' stream (or the
stream specified by the '''-p''' option) of the '''&lt;output package&gt;''', but
other streams of '''&lt;output package&gt;''' than that are not modified. This option
can be used together with the '''-i''' option to create an ODF file from a plain XML file.</p>
-<p>The '''-i''' option allows to specify a plain XML file '''&lt;input file&gt;'''
as source of the transformation. </p>
-<p>If the '''-o''' option is specified, the result of the transformation is stored
in the plain '''&lt;output file&gt;''' rather than in a ODF package. This is for instance
of interest if the result of the transformation is HTML. The '''-x''' option can be used to
extract further files from the input package. A file or directory specified by this option
is extracted from the package into the directory of the output file. The '''-x''' option can
be specified multiple times.</p>
-<p>The '''-r''' option allows to modify the '''content.xml''' stream (or the stream
specified by the '''-p''' option) in place. If it is specified, the result of the transformation
just replaces the stream that was the source of the transformation. This option should be
used with care, because it modifies the original input ODF file.</p>
-<p>The '''-v''' option enables a verbose mode.</p>
-<p>The '''-f''' option specifies the ''javax.xml.transform.TransformerFactory'' to
use. '''Note:''' When calling ''java'' with the ''-jar'' option, the user class path is ignored.
If a transformer factory is used which is not contained in the JRE, like Saxon, '''odfxsltrunner'''
has to be called without the ''-jar'' option:</p>
-<p>java -cp odfxsltrunner.jar:&lt;factory jar&gt; org.odftoolkit.odfxsltrunner.Main
...</p>
-<p>The '''-l''' option can be used to redirect diagnostic messages into a log file.
By default they are printed on standard error.</p>
-<p>XSLT [http://www.w3.org/TR/1999/REC-xslt-19991116#top-level-variables Parameters]
can be passed to the transformation by specifying them as name=value pairs. They must appear
behind all other command line parameters.</p>
-<p>== URI resolution/document() function ==
-If the source of a transformation is an ODF package, the XSLT ''[http://www.w3.org/TR/1999/REC-xslt-19991116#document
document()]'' function can be used to access other files in the package than the one that
is the source of the transformation. To do so, the first parameter of the ''document()'' function
must be a relative URI that references the file that shall be accessed. The reference must
be relative to the source file. The second parameter of the ''document()'' function must be
a node within the source file.</p>
-<p>'''Note:''' The second parameter specifies the base URI for the resolution of the
URI that is specified by the first parameter. This base URI is the base URI of the file that
contains the node that is passed as second parameter. If the second parameter is omitted,
the base URI is the one of the XSLT stylesheet containing the ''document()'' function itself.
'''odfxsltrunner''' runner uses the rules ODF defines for resolving relative URIs only for
URIs that are relative to a file within an ODF package.</p>
-<p>'''Example:''' When transforming a content.xml file contained in an ODF package,
the following rule applies templates to the style elements contained in the style.xml file:</p>
-<xsl:apply-templates select="document('styles.xml',.)//office:styles/style:style"/>
-
-<p>== Requirements ==</p>
-<p>'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE
5], or a later version of Java.</p>
-<p>It further requires <a href="{{project odfdom page home}}">ODFDOM</a>.
The NetBeans project is pre-configured to build ODFDOM while building '''ODF XSLT Runner'''.
This requires that the ODFDOM sources are located in a folder '''odfdom''' next to the folder
of the '''ODF XSLT Runner''' project.</p>
-<p>Alternatively, the reference to the ODFDOM project in the compile time classpath
of the '''ODF XSLT Runner''' project may be replaced with a reference to an already compiled
'''odfdom.jar'''.</p>
-<p>At run time, the '''odfdom.jar''' file must be either located in folder called '''lib'''
next to the '''odfxsltrunner.jar''' file, or it must be in the classpath. </p>
-<p>'''Note:''' <a href="{{project odfdom page home}}">ODFDOM</a> requires
[http://xml.apache.org/dist/xerces-j/ Apache's xerces]. The jar file '''xercesImpl.jar'''
also must exist in a folder '''lib''' next to '''odfxsltrunner.jar''' file, or it must be
in the classpath. The '''ODF XSLT Runner''' NetBeans projects includes a reference to '''xersesImpl.jar'''
in the runtime classpath which has to be adapted after checking out the project.</p>
-<p>== Examples ==</p>
-<p>Example stylesheets can be found on the [[ODFXSLTRunner Examples]] page.</p>
-<p style="margin: 15px 0px"><center>Back to: [[Home|ODF Conformance and other
Tools Wiki Home]]</center></p>
+    <h1 class="title">ODF XSLT Runner</h1>
+    <h2 id="simplify_the_application_of_xslt_stylesheets_to_odf_documents">Simplify
the application of XSLT stylesheets to ODF documents</h2>
+<p><strong>ODF XSLT Runner</strong> is a small Java application that allows
you to apply 
+XSLT stylesheets to XML streams included in ODF packages without extracting 
+them from the package. It can be used from the command line. A driver to use 
+it within Ant buildfiles is also available.</p>
+<h2 id="getting_and_building_odf_xslt_runner">Getting and building ODF XSLT Runner</h2>
+<p><strong>ODF XSLT Runner</strong> is build by a NetBeans project. After
you have checked out
+the sources from the Mercurial repository, you can open the project 
+in NetBeans and build <strong>odfxsltrunner</strong>.</p>
+<p>A binary release of <strong>odfxsltrunner.jar</strong> is available
in the download section].</p>
+<p>Building and running <strong>odfxsltrunner.jar</strong> requires additional
jar files. 
+Please see Requirements for details.</p>
+<h2 id="command_line_options">Command Line Options</h2>
+<p><strong>ODF XSLT Runner</strong> is called by one of the below command
lines:</p>
+<div class="codehilite"><pre><span class="n">java</span> <span
class="o">-</span><span class="n">jar</span> <span class="n">odfxsltrunner</span><span
class="o">.</span><span class="n">jar</span> <span class="o">&lt;</span><span
class="n">style</span> <span class="n">sheet</span><span class="o">&gt;</span>
<span class="p">[</span><span class="o">-</span><span class="n">v</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">f</span> <span class="sr">&lt;factory&gt;</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">p</span> <span class="o">&lt;</span><span class="n">path</span>
<span class="n">in</span> <span class="nb">package</span><span
class="o">&gt;</span><span class="p">]</span>
+  <span class="p">[</span><span class="o">-</span><span class="n">l</span>
<span class="nb">log</span> <span class="n">file</span><span class="p">]</span>
<span class="o">&lt;</span><span class="n">input</span> <span
class="nb">package</span><span class="o">&gt;</span> <span class="p">[</span><span
class="o">&lt;</span><span class="n">output</span> <span class="nb">package</span><span
class="o">&gt;</span> <span class="p">[</span><span class="n">name</span><span
class="o">=</span><span class="n">value</span> <span class="o">...</span><span
class="p">]</span>
+
+ <span class="n">java</span> <span class="o">-</span><span class="n">jar</span>
<span class="n">odfxsltrunner</span><span class="o">.</span><span
class="n">jar</span> <span class="o">&lt;</span><span class="n">style</span>
<span class="n">sheet</span><span class="o">&gt;</span> <span
class="p">[</span><span class="o">-</span><span class="n">v</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">f</span> <span class="sr">&lt;factory&gt;</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">p</span> <span class="o">&lt;</span><span class="n">path</span>
<span class="n">in</span> <span class="nb">package</span><span
class="o">&gt;</span><span class="p">]</span>
+ <span class="p">[</span><span class="o">-</span><span class="n">l</span>
<span class="nb">log</span> <span class="n">file</span><span class="p">]</span>
<span class="o">-</span><span class="n">t</span> <span class="o">&lt;</span><span
class="n">input</span> <span class="nb">package</span><span class="o">&amp;</span><span
class="ow">gt</span><span class="p">;</span> <span class="o">&lt;</span><span
class="n">output</span> <span class="nb">package</span><span class="o">&amp;</span><span
class="ow">gt</span><span class="p">;</span> <span class="p">[</span><span
class="n">name</span><span class="o">=</span><span class="n">value</span>
<span class="o">...</span><span class="p">]</span>
+
+ <span class="n">java</span> <span class="o">-</span><span class="n">jar</span>
<span class="n">odfxsltrunner</span><span class="o">.</span><span
class="n">jar</span> <span class="o">&lt;</span><span class="n">style</span>
<span class="n">sheet</span><span class="o">&gt;</span> <span
class="p">[</span><span class="o">-</span><span class="n">v</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">f</span> <span class="sr">&lt;factory&gt;</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">p</span> <span class="o">&lt;</span><span class="n">path</span>
<span class="n">in</span> <span class="nb">package</span><span
class="o">&amp;</span><span class="ow">gt</span><span class="p">;]</span>
+  <span class="p">[</span><span class="o">-</span><span class="n">l</span>
<span class="nb">log</span> <span class="n">file</span><span class="p">]</span>
<span class="o">-</span><span class="n">r</span> <span class="sr">&lt;package&gt;</span>
<span class="p">[</span><span class="n">name</span><span class="o">=</span><span
class="n">value</span> <span class="o">...</span><span class="p">]</span>
+
+ <span class="n">java</span> <span class="o">-</span><span class="n">jar</span>
<span class="n">odfxsltrunner</span><span class="o">.</span><span
class="n">jar</span> <span class="o">&lt;</span><span class="n">style</span>
<span class="n">sheet</span><span class="o">&gt;</span><span
class="p">;</span> <span class="p">[</span><span class="o">-</span><span
class="n">v</span><span class="p">]</span> <span class="p">[</span><span
class="o">-</span><span class="n">f</span> <span class="sr">&lt;factory&gt;</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">p</span> <span class="o">&lt;</span><span class="n">path</span>
<span class="n">in</span> <span class="nb">package</span><span
class="o">&amp;</span><span class="ow">gt</span><span class="p">;]</span>
+  <span class="p">[</span><span class="o">-</span><span class="n">l</span>
<span class="nb">log</span> <span class="n">file</span><span class="p">]</span>
<span class="p">[</span><span class="o">-</span><span class="n">x</span>
<span class="o">&lt;</span><span class="n">extract</span> <span
class="n">path</span><span class="o">&gt;</span> <span class="o">...</span><span
class="p">]</span> <span class="o">-</span><span class="n">o</span>
<span class="o">&lt;</span><span class="n">input</span> <span
class="nb">package</span><span class="o">&gt;</span> <span class="o">&lt;</span><span
class="n">output</span> <span class="n">file</span><span class="o">&gt;</span>
<span class="p">[</span><span class="n">name</span><span class="o">=</span><span
class="n">value</span> <span class="o">...</span><span class="p">]</span>
+
+ <span class="n">java</span> <span class="o">-</span><span class="n">jar</span>
<span class="n">odfxsltrunner</span><span class="o">.</span><span
class="n">jar</span> <span class="o">&lt;</span><span class="n">style</span>
<span class="n">sheet</span><span class="o">&gt;</span> <span
class="p">[</span><span class="o">-</span><span class="n">v</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">f</span> <span class="sr">&lt;factory&gt;</span><span
class="p">]</span> <span class="p">[</span><span class="o">-</span><span
class="n">p</span> <span class="o">&lt;</span><span class="n">path</span>
<span class="n">in</span> <span class="nb">package</span><span
class="o">&amp;</span><span class="ow">gt</span><span class="p">;]</span>
+  <span class="p">[</span><span class="o">-</span><span class="n">l</span>
<span class="nb">log</span> <span class="n">file</span><span class="p">]</span>
<span class="o">-</span><span class="n">i</span> <span class="o">&lt;</span><span
class="n">input</span> <span class="n">file</span><span class="o">&gt;</span>
<span class="o">&lt;</span><span class="n">output</span> <span
class="nb">package</span><span class="o">&gt;</span> <span class="p">[</span><span
class="n">name</span><span class="o">=</span><span class="n">value</span>
<span class="o">...</span><span class="p">]</span>
+</pre></div>
+
+
+<p>The default is to apply the XSLT stylesheet <strong><style-sheet></strong>
to the stream 
+<strong>content.xml</strong> of the ODF file <strong>&lt;input package&gt;</strong>.

+If no <strong><output package></strong> parameter is specified, then the
result of the transformation will be printed to the standard output. If an <strong>&lt;output
package&gt;</strong> is specified, the <strong>&lt;input package&gt;</strong>
is copied to the <strong>&lt;output package&gt;</strong>, and the steam
<strong>content.xml</strong> of the <strong>&lt;output package&gt;</strong>
is replaced with the result of the transformation.</p>
+<p>The <strong>-p</strong> option allows to specify another stream in the
package as source of the transformation than <strong>content.xml</strong>.</p>
+<p>The <strong>-t</strong> options allows to specify a template for the
output package. If it is used, the result of the transformation is stored in the <strong>content.xml</strong>
stream (or the stream specified by the <strong>-p</strong> option) of the <strong>&lt;output
package&gt;</strong>, but other streams of <strong>&lt;output package&gt;</strong>
than that are not modified. This option can be used together with the <strong>-i</strong>
option to create an ODF file from a plain XML file.</p>
+<p>The <strong>-i</strong> option allows to specify a plain XML file <strong>&lt;input
file&gt;</strong> as source of the transformation. </p>
+<p>If the <strong>-o</strong> option is specified, the result of the transformation
is stored in the plain <strong>&lt;output file&gt;</strong> rather than
in a ODF package. This is for instance of interest if the result of the transformation is
HTML. The <strong>-x</strong> option can be used to extract further files from
the input package. A file or directory specified by this option is extracted from the package
into the directory of the output file. The <strong>-x</strong> option can be specified
multiple times.</p>
+<p>The <strong>-r</strong> option allows to modify the <strong>content.xml</strong>
stream (or the stream specified by the <strong>-p</strong> option) in place. If
it is specified, the result of the transformation just replaces the stream that was the source
of the transformation. This option should be used with care, because it modifies the original
input ODF file.</p>
+<p>The <strong>-v</strong> option enables a verbose mode.</p>
+<p>The <strong>-f</strong> option specifies the ''javax.xml.transform.TransformerFactory''
to use. <strong>Note:</strong> When calling ''java'' with the ''-jar'' option,
the user class path is ignored. If a transformer factory is used which is not contained in
the JRE, like Saxon, <strong>odfxsltrunner</strong> has to be called without the
''-jar'' option:</p>
+<div class="codehilite"><pre> <span class="n">java</span> <span
class="o">-</span><span class="n">cp</span> <span class="n">odfxsltrunner</span><span
class="o">.</span><span class="n">jar:</span><span class="o">&amp;</span><span
class="ow">lt</span><span class="p">;</span><span class="n">factory</span>
<span class="n">jar</span><span class="o">&amp;</span><span
class="ow">gt</span><span class="p">;</span> <span class="n">org</span><span
class="o">.</span><span class="n">odftoolkit</span><span class="o">.</span><span
class="n">odfxsltrunner</span><span class="o">.</span><span class="n">Main</span>
<span class="o">...</span>
+</pre></div>
+
+
+<p>The <strong>-l</strong> option can be used to redirect diagnostic messages
into a log file. 
+By default they are printed on standard error.</p>
+<p>XSLT <a href="http://www.w3.org/TR/1999/REC-xslt-19991116#top-level-variables">Parameters</a>
can be passed to the transformation by specifying them as name=value pairs. They must appear
behind all other command line parameters.</p>
+<h2 id="uri_resolutiondocument_function">URI resolution/document() function</h2>
+<p>If the source of a transformation is an ODF package, the XSLT 
+<a href="http://www.w3.org/TR/1999/REC-xslt-19991116#document">document</a> function
can be used to access other files in the package than 
+the one that is the source of the transformation. To do so, the first parameter 
+of the <em>document()</em> function must be a relative URI that references the
file 
+that shall be accessed. The reference must be relative to the source file. 
+The second parameter of the <em>document()</em> function must be a node within
the 
+source file.</p>
+<p><strong>Note:</strong> The second parameter specifies the base URI for
the resolution of the 
+URI that is specified by the first parameter. This base URI is the base URI of 
+the file that contains the node that is passed as second parameter. If the 
+second parameter is omitted, the base URI is the one of the XSLT stylesheet 
+containing the <em>document()</em> function itself. <strong>odfxsltrunner</strong>
runner uses 
+the rules ODF defines for resolving relative URIs only for URIs that are 
+relative to a file within an ODF package.</p>
+<p><strong>Example:</strong> When transforming a content.xml file contained
in an ODF package, the following rule applies templates to the style elements contained in
the style.xml file:</p>
+<div class="codehilite"><pre> <span class="o">&lt;</span><span
class="n">xsl:apply</span><span class="o">-</span><span class="n">templates</span>
<span class="nb">select</span><span class="o">=</span><span class="s">&quot;document(&#39;styles.xml&#39;,.)//office:styles/style:style&quot;</span><span
class="o">/&gt;</span>
+</pre></div>
+
+
+<h2 id="requirements">Requirements</h2>
+<p><strong>ODF XSLT Runner</strong> requires <a href="http://java.sun.com/javase/downloads/index.jsp">J2RE
5</a>, or a later version of Java.</p>
+<p>It further requires ODFDOM. The NetBeans project is pre-configured to build 
+ODFDOM while building <strong>ODF XSLT Runner</strong>. This requires that the
ODFDOM 
+sources are located in a folder <strong>odfdom</strong> next to the folder of
the 
+<strong>ODF XSLT Runner</strong> project.</p>
+<p>Alternatively, the reference to the ODFDOM project in the compile time 
+classpath of the <strong>ODF XSLT Runner</strong> project may be replaced with
a reference 
+to an already compiled <strong>odfdom.jar</strong>.</p>
+<p>At run time, the <strong>odfdom.jar</strong> file must be either located
in folder called <strong>lib</strong> next to the <strong>odfxsltrunner.jar</strong>
file, or it must be in the classpath. </p>
+<p><strong>Note:</strong> ODFDOM requires <a href="http://xml.apache.org/dist/xerces-j/">Apache
Xerces</a>. The jar file <strong>xercesImpl.jar</strong> 
+also must exist in a folder <strong>lib</strong> next to <strong>odfxsltrunner.jar</strong>
file, or it 
+must be in the classpath. The <strong>ODF XSLT Runner</strong> NetBeans projects
includes a 
+reference to <strong>xersesImpl.jar</strong> in the runtime classpath which has
to be 
+adapted after checking out the project.</p>
+<h2 id="examples">Examples</h2>
+<p>Example stylesheets can be found on the ODFXSLTRunner Examples page.</p>
   </div>
 
   <div id="footera">



Mime
View raw message