<p>Hi,</p><p> </p><p>I'm having problems using BIRT's XML dataset which column mapping uses xpath containing predicates.</p><p>BIRT selects wrong data.</p><p> </p><p>I isolated the problem in my project and created the following minimalistic example using the famous book examples:</p><pre class="_prettyXprint"><books> <book id="bk002" altid="ALT2" stars="2.2"> <inner id="inner1" altid="inner1" stars="9.9"> <author>inner1</author> <title>inner1</title> <genre>Poem</genre> <price>4.95</price> <review>Least poetic poems.</review> </inner> <inner id="inner2" altid="inner2" stars="22.22"> <author>inner2</author> <title>inner2</title> <genre>Poem</genre> <price>7.95</price> <review>Least poetic poems.</review> </inner> <author>Poet</author> <title>The Poet's First Poem</title> <genre>Poem</genre> <price>24.95</price> <review>Least poetic poems.</review> </book></books></pre><p>I created a dataset using this xml, its row mapping xpath is "/books/book" (so we're iterating over every book element here - but note that there is only one so we're getting exactly one row)</p><p> </p><p>The column mapping contains three columns :</p><pre class="_prettyXprint">id /
@idinnerid1 /inner[
@altid="inner1"]/
@idinnerid2 /inner[
@altid="inner2"]/
@id</pre><p>The preview results shows this:</p><pre class="_prettyXprint">id innerid1 innerid2
bk002 inner2</pre><p>So you can see that the column "innerid1" is mapped to the xpath from innerid2, while innerid2 has no value.</p><p>I would expect that innerid1 contains the value "inner1" and innerid2 contains the value "inner2".</p><p><strong>Am I doing something wrong? Is it a bug? Is there a workaround?</strong></p><p> </p><p>In the attached files you can download this example project to try it out yourself.</p>