<?xml version="1.0" encoding="UTF-8"?>
<page-revisions type="array">
  <page-revision>
    <created-at type="datetime">2008-11-07T12:16:30Z</created-at>
    <description>ODF XSLT Runner Examples page added.</description>
    <id type="integer">994</id>
    <number type="integer">6</number>
    <page-id type="integer">90</page-id>
    <person-id type="integer">12</person-id>
    <text>__TOC__

== 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]].

== Getting and building ODF XSLT Runner ==

'''ODF XSLT Runner''' is build by a NetBeans project. After you have &lt;a href=&quot;{{project help page SourceControl}}&quot;&gt;checked out&lt;/a&gt; the [http://odftoolkit.org/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'''.

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

== Command Line Options ==

'''ODF XSLT Runner''' is called by one of the below command lines:

 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 &amp;lt;input package&amp;gt; [&amp;lt;output package&amp;gt; [name=value ...]]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -t &amp;lt;input package&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -r &amp;lt;package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file] 
 -o &amp;lt;input package&amp;gt; &amp;lt;output file&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -i &amp;lt;input file&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]

The default is to apply the XSLT stylesheet '''&amp;lt;style-sheet&amp;gt;''' to the stream '''content.xml''' of the ODF file '''&amp;lt;input package&amp;gt;'''. If no '''&amp;lt;output package&amp;gt;''' parameter is specified, then the result of the transformation will be printed to the standard output. If an '''&amp;lt;output package&amp;gt;''' is specified, the '''&amp;lt;input package&amp;gt;''' is copied to the '''&amp;lt;output package&amp;gt;''', and the steam '''content.xml''' of the '''&amp;lt;output package&amp;gt;''' is replaced with the result of the transformation.

The '''-p''' option allows to specify another stream in the package as source of the transformation than '''content.xml'''.

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 '''&amp;lt;output package&amp;gt;''', but other streams of '''&amp;lt;output package&amp;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.

The '''-i''' option allows to specify a plain XML file '''&amp;lt;input file&amp;gt;''' as source of the transformation. 

If the '''-o''' option is specified, the result of the transformation is stored in the plain '''&amp;lt;output file&amp;gt;''' rather than in a ODF package. This is for instance of interest if the result of the transformation is HTML.

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.

The '''-v''' option enables a verbose mode.

The '''-l''' option can be used to redirect diagnostic messages into a log file. By default they are printed on standard error.

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.

== Requirements ==

'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java.

It further requires [[ODFDOM]]. 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.

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'''.

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. 

'''Note:''' [[ODFDOM]] 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.

== Examples ==

Example stylesheets can be found on the [[ODFXSLTRunner Examples]] page.

&lt;p style=&quot;margin: 15px 0px&quot;&gt;&lt;center&gt;Back to: [[Home|ODF Toolkit Wiki Home]]&lt;/center&gt;&lt;/p&gt;
</text>
  </page-revision>
  <page-revision>
    <created-at type="datetime">2008-11-04T12:22:09Z</created-at>
    <description></description>
    <id type="integer">986</id>
    <number type="integer">5</number>
    <page-id type="integer">90</page-id>
    <person-id type="integer">12</person-id>
    <text>__TOC__

== 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]].

== Getting and building ODF XSLT Runner ==

'''ODF XSLT Runner''' is build by a NetBeans project. After you have &lt;a href=&quot;{{project help page SourceControl}}&quot;&gt;checked out&lt;/a&gt; the [http://odftoolkit.org/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'''.

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

== Command Line Options ==

'''ODF XSLT Runner''' is called by one of the below command lines:

 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 &amp;lt;input package&amp;gt; [&amp;lt;output package&amp;gt; [name=value ...]]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -t &amp;lt;input package&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -r &amp;lt;package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file] 
 -o &amp;lt;input package&amp;gt; &amp;lt;output file&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -i &amp;lt;input file&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]

The default is to apply the XSLT stylesheet '''&amp;lt;style-sheet&amp;gt;''' to the stream '''content.xml''' of the ODF file '''&amp;lt;input package&amp;gt;'''. If no '''&amp;lt;output package&amp;gt;''' parameter is specified, then the result of the transformation will be printed to the standard output. If an '''&amp;lt;output package&amp;gt;''' is specified, the '''&amp;lt;input package&amp;gt;''' is copied to the '''&amp;lt;output package&amp;gt;''', and the steam '''content.xml''' of the '''&amp;lt;output package&amp;gt;''' is replaced with the result of the transformation.

