ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Sanderson <>
Subject Ant, Xerces 2.8.0, and XInclude
Date Tue, 07 Mar 2006 23:04:04 GMT
Hi all -

I have two questions regarding Ant, Xerces 2, and XInclude.  I'm using Ant 
1.6.5, and have upgraded its xercesImpl.jar and xml-apis.jar 
to Xerces 2.8.0.

The first question is regarding XmlValidate.  My understanding is that I 
can turn on the XInclude feature with an <attribute> in the <xmlvalidate> 

  <attribute name="" value="true" />

When I try to validate, however, it fails on the <include> elements, as if 
XInclude were not working.

My first guess was that I wasn't turning on the feature correctly, but I 
noticed this in the Xerces 2 FAQ:  "If the validation feature is turned on 
then DTD validation will be performed on each source document (to the 
XInclude processor) against their respective DTDs."

My Ant target for validation:

     <java classname="org.apache.xerces.impl.Version" />
       <attribute name="" 
value="true" />
 	  <pathelement location="../schemas/docbook-4.4/catalog.xml"/>
 	  includes="${book.file}" />

Is my task defined correctly to turn on XInclude?  Is Xerces refusing to 
do XInclude prior to DTD validation as a normal behavior?  What is the 
correct way for me to perform DTD validation with a document that uses 
XInclude?  (Must my DTD explicitly accommodate XInclude?)

My second question is regarding the Xslt task.  I would like to turn on 
the same Xerces feature for the purposes of XSLT processing (with Xalan). 
I'm not clear on how to do this.  I tried:

       description="test XSLT with Xerces XInclude"
     <java classname="org.apache.xerces.impl.Version" />
 	<attribute name="" 
value="true" />

but got:

java.lang.IllegalArgumentException: Not supported:

What is the correct way to turn on XInclude with Xerces with the Xslt 

Thanks for any assistance you can provide!  Let me know if I should post 
more complete examples.

-- Dan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message