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

AttributeDescriptionRequired
filepath to location of schemaone of file or dir unless a nested <fileset> element is used.
dirfolder of schemas
outpath to output folderNo, defaults to "."
doctitletitle of schema No
headerInclude header text for each page (html-code)No
footerInclude header text for each page (html-code)No
bottom Include bottom text for each page (html-code)No
noasciiartIf ASCII art should be ignored in documentationNo, defaults to false
proxyHosthost name of proxyNo
proxyPortport number of proxyNo
debugoutput debug informationNo, defaults to false
launchlaunch documentation after creation No, defaults to false
licenselocation of license fileNo, defaults to users home directory
verboseverbose outputNo, defaults to false
cssCSS stylesheet file to useNo
catalogscomma- 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.

doctitle

Same as the doctitle attribute, but you can nest text inside the element this way.

header

Similar to <doctitle>.

bottom

Similar to <doctitle>.

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>

Safe Online Shopping

shareit logo

Payment options

Billing currencies

Site Conformance

Valid XHTML 1.0 Transitional

Valid CSS!