Apache Ant Task Usage
At first the xnsdoc task must be defined in the ant script like this:
<taskdef name="xnsdoc" classname="com.xnsdoc.Task"/>
See installation for details about how to install xnsdoc with Apache Ant to ensure that the above class in in the classpath when starting Ant.
Parameters
| Attribute | Description | Required |
|---|---|---|
| file | path to location of schema | one of file or dir unless a nested <fileset> element is used. |
| dir | folder of schemas | |
| out | path to output folder | No, defaults to "." |
| doctitle | title of schema | No |
| header | Include header text for each page (html-code) | No |
| footer | Include header text for each page (html-code) | No |
| bottom | Include bottom text for each page (html-code) | No |
| noasciiart | If ASCII art should be ignored in documentation | No, defaults to false |
| proxyHost | host name of proxy | No |
| proxyPort | port number of proxy | No |
| debug | output debug information | No, defaults to false |
| launch | launch documentation after creation | No, defaults to false |
| license | location of license file | No, defaults to users home directory |
| verbose | verbose output | No, defaults to false |
| css | CSS stylesheet file to use | No |
| catalogs | comma- or space-separated List of URIs to OASIS XML catalogs v1.1 files for resolving schema references. | No |
Parameters specified as nested elements
fileset
FileSets are used to select sets of files to process. Use it instead of the fileand dir attribute.
Examples
Document a single schema file
<target name="xnsdocSample">
<mkdir dir="target/docs/xnsdoc"/>
<xnsdoc out="target/docs/xsddoc"
file="src/xsd/my-schema.xsd"/>
</target>Document a folder of schema files
<target name="xnsdocSample">
<mkdir dir="target/docs/xsddoc"/>
<xnsdoc out="target/docs/xsddoc"
dir="src/xsd"/>
</target>Document a fileset of schema files
<target name="xnsdocSample">
<mkdir dir="target/docs/xsddoc"/>
<xnsdoc out="target/docs/xsddoc">
<fileset dir="src/xsd">
<include name="**/*.xsd"/>
</fileset>
</xnsdoc>
</target>Use HTML in header, footer and bottom
<target name="xnsdocSample">
<mkdir dir="target/docs/xsddoc"/>
<xnsdoc out="target/docs/xsddoc">
<fileset dir="src/xsd">
<include name="**/*.xsd"/>
</fileset>
<doctitle><![CDATA[Document title
of this example]]></doctitle>
<header><![CDATA[Header <i>text</i>
of this example]]></header>
<footer><![CDATA[Footer <b>text<b>
of this example]]></header>
<bottom><![CDATA[<i>Copyright (c) 2005, 2006
by buldocs Corporation.
All rights reserved.</i>]]></header>
</xnsdoc>
</target>




