<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>user@ant.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/ant-user/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/ant-user/"/>
<id>http://mail-archives.apache.org/mod_mbox/ant-user/</id>
<updated>2009-12-07T16:26:04Z</updated>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26679471.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26679471-post@talk-nabble-com%3e</id>
<updated>2009-12-07T16:06:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi again Gilbert,

That updated Xpath worked a treat... Thank you very much for your patience
and help! :-)

Hopefully that will be it now... ;-)

Cheers again!

:-Joe
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26679471.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26679175.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26679175-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:48:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

I think the problem that I have is that the @Media property isn't always set.
In which case it fails when it tries to look at a node with no Media
property.

Can anyone think of a workaround? :-/

Thanks!
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26679175.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>&quot;Rebhan, Gilbert&quot; &lt;Gilbert.Rebhan@huk-coburg.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AFD@VMX00100.lan.huk-coburg.de%3e"/>
<id>urn:uuid:%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AFD@VMX00100-lan-huk-coburg-de%3e</id>
<updated>2009-12-07T15:45:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


-----Original Message-----
From: Jowie [mailto:joe.nash@mac.com] 
Sent: Monday, December 07, 2009 4:06 PM
To: user@ant.apache.org
Subject: RE: RegExp help needed!

/*
Hi Gilbert,

What I am trying to say is... I have done exactly how you say, despite what
my last message says (some weird URL encoding is deleting one of my lines!)
and it returns a list of repeating

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

rather than different IDs each time...

Sorry for the confusion!
*/

i'm sorry too, the xpath expression was wrong, so here we go

your input =

&lt;Question ID="531" Subject="L" Category="Punc" Presentation="PT01"
  Engine="MC01" Body="test" Media="/bgmain/Image.ashx?ID=12"&gt;
  &lt;TipID /&gt;
  &lt;Answers&gt;
    &lt;Answer ID="1457" Valid="false" Position="1"
      Media="/bgmain/Image.ashx?ID=112"&gt;txt
    &lt;/Answer&gt;
    &lt;Answer ID="1458" Valid="true" Position="2"
      Media="/bgmain/Image.ashx?ID=113"&gt;txt
    &lt;/Answer&gt;
    &lt;Answer ID="1459" Valid="false" Position="3"
      Media="/bgmain/Image.ashx?ID=114"&gt;txt
    &lt;/Answer&gt;
    &lt;Answer ID="1460" Valid="false" Position="4"
      Media="/bgmain/Image.ashx?ID=115"&gt;txt
    &lt;/Answer&gt;
  &lt;/Answers&gt;
&lt;/Question&gt;


and =

&lt;xmltask source="xpathtest.xml"&gt;
&lt;call path="//*[@Media]"&gt;
  &lt;param name="img" path="@Media"/&gt;
  &lt;actions&gt;
      &lt;echo&gt;img = @{img}&lt;/echo&gt;
  &lt;/actions&gt;
&lt;/call&gt;
&lt;/xmltask&gt;

gives =

     [echo] img = /bgmain/Image.ashx?ID=12
     [echo] img = /bgmain/Image.ashx?ID=112
     [echo] img = /bgmain/Image.ashx?ID=113
     [echo] img = /bgmain/Image.ashx?ID=114
     [echo] img = /bgmain/Image.ashx?ID=115


if you need only the @Media attributes under from Answer
nodes, use the expresssion  =
&lt;call path="//Answer[@Media]"&gt;
...

gives =

     [echo] img = /bgmain/Image.ashx?ID=112
     [echo] img = /bgmain/Image.ashx?ID=113
     [echo] img = /bgmain/Image.ashx?ID=114
     [echo] img = /bgmain/Image.ashx?ID=115




Gilbert


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26679059.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26679059-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:41:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hopefully it will work this time... This is my code:

&lt;![CDATA[

&lt;target name="downloadQuestionImages"&gt;
    &lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
        &lt;call path="//@Media" buffer="media"&gt;
            
            &lt;actions&gt;
                &lt;echo&gt;img = @{img}&lt;/echo&gt;
            &lt;/actions&gt;
        &lt;/call&gt;
    &lt;/xmltask&gt;
&lt;/target&gt;

]]&gt;

and I get back:

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

etc.... 

Sorry everyone for the repeat postings! I'm really starting to scratch my
head sore on this one! :-/
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26679059.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26679046.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26679046-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:40:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hopefully it will work this time... This is my code:


    
        
            
            
                img = @{img}
            
        
    


]]&gt;

and I get back:

I get back:

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

etc.... 

Sorry everyone for the repeat postings! I'm really starting to scratch my
head sore on this one! :-/
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26679046.html
Sent from the Ant - Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26678500.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26678500-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:05:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Gilbert,

What I am trying to say is... I have done exactly how you say, despite what
my last message says (some weird URL encoding is deleting one of my lines!)
and it returns a list of repeating

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

rather than different IDs each time...

Sorry for the confusion!
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26678500.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26678458.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26678458-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:03:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

ARRRRGH!!

I am posting another line here... I have done *exactly* what you say - that
line gap is a weird mistake! But I get back a load of repeating echoes ... 

Cheers



Jowie wrote:
&gt; 
&gt; Hi Gilbert,
&gt; 
&gt; Sorry my copied code was completely wrong! Have no idea why! It should
&gt; have been:
&gt; 
&gt; 		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
&gt; 			&lt;call path="//*"&gt;
&gt; 				
&gt; 				&lt;actions&gt;
&gt; 					&lt;echo&gt;img = @{img}&lt;/echo&gt;
&gt; 				&lt;/actions&gt;
&gt; 			&lt;/call&gt;
&gt; 		&lt;/xmltask&gt;
&gt; 
&gt; And I get back:
&gt; 
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt;      [echo] img = /brain_games_main/Image.ashx?ID=647
&gt; 
&gt; etc... Rather than different attribute each time
&gt; 

-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26678458.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26678408.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26678408-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:01:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Gilbert,

