From odf-commits-return-41-apmail-incubator-odf-commits-archive=incubator.apache.org@incubator.apache.org Thu Aug 25 00:25:59 2011 Return-Path: X-Original-To: apmail-incubator-odf-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-odf-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F5DB8A0B for ; Thu, 25 Aug 2011 00:25:59 +0000 (UTC) Received: (qmail 18872 invoked by uid 500); 25 Aug 2011 00:25:59 -0000 Delivered-To: apmail-incubator-odf-commits-archive@incubator.apache.org Received: (qmail 18842 invoked by uid 500); 25 Aug 2011 00:25:58 -0000 Mailing-List: contact odf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: odf-dev@incubator.apache.org Delivered-To: mailing list odf-commits@incubator.apache.org Received: (qmail 18827 invoked by uid 99); 25 Aug 2011 00:25:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2011 00:25:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2011 00:25:55 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 746F52388B9B for ; Thu, 25 Aug 2011 00:25:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r794867 - in /websites/production/odftoolkit: ./ content/odftoolkit/xsltrunner/ODFXSLTRunnerTask.html Date: Thu, 25 Aug 2011 00:25:34 -0000 To: odf-commits@incubator.apache.org From: robweir@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110825002534.746F52388B9B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: robweir Date: Thu Aug 25 00:25:34 2011 New Revision: 794867 Log: Publishing merge to odftoolkit site by robweir Modified: websites/production/odftoolkit/ (props changed) websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerTask.html Propchange: websites/production/odftoolkit/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Aug 25 00:25:34 2011 @@ -1 +1 @@ -/websites/staging/odftoolkit/trunk:794771-794862 +/websites/staging/odftoolkit/trunk:794771-794866 Modified: websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerTask.html ============================================================================== --- websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerTask.html (original) +++ websites/production/odftoolkit/content/odftoolkit/xsltrunner/ODFXSLTRunnerTask.html Thu Aug 25 00:25:34 2011 @@ -21,7 +21,7 @@ - +ODFXSLTRunnerTask @@ -77,21 +77,36 @@
- -

TOC

-

