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

Bug 361634

Summary: Namespace issue with XML Schemas in the New Data Set wizard
Product: [Tools] Data Tools Reporter: James Pasley <james.pasley>
Component: ConnectivityAssignee: dtp.connectivity-inbox <dtp.connectivity-inbox>
Status: NEW --- QA Contact: weiming tang <weiming.tang>
Severity: normal    
Priority: P3 CC: bluesoldier, weiming.tang, zqian
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
XML Schema that can be used to reproduce the problem
none
Example of a report containing the incorrect XPath expressions
none
Example of a report where the XPath expressions have been fixed by hand none

Description James Pasley CLA 2011-10-21 07:06:04 EDT
Build Identifier: v20110913-1734

When creating a new data set using the New Data Set wizard for an XML Data Source defined using an XML Schema, the XPath expressions are incorrect.

Attached is a simple XML Schema (ReportInput.xsd) created using the XML Schema editor in eclipse. I created a report (ReportFromXML.rptdesign) containing an XML data source based on this XML Schema. I then created a data set using the New Data Set wizard. The XPath expressions it generated don’t include a namespace prefix. For example, this was generated as the row mapping XPath expression: /Report_Data/Report_Entry

The XML Schema defines a targetNamespace, so the expression should be /tns:Report_Data/tns:Report_Entry.
	
Once the XPath expressions are fixed by hand as shown in FixedReportFromXML.repdesign, the report works correctly.

Reproducible: Always

Steps to Reproduce:
1. Create a new blank report
2. Create a new XML Data Source. Select the XML Schema attached to this bug report as the XML Schema on the Define XML Data Source step of the New XML Data Source wizard and click Finish.
3.Create a new Data Set, on the Row Mapping step of the wizard, select the Report_Data/Report_Entry node in the tree and click on the “>” button. Click OK on the dialog that appears.

Note that the Xpath expression displayed on the wizard is /Report_Data/Report_Entry. It should be /tns:Report_Data/tns:Report_Entry.
Comment 1 James Pasley CLA 2011-10-21 07:07:20 EDT
Created attachment 205709 [details]
XML Schema that can be used to reproduce the problem
Comment 2 James Pasley CLA 2011-10-21 07:07:51 EDT
Created attachment 205710 [details]
Example of a report containing the incorrect XPath expressions
Comment 3 James Pasley CLA 2011-10-21 07:08:19 EDT
Created attachment 205711 [details]
Example of a report where the XPath expressions have been fixed by hand