Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 152823

Summary: XML column mapping: support predicates in parent element names
Product: z_Archived Reporter: Gary Xue <xxue>
Component: BIRTAssignee: Xiaokun Yi <xyi>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 Keywords: plan
Version: 2.1.0   
Target Milestone: 2.2.0 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Gary Xue CLA 2006-08-04 02:25:35 EDT
My XML Data has the following structure:
<root>
  <country name="China">
     ...
     <city name="Shanghai" iscapital="n" />
     <city name="Beijing" iscapital="y" />
  </country>
  ...
</root>

The row mapping is defined to be "/country" (selecting all country elements).

I'd like to be able to define the following two column mappings:

/city[1]/@name      (Name of first city in the country)
/city[@iscapital='y']/@name  (Name of capital city)

However current XML column mapping wizard does not accept either mapping as valid. These mappings should be supported since they are quite common.
Comment 1 Lin Zhu CLA 2006-08-08 23:37:26 EDT
Column mapping like "/city[1]/@name" has already supported.

The support to filter is however still limited.We need to support xpath expression that contains row filters such as "/city[@iscapital='y']/@name".
Comment 2 Lin Zhu CLA 2006-08-25 01:42:20 EDT
It is not easy to allow filter like "/city[@iscapital='y']/@name" in current xml driver. We only support tailing filter now, say, "/city[@iscapital='y']".

Consider to defer this bug to 2.2.0.
Comment 3 Xiaokun Yi CLA 2006-12-05 03:55:14 EST
Support for parent element predicts is available for use