I think you've just found a bug in xmlproperty there, looks like it tries to resolve DTDs at load time. File a bug on bugzilla, maybe even a patch if it motivates you
----- Original Message ----- From: "sunyj" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> Sent: Monday, October 28, 2002 1:58 AM Subject: how to use task <xmlproperty> offline? > Hi, Everyone, > > I'm trying to get ejb-client-jar's value from test.xml, So i use Ant <xmlproperty> > task. > My build file is very simple and as following: > **************************************************************************** ******** > <?xml version="1.0" encoding="UTF-8"?> > <project basedir="." default="xmltest" name="test"> > <target name="xmltest"> > <xmlproperty > collapseAttributes="true" > file="test.xml" > keeproot="false" > prefix="ejb-jar"> > </xmlproperty> > <echo message="${ejb-jar.ejb-client-jar}"/> > </target> > </project> > **************************************************************************** ******** > test.xml is below. Tag ejb-client-jar value is "This is a test for xmlproperty task": > **************************************************************************** ******** > <?xml version="1.0"?> > > <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> > <ejb-jar> > <ejb-client-jar>This is a test for xmlproperty task</ejb-client-jar> > </ejb-jar> > **************************************************************************** ******** > > If my machine is online, the task can work fine. It can output message: > "This is a test for xmlproperty task". But offline, it can not work and > error message is following: > **************************************************************************** ******** > Buildfile: build.xml > > xmltest: > > BUILD FAILED > file:C:/isrlm/rlm_v2/wizard/dist/build1.xml:9: java.net.UnknownHostException: > java.sun.com > **************************************************************************** ******** > The reason should be that task <xmlproperty> can not get dtd from location > http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd. But my machine must be offline > . I want to get dtd file at local directory but task <xmlproperty> can not nest > <dtd> task. > How i can do? > > Thanks in advance. > > Sunyong jing > ------------------------------------------------- > Sun Yongjing > International Software Cooperation Department > Advanced Digital Technology CO.,Ltd > Tel: (+86) 10-6870-0009 ext. 1037 > Fax: (+86) 10-6870-0510 > e-mail: [EMAIL PROTECTED] > -------------------------------------------------- > -- To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:ant-user-help@;jakarta.apache.org>