Right. Took a little playing around to understand the issues here. I simplified the below to the following, and ignored the possible namespace issues by creating a simplified document which demonstrated the same issues.
<xmltask source="b.xml"> <call path="//b"> <param name="svnbasedir" path="@svn-base-dir" /> <param name="eararchs" path="//[EMAIL PROTECTED]'ear']/@param" /> <actions> <echo message="svnbasedir = @{svnbasedir}" /> <echo message="eararchs = @{eararchs}" /> </actions> </call> where b.xml looks like: <b svn-base-dir="sbd"> <c type="java-archive" param="ear"/> </b> The above works. Note how in the above, the <param> paths point to actual attributes, rather than the XML element that contains that element. e.g. in the below you have: <param name="eararchs" path="/[EMAIL PROTECTED]'java-archive' and @param='ear']" /> which references the element <resource>. I think you want something like: <param name="eararchs" path="/[EMAIL PROTECTED]'java-archive' and @param='ear']/text()"/> Does that make sense ? I have to conduct further investigation to work out why you're not getting a decent error message, but that's for another time. Let me know if the above is not a correct analysis! Brian Holger Rauch wrote: > Hi Brian, > > any news on this topic? > > Thanks in advance for any info. > > Kind regards, > > Holger > > On Fri, 23 Nov 2007, Brian Agnew wrote: > > >> Hi - >> >> Interesting question. I shall investigate and come back to you. >> >> Brian >> >> On Wed, November 21, 2007 12:09, Holger Rauch wrote: >> >>> Hi, >>> >>> the examples related to <call path="..." /> with nested <param path="..." >>> /> >>> elements given in the XMLTask documentation imply that one may only use >>> the >>> <param path="..." to specify attributes contained in the element selected >>> by >>> <call path="..." />. Is that true? >>> >>> The following example works: >>> >>> ============================== >>> >>> <xmltask source="web.xml"> >>> <call path="web/servlet"/> >>> <param name="id" path="@id" default="NO ID"/> >>> <actions> >>> <echo>Found a servlet @{id}</echo> >>> <!-- perform deployment actions --> >>> .... >>> </actions> >>> </call> >>> </xmltask> >>> >>> ============================== >>> >>> In this example, the id attribute is contained in the web/servlet element >>> selected by <call path="web/servlet"/>. >>> >>> My example, however, doesn't work. The error message I get from ant is >>> >>> xmltest-read.xml:148: required attribute eararchs not set >>> >>> =================================== >>> >>> <xmltask> >>> <insert path="/"><![CDATA[${partner.mod.resources}]]></insert> >>> <call path="//resource-list"> >>> <param name="svnbasedir" path="@svn-base-dir" /> >>> <param name="eararchs" path="[EMAIL PROTECTED]'java-archive' and >>> @param='ear']" /> >>> <param name="wararchs" path="[EMAIL PROTECTED]'java-archive' and >>> @param='war']" /> >>> <param name="warresources" path="[EMAIL PROTECTED]'icon' and >>> @param='war']" >>> /> >>> <actions> >>> <echo message="svnbasedir = @{svnbasedir}" /> >>> <echo message="eararchs = @{eararchs}" /> >>> <echo message="wararchs = @{wararchs}" /> >>> <echo message="warresources = @{warresources}" /> >>> </actions> >>> </call> >>> </xmltask> >>> >>> ==================================== >>> >>> The property named parter.mod.resources contains this complete XML >>> document >>> which is the result of an XQuery (sorry for the unindented formatting): >>> >>> ==================================== >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <result:sequence xmlns:result="http://saxon.sf.net/xquery-results" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >>> <result:element> >>> <resource-list svn-base-dir="ruag-hv"> >>> <resource type="java-archive" param="ear">server/*.jar</resource> >>> <resource type="java-archive" param="ear">server/*.war</resource> >>> <resource type="java-archive" param="war">client/hv.jar</resource> >>> <resource type="icon" param="war">ruag_logo.gif</resource> >>> </resource-list> >>> </result:element> >>> </result:sequence> >>> >>> ==================================== >>> >>> The main difference compared to the examples in the documentation I notice >>> is that I try to select nodes that are not contained directly in the >>> <resource-list> element, but rather nodes that are *children* of that >>> element (such as the <resource> element). What's wrong with using <param >>> path="..." /> in this way? >>> >>> Is the only workaround I can use something similar to >>> >>> =============================== >>> >>> <xmltask> >>> <insert path="/"><![CDATA[${partner.mod.resources}]]></insert> >>> <call path="//resource-list"> >>> <param name="svnbasedir" path="@svn-base-dir" /> >>> <actions> >>> <echo message="svnbasedir = @{svnbasedir}" /> >>> </actions> >>> </call> >>> <call path="//resource-list/[EMAIL PROTECTED]'java-archive' and >>> @param='ear']"> >>> <param name="eararchs" path="text()" /> >>> <actions> >>> <echo message="eararchs = @{eararchs}" /> >>> </actions> >>> </call> >>> <call path="//resource-list/[EMAIL PROTECTED]'java-archive' and >>> @param='war']"> >>> <param name="eararchs" path="text()" /> >>> <actions> >>> <echo message="wararchs = @{wararchs}" /> >>> </actions> >>> </call> >>> <call path="//resource-list/[EMAIL PROTECTED]'icon' and >>> @param='war']"> >>> <param name="warresources" path="text()" /> >>> <actions> >>> <echo message="warresources = @{warresources}" /> >>> </actions> >>> </call> >>> </xmltask> >>> >>> =============================== >>> >>> Thanks in advance for any info! >>> >>> Kind regards, >>> >>> Holger >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2005. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ >>> Xmltask-users mailing list >>> Xmltask-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/xmltask-users >>> >>> >> -- >> Brian Agnew http://www.oopsconsultancy.com >> OOPS Consultancy Ltd >> Tel: +44 (0)7720 397526 >> Fax: +44 (0)20 8682 0012 >> >> -- Brian Agnew http://www.oopsconsultancy.com OOPS Consultancy Ltd Tel: +44 (0)7720 397526 Fax: +44 (0)20 8682 0012 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users