== Apply XSLT stylesheets to ODF documents with Ant == -'''ODFXSLTRunnerTask''' is a task definition for [http://ant.apache.org/ Ant] which allows to apply XSLT stylesheets to ODF documents similar to Ant's build-in <xslt> [http://ant.apache.org/manual/CoreTasks/style.html task]. It is based on [[ODFXSLTRunner]]. Please see [[ODFXSLTRunner]] for further details of its operation.

-

== Getting and building ODFXSLTRunnerTask ==

-

'''odfxsltrunnertask''' is build by a NetBeans project. After you have checked out the [http://odftoolkit.org/projects/conformancetools/sources/odf-xslt-runner-task-src/show], you can open the project in [http://www.netbeans.info/downloads/index.php NetBeans] and build '''odfxsltrunnertask'''.

-

A binary release of '''odfxsltrunnertask.jar''' is available in the [http://odftoolkit.org/projects/conformancetools/downloads download section].

-

Building and running '''odfxsltrunner.jar''' requires additional jar files. Please see [[#Requirements|Requirements]] for details.

-

== Usage ==

-

To use '''odfxsltrunner.jar''' with Ant, you have to include the following [http://ant.apache.org/manual/CoreTasks/taskdef.html task definition] into your buildfile, where ''<path>'' has to be replaced with the path where you have stored the '''odfxsltrunnertask.jar''' and '''odfxsltrunner.jar''' files:

-

<taskdef name="odfxslt" classname="odfxsltrunnertask.ODFXSLTRunnerTask" - classpath="''<path>''/odfxsltrunnertak.jar:''<path>''/odfxsltrunner.jar"/>

-

You can use this task definition on the top level (that is as a child element of the <project> element or locally within a single <target> element. It defines a new task <odfxslt> which allows to process ODF documents with XSLT stylesheets.

-

The new task supports the use of nested <param> and <factory>elements which have the same meaning as the <param> and <factory> child elements of the <xslt> [http://ant.apache.org/manual/CoreTasks/style.html task].

-

== Parameters ==

+

ODFXSLTRunnerTask

+

Apply XSLT stylesheets to ODF documents with Ant

+

ODFXSLTRunnerTask is a task definition for Apache Ant which allows +to apply XSLT stylesheets to ODF documents similar to Ant's build-in +<xslt> task. It is based on ODFXSLTRunner. Please see +ODFXSLTRunner for further details of its operation.

+

Getting and building ODFXSLTRunnerTask

+

odfxsltrunnertask is build by a NetBeans project. After you have checked +out the odf-xslt-runner-task-src/show, you can open the project in NetBeans +and build odfxsltrunnertask.

+

A binary release of odfxsltrunnertask.jar is available in the download +section.

+

Building and running odfxsltrunner.jar requires additional jar files. +Please see Requirements for details.

+

Usage

+

To use odfxsltrunner.jar with Ant, you have to include the following task definition into +your buildfile, where ''<path>'' has to be replaced with the path where you have stored the odfxsltrunnertask.jar and odfxsltrunner.jar files:

+
 <taskdef name="odfxslt" classname="odfxsltrunnertask.ODFXSLTRunnerTask" 
+     classpath="<path>/odfxsltrunnertak.jar:<path>/odfxsltrunner.jar"/>
+
+ + +

You can use this task definition on the top level (that is as a child element +of the <project> element or locally within a single +<target> element. It defines a new task <odfxslt> which allows to process ODF documents with XSLT stylesheets.

+

The new task supports the use of nested <param> and +<factory>elements which have the same meaning as the +<param> and <factory> child elements of the +<xslt> task.

+

Parameters

@@ -104,36 +119,34 @@ Unless template has been specified, the
AttributeDescriptionRequired
inspecifies an ODF document to which the stylesheet is applied.Yes, unless infile has been specified
forceSpecifies that the target file shall be recreated, even if it is newer than the source file or the stylesheet.No: Default is false
-

== Parameters specified as nested elements ==

-

=== Param ===

-

Param specifies a parameter that is passed as [http://www.w3.org/TR/1999/REC-xslt-19991116#top-level-variables XSLT parameter] to the XSL stylesheet.

-

==== Parameters ====

+

Parameters specified as nested elements

+

Param

+

Param specifies a parameter that is passed as XSLT parameter to the +XSL stylesheet.

+

Parameters

AttributeDescriptionRequired
namename of the parameter.Yes
expressionvalue of the parameter. -'''Note:''' All parameter values are passed as string values to the XSLT parameters specified by <xslt:param> elements within the stylesheet. +Note: All parameter values are passed as string values to the XSLT parameters specified by <xslt:param> elements within the stylesheet. Yes
-

'''Note:''' The parameters if and unless which are supported by the <xslt> task are (not yet) supported.

-

=== Factory ===

+

Note: The parameters if and unless which are supported by the <xslt> task are (not yet) supported.

+

Factory

Factory specifies Java TransformerFactory class to use.

-

==== Parameters ====

+

Parameters

AttributeDescriptionRequired
namefull qualified TransformerFactory class name.Yes
-

== Requirements ==

-

'''odfxsltrunnertask''' requires [http://java.sun.com/javase/downloads/index.jsp J2RE 5], or a later version of Java.

-

It further requires [[ODFXSLTRunner]] and [http://odftoolkit.openoffice.org/servlets/ProjectDocumentList?folderID=759&expandFolder=759&folderID=771 ODFDOM] (at least version v0.6.1).

-

'''Note:''' When building '''odfxsltrunertask''', the '''odfxsltrunner''' project has be checked out, too. It is build automatically.

-

In the Ant task definition, the '''classpth''' attribute must include the '''odfxsltrunnertask.jar''' and '''odfxsltrunner.jar''' files. The ODFDOM jar file is found automatically if it is located in a folder called '''lib''' next to the '''odfxsltrunner.jar''' file.

-

'''Note:''' ODFDOM v0.6.1 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.

-

== Background Information ==

-

[http://blogs.sun.com/GullFOSS/entry/applying_xslt_stylesheets_to_odf Applying XSLT stylesheets to ODF documents with Ant]

-

Back to: [[Home|ODF Conformance and other Tools Wiki Home]]

+

Requirements

+

odfxsltrunnertask requires J2RE 5, or a later version of Java.

+

It further requires ODFXSLTRunner and the ODFDOM component (at least version v0.6.1).

+

Note: When building odfxsltrunertask, the odfxsltrunner project has be checked out, too. It is build automatically.

+

In the Ant task definition, the classpth attribute must include the odfxsltrunnertask.jar and odfxsltrunner.jar files. The ODFDOM jar file is found automatically if it is located in a folder called lib next to the odfxsltrunner.jar file.

+

Note: ODFDOM v0.6.1 requires Apache Xerces. The jar file xercesImpl.jar also must exist in a folder lib next to odfxsltrunner.jar file.