Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316118 - Allow to pass XML document to BIRT instead of input stream
Summary: Allow to pass XML document to BIRT instead of input stream
Status: NEW
Alias: None
Product: Data Tools
Classification: Tools
Component: Enablement:ODA (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement with 11 votes (vote)
Target Milestone: 1.8.2   Edit
Assignee: Wenjie Tu CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 08:17 EDT by Marcel Stör CLA
Modified: 2011-07-13 05:06 EDT (History)
4 users (show)

See Also:


Attachments
stack trace while parsing XML (71.77 KB, image/png)
2010-06-08 08:17 EDT, Marcel Stör CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Stör CLA 2010-06-08 08:17:52 EDT
Created attachment 171391 [details]
stack trace while parsing XML

One has to pay a serious performance penalty when the XML data source is used with an input stream -> allow to pass a XML document to BIRT.

[Scenario]
Our application creates XML content "on the fly" i.e. at runtime. We have a org.jdom.Document instance in memory. However, in order to use it as a XML data source for BIRT we need convert it into a byte[] which can then be wrapped by a ByteArrayInputStream and passed to BIRT:

task.getAppContext().put("org.eclipse.datatools.enablement.oda.xml.inputStream", xmlByteStream);

BIRT/ODA then does the exact opposite and parses the content with SAX (org.eclipse.datatools.enablement.oda.xml.util.SaxParser.run()). Needless to say that this is not very efficient.

[Proposal]
Allow to pass a XML document (org.w3c.dom.Document) using the app context like so:

task.getAppContext().put("org.eclipse.datatools.enablement.oda.xml.document", xmlDocument)

[Side note]
While debugging I noticed that for any given .rptdesign file several SaxParser instances were created (and run) - up to 8. It appears that for every table the whole XML document is parsed again! I suppose that even without the improvement described above this wouldn't be necessary.

[Side note 2]
Fix the naming typo in SuppressDuplciateReportExecutor.
Comment 1 Marcel Stör CLA 2010-06-08 08:18:54 EDT
Discussion was started here:
http://www.eclipse.org/forums/index.php?t=msg&th=169329&start=0
Comment 2 Joshy Cyriac CLA 2011-07-13 05:06:22 EDT
Hello, any update on this issue?