Generating XHTML instead of HTML

Here should go questions about transforming XML with XSLT and FOP.
Posts: 2
Joined: Thu Feb 09, 2006 2:20 pm

Generating XHTML instead of HTML

Post by stauciuc » Thu Feb 09, 2006 2:29 pm

I have an XML and an XSL file that work well in a regular browser, but the file generated by Oxygen doesn't parse well. I guess it's because it is trying to generate Html Transitional, but I need Xhtml. The Oxygen transformation removes the closing tags for the meta and link declaration, and the img, and so on.
Do you know how I could tell it to do exactly what I need?
Thanks you!

Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post samples for receiving more help

Post by sorin_ristache » Thu Feb 09, 2006 3:51 pm


Any XSLT transformer embedded in <oXygen/> outputs only well-formed XML documents for the html, xhtml and xml output methods. That means any opening tag is matched by a corresponding closing tag. Please post small sample files of the input XML, input XSL and the transformation result obtained in <oXygen/>. Also post the result that you expect from the transformation in order to receive more help.


Site Admin
Posts: 2102
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Thu Feb 09, 2006 5:00 pm


If the output method for the transformation is html then an HTML meta tag will appear and it will not have a closing tag indeed.

Now you can set the serialization method to xml in XSLT 1.0 or to xhtml in XSLT 2.0 to have the document XML wellformed.
That will be:
<xsl:output method="xml"/>
or, for XSLT 2.0:
<xsl:output method="xhtml"/>

Best Regards,

Posts: 2
Joined: Thu Feb 09, 2006 2:20 pm


Post by stauciuc » Fri Feb 10, 2006 12:33 pm

Perfect! Exactly what I needed. I had forgotten that the <xsl:output> declaration existed :D

Multumesc ;)

Post Reply