Hello
I want to design a report for a more or less complex xml data source and have problems doing so.
My data source looks like this
<?xml version="1.0"?>
<report>
<document>
<item name='customer'>
<text>Max Muster</text>
</item>
<item name='accounts'>
<text>124890</text>
</item>
</document>
<document>
<item name='customer'>
<text>Theo Tester</text>
</item>
<item name='accounts'>
<textlist>
<text>796542</text>
<text>527988</text>
</textlist>
</item>
</document>
</report>
In my report there shall be a table, a line for each document with a column with the customer name and a second column with the account numbers:
Customers | Accounts
Max Muster | 124890
Theo Tester | 796542, 527988
As far as I am familiar with BIRT now, I see two problems:
1. item 'accounts' may have more than one value, in that case an extra element called 'textlist' will be present
BIRT can only show values for the lowest element, so my column mapping needs to be either item[
@name='accounts']/text or item[
@name='accounts']/textlist/text - how can I tell BIRT when to use which XPath?
2. With the given column mapping I won't be able to receive all accounts, as item[
@name='accounts']/textlist/text only returns the first account number.
How can I solve these issues?
1. No idea

2. Different data sets for the documents and the accounts and then try to connect them. I wanted to do that but when I tried to create a dataset for /document/item[
@name='accounts']/textlist/text I was told, that the XPath expression was invalid.
So I tried /document/item/textlist/text first and wanted to get the value of this element by XPath of . (point). But when I tried to preview that I was told that the query text was invalid.
So in the end I can't find out which accounts my customers have in this example.
Can anyone help? I have to work with this type of xml data sources a lot and if I can't find a way to design a report for multiple value items I think our customers won't be too happy about that.
Thanks alot,
Johannes