The '''-p''' option allows to specify another stream in the package as source of the transformation than '''content.xml'''.

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 '''&amp;lt;output package&amp;gt;''', but other streams of '''&amp;lt;output package&amp;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.

The '''-i''' option allows to specify a plain XML file '''&amp;lt;input file&amp;gt;''' as source of the transformation. 

If the '''-o''' option is specified, the result of the transformation is stored in the plain '''&amp;lt;output file&amp;gt;''' rather than in a ODF package. This is for instance of interest if the result of the transformation is HTML.

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.

The '''-v''' option enables a verbose mode.

The '''-l''' option can be used to redirect diagnostic messages into a log file. By default they are printed on standard error.

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.

== Requirements ==

'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java.

It further requires [[ODFDOM]]. 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.

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'''.

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. 

'''Note:''' [[ODFDOM]] 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.

&lt;p style=&quot;margin: 15px 0px&quot;&gt;&lt;center&gt;Back to: [[Home|ODF Toolkit Wiki Home]]&lt;/center&gt;&lt;/p&gt;
</text>
  </page-revision>
  <page-revision>
    <created-at type="datetime">2008-11-03T14:35:43Z</created-at>
    <description></description>
    <id type="integer">981</id>
    <number type="integer">4</number>
    <page-id type="integer">90</page-id>
    <person-id type="integer">12</person-id>
    <text>__TOC__

== 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]].

== Getting and building ODF XSLT Runner ==

'''ODF XSLT Runner''' is build by a NetBeans project. After you have &lt;a href=&quot;{{project help page SourceControl}}&quot;&gt;checked out&lt;/a&gt; the [http://odftoolkit.org/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'''.

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

== Command Line Options ==

'''ODF XSLT Runner''' is called by one of the below command lines:

 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 &amp;lt;input package&amp;gt; [&amp;lt;output package&amp;gt; [name=value ...]]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -t &amp;lt;input package&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -r &amp;lt;package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file] 
 -o &amp;lt;input package&amp;gt; &amp;lt;output file&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -i &amp;lt;input file&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]

The default is to apply the XSLT stylesheet '''&amp;lt;style-sheet&amp;gt;''' to the stream '''content.xml''' of the ODF file '''&amp;lt;input package&amp;gt;'''. If no '''&amp;lt;output package&amp;gt;''' parameter is specified, then the result of the transformation will be printed to the standard output. If an '''&amp;lt;output package&amp;gt;''' is specified, the '''&amp;lt;input package&amp;gt;''' is copied to the '''&amp;lt;output package&amp;gt;''', and the steam '''content.xml''' of the '''&amp;lt;output package&amp;gt;''' is replaced with the result of the transformation.

The '''-p''' option allows to specify another stream in the package as source of the transformation than '''content.xml'''.

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 '''&amp;lt;output package&amp;gt;''', but other streams of '''&amp;lt;output package&amp;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.

The '''-i''' option allows to specify a plain XML file '''&amp;lt;input file&amp;gt;''' as source of the transformation. 

If the '''-o''' option is specified, the result of the transformation is stored in the plain '''&amp;lt;output file&amp;gt;''' rather than in a ODF package. This is for instance of interest if the result of the transformation is HTML.

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.

The '''-v''' option enables a verbose mode.

The '''-l''' option can be used to redirect diagnostic messages into a log file. By default they are printed on standard error.

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.

== Requirements ==

'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java. It further requires [[ODFDOM]]. The ODFDOM '''odfdom.jar''' file must be either located in folder called '''lib''' next to the '''odfxsltrunner.jar''' file, or it must be in the '''classpath'''. 

'''Note:''' [[ODFDOM]] 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'''.

&lt;p style=&quot;margin: 15px 0px&quot;&gt;&lt;center&gt;Back to: [[Home|ODF Toolkit Wiki Home]]&lt;/center&gt;&lt;/p&gt;
</text>
  </page-revision>
  <page-revision>
    <created-at type="datetime">2008-11-03T14:35:11Z</created-at>
    <description></description>
    <id type="integer">980</id>
    <number type="integer">3</number>
    <page-id type="integer">90</page-id>
    <person-id type="integer">12</person-id>
    <text>__TOC__

== 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]].

== Getting and building ODF XSLT Runner ==

