Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
xpath constrictions?
HansGrund
Hi BIRT-fellows,<br />
<br />
seems I have a similar problem like Marco in<br />
[post]43214[/post] <br />
<br />
For a data set from an xml-file I try to<br />
map a data set column to this xpath expression<br />
<br />
<strong class='bbc'>//partner/child::*[rollenid = 1]/name</strong><br />
<br />
and BIRT just brings an empty field,<br />
whereas other xpath-interpreters, e.g. Xerces or Saxon,<br />
bring the correct value.<br />
<br />
Maybe BIRT has some serious constrictions<br />
on xpath predicates and language elements?<br />
<br />
Is there some documentation on how BIRT does<br />
xpath evaluation, and what versions or xpath<br />
expressions are (not) supported by BIRT?<br />
<br />
Thank you for any help!
Find more posts tagged with
Comments
HansGrund
Looking at the XML source of the rptdesign
the data set property "queryText" contains:
<property name="queryText">
table0#-TNAME-#table0#:#[//partner/*[rollenid=1]]#:#
{ort;STRING;ort},{vorname;STRING;vorname},{name;STRING;name},
{geburtsdatum;STRING;geburtsdatum},{rollenid;STRING;rollenid}</property>
When I omit the xpath predicate "[rollenid=1]" all runs well.
So obviously BIRT cannot cope with Xpath predicates!?
If this holds true, I would assess this issue as a rather severe limitation
of BIRT XML data set usage.
Thanks for any advice or further information!
rogertu
How about trying [
@rollenid="
;1"] as predicate? If this way still fails, you'd better file a bug:)<br />
<br />
Although using XPath expressions as Row/Column mappings, Not all XPath Syntax are supported. <br />
<br />
What it currenlty supports:<br />
/, //, .., *,
@attr
, element[n], element[
@attr="
;..."]<br />
<br />
For details:<br />
<a class='bbc_url' href='
http://www.eclipse.org/birt/release20specs/BPS23-XmlDataSourceSpec.pdf'>http://www.eclipse.org/birt/release20specs/BPS23-XmlDataSourceSpec.pdf</a><br
/>
<a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/563-birt-xml-data-source-tutorial/#description'>BIRT
XML Data Source Tutorial - Tutorials - BIRT Exchange</a>
HansGrund
Roger,
thanks for the pointer to the Xml Data source spec
where I learnt that the xpath restrictions are on design
to minimize memory usage.
Well, nested XML structures are used commonplace,
and I think BIRT should support the full xpath standard,
which is widely used and accepted.
Otherwise BIRT would risk to appear rigid and restrictive.
So I filed this issue a bug #265263.