Sorry my copied code was completely wrong! Have no idea why! It should have
been:

		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
			&lt;call path="//*"&gt;
				
				&lt;actions&gt;
					&lt;echo&gt;img = @{img}&lt;/echo&gt;
				&lt;/actions&gt;
			&lt;/call&gt;
		&lt;/xmltask&gt;

And I get back:

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

etc... Rather than different attribute each time
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26678408.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26678362.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26678362-post@talk-nabble-com%3e</id>
<updated>2009-12-07T15:00:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Gilbert,

Sorry my copied code was completely wrong! Have no idea why! It should have
been:

		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
			&lt;call path="//*"&gt;
				
				&lt;actions&gt;
					&lt;echo&gt;img = @{img}&lt;/echo&gt;
				&lt;/actions&gt;
			&lt;/call&gt;
		&lt;/xmltask&gt;

And I get back:

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

etc... Rather than different attribute each time
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26678362.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>&quot;Rebhan, Gilbert&quot; &lt;Gilbert.Rebhan@huk-coburg.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AFC@VMX00100.lan.huk-coburg.de%3e"/>
<id>urn:uuid:%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AFC@VMX00100-lan-huk-coburg-de%3e</id>
<updated>2009-12-07T14:38:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 

-----Original Message-----
From: Jowie [mailto:joe.nash@mac.com] 
Sent: Monday, December 07, 2009 3:28 PM
To: user@ant.apache.org
Subject: RE: RegExp help needed!

/*
[...]

 Games\Main\ant\update_offline.xml:77: required attribute
img not set

But... If I do

		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
			&lt;call path="//*"&gt;
				&lt;!-- target="getMedia" buffer="abc"--&gt;
				
				&lt;actions&gt;
				    &lt;echo&gt;img = @{img}&lt;/echo&gt;
				&lt;/actions&gt;
			&lt;/call&gt;
		&lt;/xmltask&gt;

I get back:

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

etc....
*/


when using &lt;actions&gt; ... &lt;/actions&gt; instead
of &lt;all path="..." target="..."&gt;  you have to write =

&lt;xmltask source="xpathtest.xml"&gt;
  &lt;call path="//*"&gt;
    &lt;param name="img" path="//@Media"/&gt;
     &lt;actions&gt;
       &lt;echo&gt;img = @{img}&lt;/echo&gt;
      &lt;/actions&gt;
   &lt;/call&gt;
&lt;/xmltask&gt;

to match all Media attributes.



Gilbert


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26678002.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26678002-post@talk-nabble-com%3e</id>
<updated>2009-12-07T14:28:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Thanks Gilbert...

I have now got this...

		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
			&lt;call path="//*"&gt;
				
				&lt;actions&gt;
				    &lt;echo&gt;img = @{img}&lt;/echo&gt;
				&lt;/actions&gt;
			&lt;/call&gt;
		&lt;/xmltask&gt;

which returns:

BUILD FAILED
C:\Work\LSIS\Brain Games\Main\ant\update_offline.xml:77: required attribute
img not set

But... If I do

		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
			&lt;call path="//*"&gt;
				&lt;!-- target="getMedia" buffer="abc"--&gt;
				
				&lt;actions&gt;
				    &lt;echo&gt;img = @{img}&lt;/echo&gt;
				&lt;/actions&gt;
			&lt;/call&gt;
		&lt;/xmltask&gt;

I get back:

     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647
     [echo] img = /brain_games_main/Image.ashx?ID=647

etc....




Rebhan, Gilbert wrote:
&gt; 
&gt; 
&gt; P.S. :
&gt; 
&gt; &lt;call path="/Question/Answers/*" target="foo"&gt;
&gt;   
&gt; &lt;/call&gt;
&gt; 
&gt; will hit all Media=... attributes und /Question/Answers,
&gt; if you need all Media Attributes you need to use =
&gt; 
&gt; &lt;call path="//*" target="foo"&gt;
&gt;   
&gt; &lt;/call&gt;
&gt; 
&gt; 
&gt; Regards, Gilbert
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
&gt; For additional commands, e-mail: user-help@ant.apache.org
&gt; 
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26678002.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>&quot;Rebhan, Gilbert&quot; &lt;Gilbert.Rebhan@huk-coburg.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AFA@VMX00100.lan.huk-coburg.de%3e"/>
<id>urn:uuid:%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AFA@VMX00100-lan-huk-coburg-de%3e</id>
<updated>2009-12-07T14:21:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

P.S. :

&lt;call path="/Question/Answers/*" target="foo"&gt;
  &lt;param name="img" path="@Media" /&gt;
&lt;/call&gt;

will hit all Media=... attributes und /Question/Answers,
if you need all Media Attributes you need to use =

&lt;call path="//*" target="foo"&gt;
  &lt;param name="img" path="@Media" /&gt;
&lt;/call&gt;


Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>&quot;Rebhan, Gilbert&quot; &lt;Gilbert.Rebhan@huk-coburg.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AF9@VMX00100.lan.huk-coburg.de%3e"/>
<id>urn:uuid:%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AF9@VMX00100-lan-huk-coburg-de%3e</id>
<updated>2009-12-07T14:12:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 
-----Original Message-----
From: Jowie [mailto:joe.nash@mac.com] 
Sent: Monday, December 07, 2009 1:40 PM
To: user@ant.apache.org
Subject: RE: RegExp help needed!

