Dear members,
I have the following task:
<my.xmltask dest="${build.mapping.dir}/ContractTmp.hbm.xml">
<fileset file="${build.mapping.dir}/Contract.hbm.xml"/>
<copy path="/hibernate-mapping/class/id/[EMAIL PROTECTED]'native']/text()"
property="pty"
/>
</replace-->
</my.xmltask>
<fileset file="${build.mapping.dir}/Contract.hbm.xml"/>
<copy path="/hibernate-mapping/class/id/[EMAIL PROTECTED]'native']/text()"
property="pty"
/>
</replace-->
</my.xmltask>
in order to match the following structure:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.schinvest.lra.domain.Contract" table="lra_contract" catalog="lra">
<meta attribute="class-description">Plain old Java object that maps onto the contract table. <br> It was auto-generated on 12-mar-2006 10:25:49 by Hibernate Tools
3.1.0.beta4.</meta>
<id name="id" type="int">
<meta attribute="use-in-tostring">true</meta>
<column name="id" />
<generator class="native" />
</id>
</class>
</hibernate-mapping>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.schinvest.lra.domain.Contract" table="lra_contract" catalog="lra">
<meta attribute="class-description">Plain old Java object that maps onto the contract table. <br> It was auto-generated on 12-mar-2006 10:25:49 by Hibernate Tools
3.1.0.beta4.</meta>
<id name="id" type="int">
<meta attribute="use-in-tostring">true</meta>
<column name="id" />
<generator class="native" />
</id>
</class>
</hibernate-mapping>
nevertheless I get the following result:
Buildfile: P:\LRA\build.xml
prueba:
prueba:
BUILD FAILED
P:\LRA\build.xml:2126: <xmltask> subtasks failed to find matches
P:\LRA\build.xml:2126: <xmltask> subtasks failed to find matches
Total time: 4 seconds
I have tried with the following possible values for path attribute:
path="hibernate-mapping/class/id/generator/text()
path="hibernate-mapping/class/id/[EMAIL PROTECTED]'native']/text()
path="[EMAIL PROTECTED]'native']/text()
with the same result.
On my opinion this is a correct Xpath
syntax, so why it doesn't match the appropiate _expression_?
Thanks in advance,
David
P.S.: I suspect it could be a problem because the are node name and attributes with the same name, for example: class, id, etc, but I am not sure.
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.