tags:

views:

130

answers:

1

Is there a way to set BIRT to output a report as XHTML (1.0 Transitional would be fine) instead of HTML?

I did a few tests and there are some elements that are not valid:head does not include a title, html must have a namespace (xmlns) attribute

Is this functionality supported at all by BIRT?

----- EDIT -----

Here are the current changes I need to make on the current HTML output produced by BIRT:

  • Change the doctype to xhtml transitional
  • Add the xmlns attribute to the html tag
  • Add the title element in the <head>
  • Set the missing end tag to the meta tag(s): </meta>

If the functionality is not supported by BIRT, how can I extend the current HTML emitter to transform the current HTML output to valid XHTML?

+1  A: 

This is not one of the standard output formats. You should be able to extend the HTML emitter with little effort to do this yourself.

Here are some resources to get started extending BIRT:

Good Luck!

MystikSpiral
That's what I thought, sadly. It almost validates to XHTML, except for a few details... Do you know what kind of extension I would need to write in order to transform the existing HTML output?
Etienne
You have two options. One, modify the existing HTML emitter to do what you want, or sub-class the existing HTML emitter to become the XHTML emitter. I would opt for #2. In your BIRT deployment, look for "/eclipse/plugins/org.eclipse.birt.report.engine.emitter.html_2.3.2.v20090331-1440.jar" (or something very similar based on your installed version). You will want to focus on extending or modifying HTMLEmitter.java.
MystikSpiral