ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanouil Batsis <>
Subject Re: Ant, Xerces-2.6.2, and XInclude -- HELP
Date Wed, 22 Sep 2004 07:49:39 GMT
Hi Douglas,

You might be interested in xcluder [1], my xinclude task, or the 
configuration code of the xerces based helper [2] in it.

[2] com.geekologue.tasks.xcluder.XIncludeProcXerces



Douglas Lochart wrote:

> All,
> I have written a custom Task that loads an xml document, runs it 
> through a jaxb like system to load java objects and then pass the root 
> object on to Velocity for template transformations.  The xml documents 
> are describing web pages and I wanted the ability for the xml docs to 
> include common xml sections (like navigation sections) using 
> XInclude.  I have a standalone java app that will load the xml doc and 
> dumps the result out and you can see that the XInclude worked.  I have 
> placed the proper xercesImpl and xml-apis in $ANT_HOME/lib and when I 
> try to run my task the xml parsing portion fails to execute the 
> XInclude semantics.  I strongly believe that its the configuration 
> that is causing the problem.  In order to get XInclude to work you 
> have to change the parser configuration and the recomended way to do 
> that is to set a system property like such:
> -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=xerces.parsers.XIncludeParserConfiguration

> In my custom task I did a System.getProperty() on 
> "org.apache.xerces.xni.parser.XMLParserConfiguration" and discovered 
> that it was not there.  It appears as though when ant sets up the 
> project it makes the system properties available to the project but 
> seems to remove them from the environment.  Are my assumptions correct?
> The only other way to change the configuration is JRE wide by creating 
> a file in the JRE/lib directory.  I don't want a 
> system wide change and should not have to do that.  I feel the answer 
> to my dilemna is an easy one but one that escapes me.
> Thanks in advance!
> Doug Lochart
> Ace Technologies Inc.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message