'''ODF XSLT Runner''' is build by a NetBeans project. After you have &lt;a href=&quot;{{project help page SourceControl}}&quot;&gt;checked out&lt;/a&gt; the [http://odftoolkit.org/sources/odf-xslt-Runner-src/show sources] from the Maercurial repoitory, you can open the project in [http://www.netbeans.info/downloads/index.php NetBeans] and build '''odfxsltrunner'''.

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

== Command Line Options ==

'''ODF XSLT Runner''' is called by one of the below command lines:

 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 &amp;lt;input package&amp;gt; [&amp;lt;output package&amp;gt; [name=value ...]]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -t &amp;lt;input package&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -r &amp;lt;package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file] 
 -o &amp;lt;input package&amp;gt; &amp;lt;output file&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -i &amp;lt;input file&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]

The default is to apply the XSLT stylesheet '''&amp;lt;style-sheet&amp;gt;''' to the stream '''content.xml''' of the ODF file '''&amp;lt;input package&amp;gt;'''. If no '''&amp;lt;output package&amp;gt;''' parameter is specified, then the result of the transformation will be printed to the standard output. If an '''&amp;lt;output package&amp;gt;''' is specified, the '''&amp;lt;input package&amp;gt;''' is copied to the '''&amp;lt;output package&amp;gt;''', and the steam '''content.xml''' of the '''&amp;lt;output package&amp;gt;''' is replaced with the result of the transformation.

The '''-p''' option allows to specify another stream in the package as source of the transformation than '''content.xml'''.

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 '''&amp;lt;output package&amp;gt;''', but other streams of '''&amp;lt;output package&amp;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.

The '''-i''' option allows to specify a plain XML file '''&amp;lt;input file&amp;gt;''' as source of the transformation. 

If the '''-o''' option is specified, the result of the transformation is stored in the plain '''&amp;lt;output file&amp;gt;''' rather than in a ODF package. This is for instance of interest if the result of the transformation is HTML.

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.

The '''-v''' option enables a verbose mode.

The '''-l''' option can be used to redirect diagnostic messages into a log file. By default they are printed on standard error.

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.

== Requirements ==

'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java. It further requires [[ODFDOM]]. The ODFDOM '''odfdom.jar''' file must be either located in folder called '''lib''' next to the '''odfxsltrunner.jar''' file, or it must be in the '''classpath'''. 

'''Note:''' [[ODFDOM]] 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'''.

&lt;p style=&quot;margin: 15px 0px&quot;&gt;&lt;center&gt;Back to: [[Home|ODF Toolkit Wiki Home]]&lt;/center&gt;&lt;/p&gt;
</text>
  </page-revision>
  <page-revision>
    <created-at type="datetime">2008-11-03T11:33:52Z</created-at>
    <description></description>
    <id type="integer">969</id>
    <number type="integer">2</number>
    <page-id type="integer">90</page-id>
    <person-id type="integer">12</person-id>
    <text>__TOC__

== 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]].

== Getting and building ODF XSLT Runner ==

'''ODF XSLT Runner''' is build by a NetBeans project. After you have checked out the [http://odftoolkit.org/sources/odf-xslt-Runner-src/show sources], you can open the project in [http://www.netbeans.info/downloads/index.php NetBeans] and build '''odfxsltrunner'''.

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

== Command Line Options ==

'''ODF XSLT Runner''' is called by one of the below command lines:

 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 &amp;lt;input package&amp;gt; [&amp;lt;output package&amp;gt; [name=value ...]]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -t &amp;lt;input package&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -r &amp;lt;package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file] 
 -o &amp;lt;input package&amp;gt; &amp;lt;output file&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -i &amp;lt;input file&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]

The default is to apply the XSLT stylesheet '''&amp;lt;style-sheet&amp;gt;''' to the stream '''content.xml''' of the ODF file '''&amp;lt;input package&amp;gt;'''. If no '''&amp;lt;output package&amp;gt;''' parameter is specified, then the result of the transformation will be printed to the standard output. If an '''&amp;lt;output package&amp;gt;''' is specified, the '''&amp;lt;input package&amp;gt;''' is copied to the '''&amp;lt;output package&amp;gt;''', and the steam '''content.xml''' of the '''&amp;lt;output package&amp;gt;''' is replaced with the result of the transformation.

