Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340628 - XML Data source - column mapping - xpath problem with attribute and position predicates
Summary: XML Data source - column mapping - xpath problem with attribute and position ...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7.0 M7   Edit
Assignee: Mingxia Wu CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 02:53 EDT by Silvestr Peknik CLA
Modified: 2011-05-17 03:46 EDT (History)
1 user (show)

See Also:


Attachments
test xml (132 bytes, text/xml)
2011-04-28 04:58 EDT, Tianli Zhang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Silvestr Peknik CLA 2011-03-22 02:53:44 EDT
Hello,

I have XML data source and i am creating data set. Part of the xml that i want to bind to columns causes troubles to me or to BIRT.

The problem can be demonstrated on the XML part below. When trying to select <value> element using position predicate after using attribute predicate for <custom id="2">, the XPath does not work as expected:

XML:

<item>
<customs>
<custom id="2">
<name>Rick</name>
<values>
<value>3</value>
<value>4</value>
</values>
</custom>
</customs>
</item>

/customs/custom[1]/values/value[1]
returns "3"

/customs/custom[@id="2"]/values/value[1]
does not return anything

expected: 3, since points at the same element as previous query

/customs/custom[@id="2"]/values/value
returns "3"
Comment 1 Silvestr Peknik CLA 2011-03-22 02:59:27 EDT
To reproduce:

Create XML data source over an XML that contains structure similar to the one i described

Start creating data set. In column mapping, try selecting an element using the described XPath, with attribute predicate and then position

Click "Show sample data" to check what gets returned
Comment 2 Tianli Zhang CLA 2011-04-28 04:58:36 EDT
Created attachment 194244 [details]
test xml
Comment 3 Xiaoying Gu CLA 2011-05-17 03:46:42 EDT
Fixed in 3.7.0 M7