Hi, 

I have the following problem when generating HTML 5 pages in a web application: 

This should give an HTML 5 page (and it does with an empty page):

declare
      %output:method('html')
      %output:version("5.0")
function _:process-page($page) {
  <html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>{$page}</body>
</html>
};

But with my, somewhat more complex pages, the media-type is always „application/xml“ and the <!DOCTYPE html> is missing from the request response.
Only if I force it with a complete  <rest:response>…</rest:response>  with a <output:media-type value='text/html'/> element, I get the correct HTML 5 result:

declare
      %output:method('html')
      %output:version("5.0")
function _:process-page($page) {
(<rest:response>
    <output:serialization-parameters>
      <output:media-type value='text/html'/>
      <output:method value='html'/>
      <output:version value="5.0"/>
    </output:serialization-parameters>
  </rest:response>,
  <html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>{$page}</body>
</html>)
};

In the „$page“ parameter are xml-wellformed HTML 5 pages which work fine, if I serve them directly from the filesystem. Can anyone please at least hint me in some direction?

Best regards,  Sebastian

 

-------------------------------------------------------
     >>> business. people. technology. <<<
-------------------------------------------------------

adesso AG mit Sitz in Dortmund
Vorstand: Michael Kenfenheuer (Vors.), Christoph Junge, Andreas Prenneis
Vorsitzender des Aufsichtsrates: Prof. Dr. Volker Gruhn
Amtsgericht Dortmund HRB 20663