incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robw...@apache.org
Subject svn commit: r1161294 - /incubator/odf/site/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.mdtext
Date Wed, 24 Aug 2011 21:39:14 GMT
Author: robweir
Date: Wed Aug 24 21:39:14 2011
New Revision: 1161294

URL: http://svn.apache.org/viewvc?rev=1161294&view=rev
Log:
Initial conversion from Media Wiki to MDtext

Modified:
    incubator/odf/site/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.mdtext

Modified: incubator/odf/site/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.mdtext
URL: http://svn.apache.org/viewvc/incubator/odf/site/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.mdtext?rev=1161294&r1=1161293&r2=1161294&view=diff
==============================================================================
--- incubator/odf/site/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.mdtext (original)
+++ incubator/odf/site/trunk/content/odftoolkit/xsltrunner/ODFXSLTRunner.mdtext Wed Aug 24
21:39:14 2011
@@ -1,82 +1,117 @@
-__TOC__
+Title: ODF XSLT Runner
+##Simplify the application of XSLT stylesheets to ODF documents 
 
-== 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]].
+**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 available.
 
-== Getting and building ODF XSLT Runner ==
+## Getting and building ODF XSLT Runner
 
-'''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'''.
+**ODF XSLT Runner** 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 **odfxsltrunner**.
 
-A binary release of '''odfxsltrunner.jar''' is available in the [http://odftoolkit.org/projects/conformancetools/downloads
download section].
+A binary release of **odfxsltrunner.jar** is available in the download section].
 
-Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]]
for details.
+Building and running **odfxsltrunner.jar** requires additional jar files. 
+Please see Requirements for details.
 
-== Command Line Options ==
+## Command Line Options
 
-'''ODF XSLT Runner''' is called by one of the below command lines:
+**ODF XSLT Runner** is called by one of the below command lines:
 
- 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
...]
  
- 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
...]
- 
- 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 ...]
- 
- 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 ...]
- 
- 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
...]
 
-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.
+    java -jar odfxsltrunner.jar <style sheet> [-v] [-f <factory>] [-p <path
in package>]
+      [-l log file] <input package> [<output package> [name=value ...]
+     
+     java -jar odfxsltrunner.jar <style sheet> [-v] [-f <factory>] [-p <path
in package>]
+     [-l log file] -t <input package&gt; <output package&gt; [name=value ...]
+     
+     java -jar odfxsltrunner.jar <style sheet> [-v] [-f <factory>] [-p <path
in package&gt;]
+      [-l log file] -r <package> [name=value ...]
+     
+     java -jar odfxsltrunner.jar <style sheet>; [-v] [-f <factory>] [-p <path
in package&gt;]
+      [-l log file] [-x <extract path> ...] -o <input package> <output file>
[name=value ...]
+     
+     java -jar odfxsltrunner.jar <style sheet> [-v] [-f <factory>] [-p <path
in package&gt;]
+      [-l log file] -i <input file> <output package> [name=value ...]
+
+The default is to apply the XSLT stylesheet **<style-sheet>** to the stream 
+**content.xml** of the ODF file **&lt;input package&gt;**. 
+If no **<output package>** 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.
 
-The '''-p''' option allows to specify another stream in the package as source of the transformation
than '''content.xml'''.
+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 '''&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.
+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.
 
-The '''-i''' option allows to specify a plain XML file '''&lt;input file&gt;''' as
source of the transformation. 
+The **-i** option allows to specify a plain XML file **&lt;input file&gt;** as source
of the transformation. 
 
-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.
+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.
 
-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 **-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 **-v** option enables a verbose mode.
 
-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:
+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:
 
- java -cp odfxsltrunner.jar:&lt;factory jar&gt; org.odftoolkit.odfxsltrunner.Main
...
+     java -cp odfxsltrunner.jar:&lt;factory jar&gt; org.odftoolkit.odfxsltrunner.Main
...
 
-The '''-l''' option can be used to redirect diagnostic messages into a log file. By default
they are printed on standard error.
+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.
+XSLT [Parameters] [1] can be passed to the transformation by specifying them as name=value
pairs. They must appear behind all other command line parameters.
 
-== 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.
+## URI resolution/document() function
 
-'''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.
+If the source of a transformation is an ODF package, the XSLT 
+[document][2] 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.
 
-'''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:
+**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.
 
- <xsl:apply-templates select="document('styles.xml',.)//office:styles/style:style"/>
+**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:
 
+     <xsl:apply-templates select="document('styles.xml',.)//office:styles/style:style"/>
 
-== Requirements ==
 
-'''ODF XSLT Runner''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or
a later version of Java.
+## Requirements
 
-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.
+**ODF XSLT Runner** requires [J2RE 5] [3], or a later version of Java.
 
-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'''.
+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.
 
-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. 
+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**.
 
-'''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.
+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. 
 
-== Examples ==
+**Note:** ODFDOM requires [Apache Xerces] [4]. 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.
 
-Example stylesheets can be found on the [[ODFXSLTRunner Examples]] page.
+## Examples
 
-<p style="margin: 15px 0px"><center>Back to: [[Home|ODF Conformance and other
Tools Wiki Home]]</center></p>
+Example stylesheets can be found on the ODFXSLTRunner Examples page.
 
+[1]: http://www.w3.org/TR/1999/REC-xslt-19991116#top-level-variables
+[2]: http://www.w3.org/TR/1999/REC-xslt-19991116#document
+[3]: http://java.sun.com/javase/downloads/index.jsp
+[4]: http://xml.apache.org/dist/xerces-j/
\ No newline at end of file



Mime
View raw message