title: XMLPath from ant using XMLTasks can't match if XML file has elements in different name spaces
body: <p>I'm trying to get some matching using XMLTasks to replace some values in a xml file but it keeps failing due to no match. Using other tools it says that my xpath is correct but I can't figure out what's wrong.</p>
  
  <p>Here the file I'm searching:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;project xmlns="http://www.netbeans.org/ns/project/1"&gt;
      &lt;type&gt;org.netbeans.modules.apisupport.project&lt;/type&gt;
      &lt;configuration&gt;
          &lt;data xmlns="http://www.netbeans.org/ns/nb-module-project/3"&gt;
              &lt;code-name-base&gt;simple.server.extension.cardgame&lt;/code-name-base&gt;
              &lt;suite-component/&gt;
              &lt;module-dependencies&gt;
                  &lt;dependency&gt;
                      &lt;code-name-base&gt;marauroa.lib&lt;/code-name-base&gt;
                      &lt;build-prerequisite/&gt;
                      &lt;compile-dependency/&gt;
                      &lt;run-dependency&gt;
                          &lt;release-version&gt;3&lt;/release-version&gt;
                          &lt;specification-version&gt;8&lt;/specification-version&gt;
                      &lt;/run-dependency&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;code-name-base&gt;simple.server.lib&lt;/code-name-base&gt;
                      &lt;build-prerequisite/&gt;
                      &lt;compile-dependency/&gt;
                      &lt;run-dependency&gt;
                          &lt;release-version&gt;0-1&lt;/release-version&gt;
                          &lt;specification-version&gt;0.2&lt;/specification-version&gt;
                      &lt;/run-dependency&gt;
                  &lt;/dependency&gt;
              &lt;/module-dependencies&gt;
              &lt;public-packages&gt;
                  &lt;package&gt;dreamer.card.game&lt;/package&gt;
                  &lt;package&gt;dreamer.card.game.model.events&lt;/package&gt;
                  &lt;package&gt;dreamer.card.game.price&lt;/package&gt;
                  &lt;package&gt;dreamer.card.game.storage&lt;/package&gt;
                  &lt;package&gt;simple.server.extension&lt;/package&gt;
                  &lt;package&gt;simple.server.extension.card&lt;/package&gt;
              &lt;/public-packages&gt;
              &lt;class-path-extension&gt;
                  &lt;runtime-relative-path&gt;ext/extension/x.jar&lt;/runtime-relative-path&gt;
                  &lt;binary-origin&gt;../../Simple Marauroa Java/Card Game Extension/dist/x.jar&lt;/binary-origin&gt;
              &lt;/class-path-extension&gt;
              &lt;class-path-extension&gt;
                  &lt;runtime-relative-path&gt;ext/extension/y.jar&lt;/runtime-relative-path&gt;
                  &lt;binary-origin&gt;../../Simple Marauroa Java/Card Game interface/dist/y.jar&lt;/binary-origin&gt;
              &lt;/class-path-extension&gt;
          &lt;/data&gt;
      &lt;/configuration&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And this is the path expression I'm using:</p>
  
  <pre><code>/project/configuration/data/class-path-extension[1]/runtime-relative-path/text()
  </code></pre>
  
  <p>Here are the relevant parts of the task I'm trying to run:</p>
  
  <pre><code>&lt;target name="s" depends="-define-xmltasks"&gt;
          &lt;propertyselector property="subprojects" match="original.project.dir(.*)" select="\1"/&gt;
          &lt;for list="${subprojects}" param="subproject"&gt;
              &lt;sequential&gt;
                  &lt;xmltask source="nbproject/project.xml" dest="nbproject/project.xml" failWithoutMatch="true"&gt;
                      &lt;replace path="/project/configuration/data/class-path-extension[@{subproject}]/runtime-relative-path/text()" 
                               withText="ext/extension/${extension-lib@{subproject}.dist.jar}"/&gt;
                      &lt;replace path="/project/configuration/data/class-path-extension[@{subproject}]/binary-origin/text()" 
                               withText="${original.project.dir@{subproject}}/dist/${extension-lib@{subproject}.dist.jar}"/&gt;
                  &lt;/xmltask&gt;
              &lt;/sequential&gt;
          &lt;/for&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>@{subproject} resolves to a number and already tried changing it for a number but has the same effect. Any idea?</p>