You can use the TaskCompileXPath, TaskCompileXQuery, and TaskCompileXSLT ANT tasks as alternatives to using the CompileXPath, CompileXQuery, and CompileXSLT commands.
<argType> <localpart>boolean</localpart> <namespaceURI>"http://www.w3.org/2001/XMLSchema"</namespaceURI> </argType>
<baseURI>"http://www.ibm.com/Los Angeles"</baseURI>
<bsp>1</bsp>
Inherit mode should be used in namespace binding assignment when an existing element node is copied by an element constructor.
No-inherit mode should be used in namespace binding assignment when an existing element node is copied by an element constructor.
<cnmi>2</cnmi>
Preserve mode should be used in namespace binding assignment when an existing element node is copied by an element constructor.
No-preserve mode should be used in namespace binding assignment when an existing element node is copied by an element constructor.
<cnmp>2</cnmp>
The default is 2.0.
<cpm>1.0</cpm>
The type of a constructed element node is xs:anyType, and all attribute and element nodes copied during node construction retain their original types.
The type of a constructed element node is xs:untyped, all element nodes copied during node construction receive the type xs:untyped, and all attribute nodes copied during node construction receive the type xs:untypedAtomic.
<csm>2</csm>
The default is the current working directory.
If the value contains a blank space, enclose it in quotation marks.
<dir>C:/precompiledXSLT</dir>
The namespace URI, if present, is used for any unprefixed QName appearing in a position where an element or type name is expected.
<dnet>http://example.org/ibm</dnet>
The namespace URI, if present, is used for any unprefixed QName appearing in a position where a function name is expected.
<dnf>http://my.org</dnf>
<eso>1</eso>
This element is optional and can be specified multiple times.
<function> <name> <localpart>la</localpart> <namespaceURI>"http://www.ibm.com/Los Angeles"</namespaceURI> </name> <type> <localpart>boolean</localpart> <namespaceURI>http://www.w3.org/2001/XMLSchema</namespaceURI> </type> </function>
<imm>2</imm>
<inputfile>C:/XSLT/simple.xsl</inputfile>
<localpart>la</localpart>
In the case of a variable that is in no namespace the namespace URI should be omitted.
Parameters specified as nested elements:
<name> <localpart>la</localpart> <namespaceURI>"http://www.ibm.com/Los Angeles"</namespaceURI> </name>
If the value contains a blank space. enclose it in quotation marks.
<namespaceURI>"http://www.ibm.com/Los Angeles"</namespaceURI>
The value should be specified as prefix=URI.
If the value contains a blank space, enclose it in quotation marks.
This element can be used multiple times.
<ns>my=http://www.example.com/examples</ns>
<ordm>2</ordm>
The default executable name is XSLTModule, XPathModule, or XQueryModule depending on the corresponding task.
This option is ignored if compiling multiple files.
<out>sample</out>
If the value contains a blank space, enclose it in quotation marks.
<pkg>com.mycompany.precompiled</pkg>
This element can be used multiple times.
<schema>C:/samples/xpath/variousTypesNodeTest.xsd</schema>
<type> <localpart>boolean</localpart> <namespaceURI>"http://www.w3.org/2001/XMLSchema"</namespaceURI> </type>
This simply declares the variable, and a value must be bound to the dynamic context.
This element can be specified multiple times.
<variable> <name> <localpart>booleanVar</localpart> </name> <type> <localpart>boolean</localpart> <namespaceURI>http://www.w3.org/2001/XMLSchema</namespaceURI> </type> </variable>
This task can be used to precompile one or more XPath expressions. The output will be a set of Java classes that subsequently can be used to execute the expressions without the performance overhead of dynamic compilation.
The default executable name is XPathModule.
The default is the current working directory.
The default is the Java default package.
This will create a function binding to the static context for a single item.
This will add a variable binding to the static context for a single item.
<target name="testXPath"> <taskdef name="compileXPath" classname="com.ibm.xml.xapi.ant.TaskCompileXPath"/> <compileXPath> <out>sample</out> <dir>"C:/precompiledXPath"</dir> <pkg>com.mycompany.precompiled</pkg> <variable> <name> <localpart>booleanVar</localpart> </name> <type> <localpart>boolean</localpart> <namespaceURI>http://www.w3.org/2001/XMLSchema</namespaceURI> </type> </variable> <inputfile>C:/XPath/xpath.txt</inputfile> </compileXPath> </target>
This task can be used to precompile one or more XQuery expressions. The output will be a set of Java classes that subsequently can be used to execute the expressions without the performance overhead of dynamic compilation.
The default executable name is XQueryModule.
The default is the current working directory.
The default is the Java default package.
This will create a function binding to the static context for a single item.
<target name="testXQuery"> <taskdef name="compileXQuery" classname="com.ibm.xml.xapi.ant.TaskCompileXQuery"/> <compileXQuery> <out>sample</out> <dir>"C:/precompiledXQuery"</dir> <pkg>com.mycompany.precompiled</pkg> <inputfile>C:/XQuery/xquery.sq</inputfile> </compileXQuery> </target>
This task can be used to precompile one or more stylesheets. The output will be a set of Java classes that subsequently can be used to execute transformations without the performance overhead of dynamic compilation.
The default executable name is XSLTModule.
This element is ignored if compiling multiple stylesheets.
The default is the current working directory.
The default is the Java default package.
This will create a function binding to the static context for a single item.
<target name="testXSLT"> <taskdef name="compileXSLT" classname="com.ibm.xml.xapi.ant.TaskCompileXSLT"/> <compileXSLT> <out>sample</out> <dir>"C:/precompiledXSLT"</dir> <pkg>com.mycompany.precompiled</pkg> <function> <name> <localpart>la</localpart> <namespaceURI>"http://www.ibm.com/Los Angeles"</namespaceURI> </name> <type> <localpart>boolean</localpart> <namespaceURI>http://www.w3.org/2001/XMLSchema</namespaceURI> </type> </function> <inputfile>C:/XSLT/simple.xsl</inputfile> </compileXSLT> </target>