The '''-p''' option allows to specify another stream in the package as source of the transformation than '''content.xml'''.

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 '''&amp;lt;output package&amp;gt;''', but other streams of '''&amp;lt;output package&amp;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.

The '''-i''' option allows to specify a plain XML file '''&amp;lt;input file&amp;gt;''' as source of the transformation. 

If the '''-o''' option is specified, the result of the transformation is stored in the plain '''&amp;lt;output file&amp;gt;''' rather than in a ODF package. This is for instance of interest if the result of the transformation is HTML.

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.

The '''-v''' option enables a verbose mode.

The '''-l''' option can be used to redirect diagnostic messages into a log file. By default they are printed on standard error.

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.

== Requirements ==

'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java. It further requires [[ODFDOM]]. The ODFDOM '''odfdom.jar''' file must be either located in folder called '''lib''' next to the '''odfxsltrunner.jar''' file, or it must be in the '''classpath'''. 

'''Note:''' [[ODFDOM]] 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'''.

&lt;p style=&quot;margin: 15px 0px&quot;&gt;&lt;center&gt;Back to: [[Home|ODF Toolkit Wiki Home]]&lt;/center&gt;&lt;/p&gt;
</text>
  </page-revision>
  <page-revision>
    <created-at type="datetime">2008-11-02T13:49:15Z</created-at>
    <description></description>
    <id type="integer">959</id>
    <number type="integer">1</number>
    <page-id type="integer">90</page-id>
    <person-id type="integer">12</person-id>
    <text>__TOC__

== Simplify the application of XSLT stylesheets to ODF documents ==
'''ODFXSLTRunner''' 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]].

== Getting and building ODFXSLTRunner ==

'''odfxsltrunner''' is build by a NetBeans project. After you have checked out the [http://odftoolkit.org/sources/odf-xslt-Runner-src/show sources], you can open the project in [http://www.netbeans.info/downloads/index.php NetBeans] and build '''odfxsltrunner'''.

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

== Command Line Options ==

'''ODFXSLTRunner''' is called by one of the below command lines:

 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 &amp;lt;input package&amp;gt; [&amp;lt;output package&amp;gt; [name=value ...]]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -t &amp;lt;input package&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -r &amp;lt;package&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file] 
 -o &amp;lt;input package&amp;gt; &amp;lt;output file&amp;gt; [name=value ...]
 
 java -jar odfxsltrunner.jar &amp;lt;style sheet&amp;gt; [-v] [-p &amp;lt;path in package&amp;gt;] [-l log file]
 -i &amp;lt;input file&amp;gt; &amp;lt;output package&amp;gt; [name=value ...]

The default is to apply the XSLT stylesheet '''&amp;lt;style-sheet&amp;gt;''' to the stream '''content.xml''' of the ODF file '''&amp;lt;input package&amp;gt;'''. If no '''&amp;lt;output package&amp;gt;''' parameter is specified, then the result of the transformation will be printed to the standard output. If an '''&amp;lt;output package&amp;gt;''' is specified, the '''&amp;lt;input package&amp;gt;''' is copied to the '''&amp;lt;output package&amp;gt;''', and the steam '''content.xml''' of the '''&amp;lt;output package&amp;gt;''' is replaced with the result of the transformation.

The '''-p''' option allows to specify another stream in the package as source of the transformation than '''content.xml'''.

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 '''&amp;lt;output package&amp;gt;''', but other streams of '''&amp;lt;output package&amp;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.

The '''-i''' option allows to specify a plain XML file '''&amp;lt;input file&amp;gt;''' as source of the transformation. 

If the '''-o''' option is specified, the result of the transformation is stored in the plain '''&amp;lt;output file&amp;gt;''' rather than in a ODF package. This is for instance of interest if the result of the transformation is HTML.

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.

The '''-v''' option enables a verbose mode.

The '''-l''' option can be used to redirect diagnostic messages into a log file. By default they are printed on standard error.

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.

== Requirements ==

'''odfxsltrunner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java. It further requires [[ODFDOM]]. The ODFDOM '''odfdom.jar''' file must be either located in folder called '''lib''' next to the '''odfxsltrunner.jar''' file, or it must be in the '''classpath'''. 

'''Note:''' [[ODFDOM]] 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'''.

&lt;p style=&quot;margin: 15px 0px&quot;&gt;&lt;center&gt;Back to: [[Home|ODF Toolkit Wiki Home]]&lt;/center&gt;&lt;/p&gt;
</text>
  </page-revision>
</page-revisions>