/*
  &lt;Question ID="531" Subject="L" Category="Punc" Presentation="PT01"
Engine="MC01" Body="test" Media="/bgmain/Image.ashx?ID=12"&gt;
    &lt;TipID/&gt;
    &lt;Answers&gt;
      &lt;Answer ID="1457" Valid="false" Position="1"
Media="/bgmain/Image.ashx?ID=112"&gt;txt&lt;/Answer&gt;
      &lt;Answer ID="1458" Valid="true" Position="2"
Media="/bgmain/Image.ashx?ID=113"&gt;txt&lt;/Answer&gt;
      &lt;Answer ID="1459" Valid="false" Position="3"
Media="/bgmain/Image.ashx?ID=114"&gt;txt&lt;/Answer&gt;
      &lt;Answer ID="1460" Valid="false" Position="4"
Media="/bgmain/Image.ashx?ID=115"&gt;txt&lt;/Answer&gt;
    &lt;/Answers&gt;
  &lt;/Question&gt;
-----

So from this, I need to:
1. Find any Media attribute, nested or otherwise (e.g. in E4X,
questionXML..@Media)
2. Store each of these to download them
3. Replace the values in the XML with local path equivalents, e.g.
"images/image_@{imageID}.jpg"
4. Go through stored list, download the images and put them in the right
place (I know how to do that bit with copy url)

*/


a quick response to get you going =

&lt;project name="bla" default="main" basedir="."&gt;
  &lt;!-- Import XMLTask --&gt;
  &lt;taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/&gt;

  &lt;target name="depends"&gt;
    &lt;xmltask source="xpathtest.xml"&gt;
      &lt;call path="/Question/Answers/*" target="foo"&gt;
        &lt;param name="img" path="@Media" /&gt;
      &lt;/call&gt;
    &lt;/xmltask&gt;
  &lt;/target&gt;

  &lt;target name="foo"&gt;

&lt;!-- do something with img or write to a file like that, there may be
another way with xmltask buffer too, never used it, see xmltask docs
--&gt;
    &lt;echo file="foo.txt" append="true"&gt;${img}${line.separator}&lt;/echo&gt;
    &lt;echo&gt;Image = ${img}&lt;/echo&gt;
  &lt;/target&gt;

  &lt;target name="xmlreplace"&gt;
    &lt;xmltask source="xpathtest.xml" dest="xxxpathtest.xml" report="true"&gt;
      &lt;regexp path="/Question/Answers/*/@Media"
              pattern="(.+\.)(.+=)(\d+)"
              replace="$1$3jpg"
      /&gt;
    &lt;/xmltask&gt;
  &lt;/target&gt;

  &lt;target name="main" depends="depends,xmlreplace"/&gt;
&lt;/project&gt;


Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677773.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677773-post@talk-nabble-com%3e</id>
<updated>2009-12-07T14:10:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Okay... So back to my original request (thanks for all the help so far! :))

Here's my code so far:

------------
	&lt;target name="downloadQuestionImages"&gt;
		&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
			&lt;call path="//@Media" target="getMedia"&gt;
				
			&lt;/call&gt;
		&lt;/xmltask&gt;
	&lt;/target&gt;
	
	&lt;target name="getMedia"&gt;
		&lt;echo message="${mediaURL}" /&gt;
	&lt;/target&gt;
-------------

This doesn't seem to iterate through though... I get:

getMedia:
     [echo] /brain_games_main/Image.ashx?ID=647
  [xmltask] Parent project doesn't contain any reference 'xmltask.buffers'

And just keeps looping.

Any thoughts? Thanks!

:-Joe
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26677773.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recording tasks output while silencing stdout</title>
<author><name>Francis GALIEGUE &lt;fge@one2team.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c7c55bf80912070607n4c046dd4u35d87a7508f0ec97@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7c55bf80912070607n4c046dd4u35d87a7508f0ec97@mail-gmail-com%3e</id>
<updated>2009-12-07T14:07:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Mon, Dec 7, 2009 at 14:38, Antoine Levy Lambert &lt;antoine@gmx.de&gt; wrote:
&gt; Hello Francis,
&gt;
&gt; you might want to write your own logger, and start ant specifying your
&gt; logger on the command line.
&gt;
&gt; This way, you can handle output the way you want.
&gt;

Somehow, I feared that this was the answer :p

Well, I may as well get up to it since the "kbuild way" is gaining
steam within the C/C++ community, so why not Java ;)

Thanks,
-- 

Francis Galiegue
ONE2TEAM
IngÃ©nieur systÃ¨me
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond PoincarÃ©
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Ant provides incorrect POM</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c4B1D0AD6.1070108@gmx.de%3e"/>
<id>urn:uuid:%3c4B1D0AD6-1070108@gmx-de%3e</id>
<updated>2009-12-07T14:01:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Sebastian,

if you select the "view source" option in your web browser, you will see 
this :

&lt;project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd"&gt;

This is looking at 
http://repo2.maven.org/maven2/org/apache/ant/ant/1.7.0/ant-1.7.0.pom
 
Regards,

Antoine

