NAnt
![]() ![]() ![]() |
v0.85-rc1 |
[This is preliminary documentation and subject to change.]
Processes a document via XSLT.
Attribute | Type | Description | Required |
---|---|---|---|
style | file | Name of the stylesheet to use - given either relative to the project's basedir or as an absolute path. | True |
destdir | directory | Directory in which to store the results. The default is the project base directory. | False |
extension | string | Desired file extension to be used for the targets. The default is html . |
False |
in | file | Specifies a single XML document to be styled. Should be used with the out attribute. |
False |
out | file | Specifies the output name for the styled result from the in attribute. |
False |
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False |
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False |
unless | bool | Opposite of if . If false then the task will be executed; otherwise, skipped. The default is false. |
False |
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False |
Contains a collection of XsltParameter elements.
Create a report in HTML.
<style style="report.xsl" in="data.xml" out="report.html" />
Create a report in HTML, with a param.
<style style="report.xsl" in="data.xml" out="report.html"> <parameters> <parameter name="reportType" namespaceuri="" value="Plain" /> </parameters> </style>
Create a report in HTML, with a expanded param.
<style style="report.xsl" in="data.xml" out="report.html"> <parameters> <parameter name="reportType" namespaceuri="" value="${report.type}" /> </parameters> </style>
Create some code based on a directory of templates.
<style style="CodeGenerator.xsl" extension="java"> <infiles> <include name="*.xml" /> </infiles> <parameters> <parameter name="reportType" namespaceuri="" value="Plain" if="${report.plain}" /> </parameters> <style>