Sebastian Hennebrueder wrote:
&gt; Hello,
&gt;
&gt; the pom.xml in Maven 
&gt; (http://repo2.maven.org/maven2/org/apache/ant/ant/) doesn't look 
&gt; correct. Strict XML parser throw an exception on parsing.
&gt;
&gt; The start should look like
&gt;
&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
&gt;  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
&gt;  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
&gt;                      http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
&gt;
&gt; but looks like
&gt; &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
&gt; http://maven.apache.org/maven-v4_0_0.xsd"&gt;
&gt;
&gt; Shall I create a bug entry?
&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677635.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677635-post@talk-nabble-com%3e</id>
<updated>2009-12-07T13:59:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Okay,

So I've sorted it, but it was a weird one!

One of the questions was badly formatted, and looked like this:

  &lt;Question ID="531" Subject="L" Category="Punc" Presentation="PT01"
Engine="MC01" Body="test" Instruction="Select the correct answer" Level="1"&gt;
    &lt;TipID/&gt;
    &lt;Answers&gt;
      &lt;Answer ID="1457" Valid="false" Position="1"
Media="/bgmain/Image.ashx?ID=112"&gt;[Media}&lt;/Answer&gt;
      &lt;Answer ID="1458" Valid="true" Position="2"
Media="/bgmain/Image.ashx?ID=113"&gt;[Media}&lt;/Answer&gt;
      &lt;Answer ID="1459" Valid="false" Position="3"
Media="/bgmain/Image.ashx?ID=114"&gt;[Media}&lt;/Answer&gt;
      &lt;Answer ID="1460" Valid="false" Position="4"
Media="/bgmain/Image.ashx?ID=115"&gt;[Media}&lt;/Answer&gt;
    &lt;/Answers&gt;
  &lt;/Question&gt;

Notice the "[Media}"... Now the weird thing is that this caused an error on
a large file, but not on a smaller one. I can correct the problem from my
end, but I thought you might like to know! Is a "}" symbol not allowed in
UTF-encoded XML files? It seems to work fine in a browser and like I said,
also works fine in smaller files...

weird!
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26677635.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c4B1D09B5.5010400@gmx.de%3e"/>
<id>urn:uuid:%3c4B1D09B5-5010400@gmx-de%3e</id>
<updated>2009-12-07T13:57:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

uhhm, in this case maybe the error you are encountering is a disguised 
Out of Memory, or a bug with the XML parser.

you might want to try with different JDKs. I do not know whether the 
xercesImpl.jar which ships with ant is actually used to parse XML files 
in custom tasks or whether it would be some equivalent package from your 
JDK. I wonder whether ant would run without the xercesImpl.jar. I guess 
it is not needed with the recent JDKs.

Regards,

Antoine

Jowie wrote:
&gt; Hi Antopine,
&gt;
&gt; Yes the XML file loads fine in a browser. I am even declaring UTF-8 at the
&gt; top of the file. And when I split the file down the middle and test both
&gt; halves (keeping the header of course) it works fine too.
&gt;
&gt;
&gt;   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677454.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677454-post@talk-nabble-com%3e</id>
<updated>2009-12-07T13:46:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi there,

Just so you know, I created a file which was bigger than my original file as
a test, and that worked fine... So I'm a bit confused as to how this XML
file will not work when it is supposedly well formatted...

??
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26677454.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recording tasks output while silencing stdout</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c4B1D0552.2080002@gmx.de%3e"/>
<id>urn:uuid:%3c4B1D0552-2080002@gmx-de%3e</id>
<updated>2009-12-07T13:38:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Francis,

you might want to write your own logger, and start ant specifying your 
logger on the command line.

This way, you can handle output the way you want.

Regards,

Antoine

Francis GALIEGUE wrote:
&gt; Hello everyone,
&gt;
&gt; I have a system which works OK, but now I want to go a step further
&gt; and record the output to log files but silence stdout. In fact, I want
&gt; to obtain something like the KBuild output which just outputs some
&gt; things like:
&gt;
&gt; CC somefile.o
&gt; CC someotherfile.o
&gt; LINK libsomething.o
&gt;
&gt; ant -emacs hides the [taskname], which is good. But I cannot obtain
&gt; the tasks themselves to go silent, which I don't want. I know how to
&gt; record the output using the &lt;record&gt; task. I know I could also use
&gt; &lt;exec&gt; and record the output, but I'd like to avoid that...
&gt;
&gt; I can already silence &lt;cvs&gt; with reallyquiet=true, but I cannot
&gt; silence any other tasks. Here is an example of what I'd like to
&gt; silence:
&gt;
&gt;     &lt;target name="copy-sources" depends="download"&gt;
&gt;         &lt;mkdir dir="${flat.sources}"/&gt;
&gt;         &lt;for list="${modulelist}" param="module"&gt;
&gt;             &lt;sequential&gt;
&gt;                 &lt;if&gt;
&gt;                     &lt;available file="${cvsdir}/@{module}/src" type="dir"/&gt;
&gt;                     &lt;then&gt;
&gt;                         &lt;copy todir="${flat.sources}" includeemptydirs="false"&gt;
&gt;                             &lt;fileset dir="${cvsdir}/@{module}/src"
&gt;                                     includes="**/*.java"/&gt;
&gt;                         &lt;/copy&gt;
&gt;                     &lt;/then&gt;
&gt;                 &lt;/if&gt;
&gt;             &lt;/sequential&gt;
&gt;         &lt;/for&gt;
&gt;     &lt;/target&gt;
&gt;
&gt; &lt;record&gt; won't help, since while it will record in a file, it will
&gt; also echo to stdout...
&gt;
&gt; Any hints?
&gt;
&gt;   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677322.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677322-post@talk-nabble-com%3e</id>
<updated>2009-12-07T13:35:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Antopine,

Yes the XML file loads fine in a browser. I am even declaring UTF-8 at the
top of the file. And when I split the file down the middle and test both
halves (keeping the header of course) it works fine too.



Hello,

the error below would not be an ant of xmltask error. The message

Invalid byte 3 of 3-byte UTF-8 sequence

 means that your XML file is not matching the UTF-8 convention. Does 
your XML file specify UTF-8 in the XML declaration ?

Can you read your XML file using another tool than ant, for instance a 
web browser, or the XML editor of Eclipse or another Java based 
development environment ?

Regards,

Antopine
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26677322.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c4B1D03BC.90707@gmx.de%3e"/>
<id>urn:uuid:%3c4B1D03BC-90707@gmx-de%3e</id>
<updated>2009-12-07T13:31:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,

the error below would not be an ant of xmltask error. The message

Invalid byte 3 of 3-byte UTF-8 sequence

 means that your XML file is not matching the UTF-8 convention. Does 
your XML file specify UTF-8 in the XML declaration ?

Can you read your XML file using another tool than ant, for instance a 
web browser, or the XML editor of Eclipse or another Java based 
development environment ?

Regards,

Antopine

Jowie wrote:
&gt; Doh... Looks like I have a problem using xmltask anyway unfortunately... The
&gt; GetAllQuestions.xml is too big for it to handle :-( it's nearly 1MB in size.
&gt; At least I'm pretty sure that's why, since if I run another piece of XML
&gt; which is a lot smaller it works fine. But in this case I get the error:
&gt;
&gt;
&gt;   [xmltask]
&gt; com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
&gt; Invalid byte 3 of 3-byte UTF-8 sequence.
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
&gt;   [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
&gt; Source)
&gt;   [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.documentFromStream(XmlTask.java:343)
&gt;   [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.documentFromFile(XmlTask.java:387)
&gt;   [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.access$000(XmlTask.java:27)
&gt;   [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask$InputFile.getDocument(XmlTask.java:203)
&gt;   [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.execute(XmlTask.java:638)
&gt;   [xmltask] 	at
&gt; org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
&gt;   [xmltask] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&gt;   [xmltask] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt;   [xmltask] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
&gt; Source)
&gt;   [xmltask] 	at java.lang.reflect.Method.invoke(Unknown Source)
&gt;   [xmltask] 	at
&gt; org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
&gt;   [xmltask] 	at org.apache.tools.ant.Task.perform(Task.java:348)
&gt;   [xmltask] 	at org.apache.tools.ant.Target.execute(Target.java:357)
&gt;   [xmltask] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
&gt;   [xmltask] 	at
&gt; org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
&gt;   [xmltask] 	at
&gt; org.apache.tools.ant.Project.executeTarget(Project.java:1306)
&gt;   [xmltask] 	at
&gt; org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
&gt;   [xmltask] 	at
&gt; org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
&gt;   [xmltask] 	at
&gt; org.apache.tools.ant.Project.executeTargets(Project.java:1189)
&gt;   [xmltask] 	at
&gt; org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
&gt;   [xmltask] 	at
&gt; org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
&gt;
&gt; BUILD FAILED
&gt; C:\Work\LSIS\Brain Games\Main\ant\update_offline.xml:77: Invalid byte 3 of
&gt; 3-byte UTF-8 sequence.
&gt;
&gt;
&gt; ----
&gt;
&gt;
&gt; Bad times :(
&gt;   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677279.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677279-post@talk-nabble-com%3e</id>
<updated>2009-12-07T13:31:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


&gt; That looks to me like your XML is not properly encoded. I 
&gt; suspect that if you use a command-line tool like xmlstarlet 
&gt; it'll confoirm that by giving you a very similar error. The 
&gt; below isn't size-related.

Thanks for the info. If you are right, this could still be a problem because
the XML is being formed on a server and I don't really have control over
that part of it!

I just tried splitting the file into two to test that theory... Both halves
seem to work fine, but together they throw that error.

I also ran the XML file in Firefox to see what it thinks of the file, and it
doesn't throw any encoding errors.

:(
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26677279.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Joe Nash &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c7FAE85404E544F539EBD969092E2EF85@BDPMEDIAGROUP.local%3e"/>
<id>urn:uuid:%3c7FAE85404E544F539EBD969092E2EF85@BDPMEDIAGROUP-local%3e</id>
<updated>2009-12-07T13:29:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

&gt; That looks to me like your XML is not properly encoded. I 
&gt; suspect that if you use a command-line tool like xmlstarlet 
&gt; it'll confoirm that by giving you a very similar error. The 
&gt; below isn't size-related.

Thanks for the info. If you are right, this could still be a problem because
the XML is being formed on a server and I don't really have control over
that part of it!

I just tried splitting the file into two to test that theory... Both halves
seem to work fine, but together they throw that error.

I also ran the XML file in Firefox to see what it thinks of the file, and it
doesn't throw any encoding errors.

:(


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: FTP works in 1.6.5, fails in 1.7.1</title>
<author><name>Antoine Levy Lambert &lt;antoine@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c4B1D01C8.8020000@gmx.de%3e"/>
<id>urn:uuid:%3c4B1D01C8-8020000@gmx-de%3e</id>
<updated>2009-12-07T13:23:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Ken,

would you mind sending a stack trace ? If you run your build with ant 
-verbose, the output will finish with the stack trace.
Maybe this is a new, unknown bug, which should be entered in bugzilla.
Regards,

Antoine

Ken Turner wrote:
&gt; I have the following code snippet:
&gt;
&gt; 		&lt;ftp 	server="${oc4j.host.name}"
&gt; 			remotedir="trips/schemas/${target.schemas.path}${hyphen.app.name.suffix}"
&gt; 			chmod="0777"
&gt; 			userid="${ftp.userid}"
&gt; 			password="${ftp.password}"&gt;
&gt; 			&lt;fileset dir="${tripsrootdir}Java/Projects/trips-types"&gt;
&gt; 				&lt;include name="**/*.xml"/&gt;
&gt; 				&lt;include name="**/*.xsd"/&gt;
&gt; 			&lt;/fileset&gt;
&gt; 		&lt;/ftp&gt;
&gt;
&gt; With Ant 1.6.5, this works fine, but with Ant 1.7.1 it appears to
&gt; successfully copy one file, and then falls over with a null pointer
&gt; exception.
&gt;
&gt; Have I missed something here?
&gt;   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RegExp help needed!</title>
<author><name>Brian Agnew &lt;brian@oopsconsultancy.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c4B1D00D9.4020809@oopsconsultancy.com%3e"/>
<id>urn:uuid:%3c4B1D00D9-4020809@oopsconsultancy-com%3e</id>
<updated>2009-12-07T13:19:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
That looks to me like your XML is not properly encoded. I suspect that 
if you use a command-line tool like xmlstarlet it'll confoirm that by 
giving you a very similar error. The below isn't size-related.

On 07/12/2009 13:15, Jowie wrote:
&gt; Doh... Looks like I have a problem using xmltask anyway unfortunately... The
&gt; GetAllQuestions.xml is too big for it to handle :-( it's nearly 1MB in size.
&gt; At least I'm pretty sure that's why, since if I run another piece of XML
&gt; which is a lot smaller it works fine. But in this case I get the error:
&gt;
&gt;
&gt;    [xmltask]
&gt; com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
&gt; Invalid byte 3 of 3-byte UTF-8 sequence.
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
&gt;    [xmltask] 	at
&gt; com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
&gt; Source)
&gt;    [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.documentFromStream(XmlTask.java:343)
&gt;    [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.documentFromFile(XmlTask.java:387)
&gt;    [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.access$000(XmlTask.java:27)
&gt;    [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask$InputFile.getDocument(XmlTask.java:203)
&gt;    [xmltask] 	at
&gt; com.oopsconsultancy.xmltask.ant.XmlTask.execute(XmlTask.java:638)
&gt;    [xmltask] 	at
&gt; org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
&gt;    [xmltask] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&gt;    [xmltask] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
&gt;    [xmltask] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
&gt; Source)
&gt;    [xmltask] 	at java.lang.reflect.Method.invoke(Unknown Source)
&gt;    [xmltask] 	at
&gt; org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
&gt;    [xmltask] 	at org.apache.tools.ant.Task.perform(Task.java:348)
&gt;    [xmltask] 	at org.apache.tools.ant.Target.execute(Target.java:357)
&gt;    [xmltask] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
&gt;    [xmltask] 	at
&gt; org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
&gt;    [xmltask] 	at
&gt; org.apache.tools.ant.Project.executeTarget(Project.java:1306)
&gt;    [xmltask] 	at
&gt; org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
&gt;    [xmltask] 	at
&gt; org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
&gt;    [xmltask] 	at
&gt; org.apache.tools.ant.Project.executeTargets(Project.java:1189)
&gt;    [xmltask] 	at
&gt; org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
&gt;    [xmltask] 	at
&gt; org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
&gt;
&gt; BUILD FAILED
&gt; C:\Work\LSIS\Brain Games\Main\ant\update_offline.xml:77: Invalid byte 3 of
&gt; 3-byte UTF-8 sequence.
&gt;
&gt;
&gt; ----
&gt;
&gt;
&gt; Bad times :(
&gt;    

-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>FTP works in 1.6.5, fails in 1.7.1</title>
<author><name>Ken Turner &lt;ken@kbturner.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677097.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677097-post@talk-nabble-com%3e</id>
<updated>2009-12-07T13:15:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

I have the following code snippet:

		&lt;ftp 	server="${oc4j.host.name}"
			remotedir="trips/schemas/${target.schemas.path}${hyphen.app.name.suffix}"
			chmod="0777"
			userid="${ftp.userid}"
			password="${ftp.password}"&gt;
			&lt;fileset dir="${tripsrootdir}Java/Projects/trips-types"&gt;
				&lt;include name="**/*.xml"/&gt;
				&lt;include name="**/*.xsd"/&gt;
			&lt;/fileset&gt;
		&lt;/ftp&gt;

With Ant 1.6.5, this works fine, but with Ant 1.7.1 it appears to
successfully copy one file, and then falls over with a null pointer
exception.

Have I missed something here?
-- 
View this message in context: http://old.nabble.com/FTP-works-in-1.6.5%2C-fails-in-1.7.1-tp26677097p26677097.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26677094.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26677094-post@talk-nabble-com%3e</id>
<updated>2009-12-07T13:15:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Doh... Looks like I have a problem using xmltask anyway unfortunately... The
GetAllQuestions.xml is too big for it to handle :-( it's nearly 1MB in size.
At least I'm pretty sure that's why, since if I run another piece of XML
which is a lot smaller it works fine. But in this case I get the error:


  [xmltask]
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Invalid byte 3 of 3-byte UTF-8 sequence.
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
  [xmltask] 	at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
  [xmltask] 	at
com.oopsconsultancy.xmltask.ant.XmlTask.documentFromStream(XmlTask.java:343)
  [xmltask] 	at
com.oopsconsultancy.xmltask.ant.XmlTask.documentFromFile(XmlTask.java:387)
  [xmltask] 	at
com.oopsconsultancy.xmltask.ant.XmlTask.access$000(XmlTask.java:27)
  [xmltask] 	at
com.oopsconsultancy.xmltask.ant.XmlTask$InputFile.getDocument(XmlTask.java:203)
  [xmltask] 	at
com.oopsconsultancy.xmltask.ant.XmlTask.execute(XmlTask.java:638)
  [xmltask] 	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [xmltask] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [xmltask] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  [xmltask] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
  [xmltask] 	at java.lang.reflect.Method.invoke(Unknown Source)
  [xmltask] 	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  [xmltask] 	at org.apache.tools.ant.Task.perform(Task.java:348)
  [xmltask] 	at org.apache.tools.ant.Target.execute(Target.java:357)
  [xmltask] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [xmltask] 	at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  [xmltask] 	at
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
  [xmltask] 	at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [xmltask] 	at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [xmltask] 	at
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  [xmltask] 	at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [xmltask] 	at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

BUILD FAILED
C:\Work\LSIS\Brain Games\Main\ant\update_offline.xml:77: Invalid byte 3 of
3-byte UTF-8 sequence.


----


Bad times :(
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26677094.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26676679.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26676679-post@talk-nabble-com%3e</id>
<updated>2009-12-07T12:39:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Gilbert,

Thanks very much for taking the time to help me out. Unfortunately I've not
used Xpath before and don't really have time to learn :( but if I give you
an example of my XML, could you perhaps point me in the right direction?
Here is an example:

------
  &lt;Question ID="531" Subject="L" Category="Punc" Presentation="PT01"
Engine="MC01" Body="test" Media="/bgmain/Image.ashx?ID=12"&gt;
    &lt;TipID/&gt;
    &lt;Answers&gt;
      &lt;Answer ID="1457" Valid="false" Position="1"
Media="/bgmain/Image.ashx?ID=112"&gt;txt&lt;/Answer&gt;
      &lt;Answer ID="1458" Valid="true" Position="2"
Media="/bgmain/Image.ashx?ID=113"&gt;txt&lt;/Answer&gt;
      &lt;Answer ID="1459" Valid="false" Position="3"
Media="/bgmain/Image.ashx?ID=114"&gt;txt&lt;/Answer&gt;
      &lt;Answer ID="1460" Valid="false" Position="4"
Media="/bgmain/Image.ashx?ID=115"&gt;txt&lt;/Answer&gt;
    &lt;/Answers&gt;
  &lt;/Question&gt;
-----

So from this, I need to:
1. Find any Media attribute, nested or otherwise (e.g. in E4X,
questionXML..@Media)
2. Store each of these to download them
3. Replace the values in the XML with local path equivalents, e.g.
"images/image_@{imageID}.jpg"
4. Go through stored list, download the images and put them in the right
place (I know how to do that bit with copy url)

Many thanks!

:-Joe


Rebhan, Gilbert wrote:
&gt; 
&gt; 
&gt; hit the send button to soon, should be =
&gt; 
&gt; so you would go like that =
&gt; 
&gt; &lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
&gt;  &lt;call path="yourxpathexpression" target="yourdownloadtarget"&gt;
&gt;   
&gt;    ...
&gt;   &lt;/call&gt;
&gt; &lt;/xmltask&gt;
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; Regards, Gilbert
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
&gt; For additional commands, e-mail: user-help@ant.apache.org
&gt; 
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26676679.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>&quot;Rebhan, Gilbert&quot; &lt;Gilbert.Rebhan@huk-coburg.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AF8@VMX00100.lan.huk-coburg.de%3e"/>
<id>urn:uuid:%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AF8@VMX00100-lan-huk-coburg-de%3e</id>
<updated>2009-12-07T12:24:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 
 
-----Original Message-----
From: Jowie [mailto:joe.nash@mac.com] 
Sent: Monday, December 07, 2009 1:02 PM
To: user@ant.apache.org
Subject: RegExp help needed!

/*
so you would go like that =

&lt;xmltask source=""&gt;
 &lt;call path="//module/*[liefertyp/text()='build']" target="yourdownloadtarget"&gt;
  &lt;param name..." path="..."/&gt;
   ...
  &lt;/call&gt;
&lt;/xmltask&gt;
/*

hit the send button to soon, should be =

so you would go like that =

&lt;xmltask source="${local.path}GetAllQuestions.xml"&gt;
 &lt;call path="yourxpathexpression" target="yourdownloadtarget"&gt;
  &lt;param name..." path="..."/&gt;
   ...
  &lt;/call&gt;
&lt;/xmltask&gt;





Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: RegExp help needed!</title>
<author><name>&quot;Rebhan, Gilbert&quot; &lt;Gilbert.Rebhan@huk-coburg.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AF7@VMX00100.lan.huk-coburg.de%3e"/>
<id>urn:uuid:%3cD0ABBEAC665C4C42AC846ECA2080B9AE2D8E5A4AF7@VMX00100-lan-huk-coburg-de%3e</id>
<updated>2009-12-07T12:18:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
 
-----Original Message-----
From: Jowie [mailto:joe.nash@mac.com] 
Sent: Monday, December 07, 2009 1:02 PM
To: user@ant.apache.org
Subject: RegExp help needed!

/*
Hi all,

I'm fumbling my way around Ant and finding the help on the web really
confusing. I am using Ant simply as a macro copy/download/find-replace
utility and am an ActionScript programmer, not a Java one.

Anyway... There's one bit I'm stuck on and really need your help please!

I have used Ant to download an XML file and store it locally. I now need a
way of going through the XML, finding all the image URL attributes,
downloading those images and replacing all the URLs in the XML to local
relative paths. So far, all I have is:

		&lt;loadfile property="questions" srcFile="${local.path}GetAllQuestions.xml"
/&gt;
		&lt;propertyregex input="${questions}" property="questions.output"
regexp="Media=&amp;quot;(.*?)&amp;quot;" select="\1" global="true" /&gt;
		&lt;echo message="${questions.output}" /&gt;

*/

regexp for xml or html is not recommended, better use xmltask and the power of xpath =

xmltask
http://www.oopsconsultancy.com/software/xmltask/

xpath
http://www.w3schools.com/Xpath/
http://www.zvon.org/xxl/XPathTutorial/General/examples.html


so you would go like that =

&lt;xmltask source=""&gt;
 &lt;call path="//module/*[liefertyp/text()='build']" target="yourdownloadtarget"&gt;
  &lt;param name..." path="..."/&gt;
   ...
  &lt;/call&gt;
&lt;/xmltask&gt;


you may post a snippet of your xml file to get the right xpath expression.


Regards, Gilbert




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RegExp help needed!</title>
<author><name>Jowie &lt;joe.nash@mac.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26676257.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26676257-post@talk-nabble-com%3e</id>
<updated>2009-12-07T12:02:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi all,

I'm fumbling my way around Ant and finding the help on the web really
confusing. I am using Ant simply as a macro copy/download/find-replace
utility and am an ActionScript programmer, not a Java one.

Anyway... There's one bit I'm stuck on and really need your help please!

I have used Ant to download an XML file and store it locally. I now need a
way of going through the XML, finding all the image URL attributes,
downloading those images and replacing all the URLs in the XML to local
relative paths. So far, all I have is:

		&lt;loadfile property="questions" srcFile="${local.path}GetAllQuestions.xml"
/&gt;
		&lt;propertyregex input="${questions}" property="questions.output"
regexp="Media=&amp;quot;(.*?)&amp;quot;" select="\1" global="true" /&gt;
		&lt;echo message="${questions.output}" /&gt;

This only traces the first one in the XML, but obviously I want to find all
of the instances, add them to some kind of array and then loop through that
array and load them all. I've done a for list before so that bit is okay,
but the question is how do I get Ant to iterate through and find all
individual instances of that regexp?

Please help... Thanks!

:-Joe
-- 
View this message in context: http://old.nabble.com/RegExp-help-needed%21-tp26676257p26676257.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Build failure propogation</title>
<author><name>Raja Nagendra Kumar &lt;Nagendra.Raja@tejasoft.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26676192.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26676192-post@talk-nabble-com%3e</id>
<updated>2009-12-07T11:56:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Initially we were throwing new BuildException() as this did not work, we now
have the code like this 

project.fireBuildFinished(error)

This approach is resulting build fail error for the current ant programmatic
ant execution but the same failure is not getting propagated to the build
file which uses &lt;ant&gt; to invoke next one.. 

Any other suggestions from others pl.. I think we need some help on error
prorogation mechanism/design clues when mix of xml and custom tasks are
used.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: http://old.nabble.com/Build-failure-propogation-tp26666990p26676192.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Build failure propogation</title>
<author><name>Francis GALIEGUE &lt;fge@one2team.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c7c55bf80912070333rf5e32d6j2717764ed7e1443c@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7c55bf80912070333rf5e32d6j2717764ed7e1443c@mail-gmail-com%3e</id>
<updated>2009-12-07T11:33:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Mon, Dec 7, 2009 at 12:12, Raja Nagendra Kumar
&lt;Nagendra.Raja@tejasoft.com&gt; wrote:
&gt;
&gt; We use &lt;ant&gt; with in build file also in with custom task , we use ant class
&gt; task as api. In this place it fails.
&gt;
&gt; new Ant() etc.. and calling execute() method.
&gt;

Well, from what I know, if you want to propagate a failure, you should
throw BuildException. If you do that and it doesn't work, I cannot
help any further I'm afraid :/

-- 

Francis Galiegue
ONE2TEAM
IngÃ©nieur systÃ¨me
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond PoincarÃ©
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Build failure propogation</title>
<author><name>Raja Nagendra Kumar &lt;Nagendra.Raja@tejasoft.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26675759.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26675759-post@talk-nabble-com%3e</id>
<updated>2009-12-07T11:12:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

We use &lt;ant&gt; with in build file also in with custom task , we use ant class
task as api. In this place it fails.

new Ant() etc.. and calling execute() method.

Regards,
Nagendra
-- 
View this message in context: http://old.nabble.com/Build-failure-propogation-tp26666990p26675759.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Build failure propogation</title>
<author><name>Francis GALIEGUE &lt;fge@one2team.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c7c55bf80912070111g3f03bc00x805ed3639a729566@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7c55bf80912070111g3f03bc00x805ed3639a729566@mail-gmail-com%3e</id>
<updated>2009-12-07T09:11:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sun, Dec 6, 2009 at 18:23, Raja Nagendra Kumar
&lt;Nagendra.Raja@tejasoft.com&gt; wrote:
&gt;
&gt; Hi,
&gt;
&gt; Are there good documents and pointers to understand the build failure
&gt; prorogation, when custom executor, custom tasks and one build file invoking
&gt; others (n level of chained build.xml invokes).
&gt;
&gt; Unable to fail the entire build (i.e the main build file still says build
&gt; successful when the child build file fails or custom task throws the
&gt; exception)
&gt;

How do you invoke other build.xml files? "Chained failures" work for
me, and I use &lt;ant&gt;.

-- 

Francis Galiegue
ONE2TEAM
IngÃ©nieur systÃ¨me
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond PoincarÃ©
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Build failure propogation</title>
<author><name>Raja Nagendra Kumar &lt;Nagendra.Raja@tejasoft.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26666990.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26666990-post@talk-nabble-com%3e</id>
<updated>2009-12-06T17:23:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi,

Are there good documents and pointers to understand the build failure
prorogation, when custom executor, custom tasks and one build file invoking
others (n level of chained build.xml invokes).

Unable to fail the entire build (i.e the main build file still says build
successful when the child build file fails or custom task throws the
exception)

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-- 
View this message in context: http://old.nabble.com/Build-failure-propogation-tp26666990p26666990.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: making Sphinx4 apps with Ant</title>
<author><name>johnyjj2 &lt;johnyjj2@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c26651847.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26651847-post@talk-nabble-com%3e</id>
<updated>2009-12-05T00:57:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

May I have your answer, please?
-- 
View this message in context: http://old.nabble.com/making-Sphinx4-apps-with-Ant-tp26553582p26651847.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Dereferencing property files</title>
<author><name>&quot;Dalton, Tom&quot; &lt;tdalton@hp.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c19B0A6276CCB4741891D9DAF0896A52E96EFB0C058@GVW1088EXB.americas.hpqcorp.net%3e"/>
<id>urn:uuid:%3c19B0A6276CCB4741891D9DAF0896A52E96EFB0C058@GVW1088EXB-americas-hpqcorp-net%3e</id>
<updated>2009-12-04T14:01:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I have implemented the suggestion on the FAQ of using a macrodef task to do the double dereference
(in 1.7.1) and it works perfectly, so thank you all for the help. I am still surprised it's
not a standard built-in task though...

Cheers,

Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>AW: Compile with java 1.5_0.17 run junit tests with 1.6_14</title>
<author><name>&quot;Knuplesch, Juergen&quot; &lt;Juergen.Knuplesch@icongmbh.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/ant-user/200912.mbox/%3c06080D44730F41428BAF2168FA8BDD800406E73E@icsrv02.icongmbh.de%3e"/>
<id>urn:uuid:%3c06080D44730F41428BAF2168FA8BDD800406E73E@icsrv02-icongmbh-de%3e</id>
<updated>2009-12-04T13:38:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Yes, in junit task there is a  attribut called           

     jvm="${dope.junittest.jvm2}"


-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: florin.botis [mailto:fldrog@yahoo.com] 
Gesendet: Freitag, 4. Dezember 2009 11:47
An: user@ant.apache.org
Betreff: Compile with java 1.5_0.17 run junit tests with 1.6_14


Hello,

   I have a build.xml file which contains different tasks for compiling and running the junit
tests. I need to know if there is a way to compile the source code with the java 1.5_17 and
the run the junit under a 1.6 JVM.

Thanks in advance,
      Florin
--
View this message in context: http://old.nabble.com/Compile-with-java-1.5_0.17-run-junit-tests-with-1.6_14-tp26635850p26635850.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



</pre>
</div>
</content>
</entry>
</feed>
