Hi,
when using 'xhtml' output method, the doctype always matches the name of the root element (instead of 'html').
Does not happen with 'html' output method.
-- start xqm --
declare %rest:GET %rest:path("test-frag") %output:method("xhtml") %output:html-version("5.0") function _:test-frag(){
<form>
</form>
};
-- end xqm --
Result:
<!DOCTYPE form> <form></form>
Regards,
Max
Hi Max,
when using 'xhtml' output method, the doctype always matches the name of the root element (instead of 'html').
Does not happen with 'html' output method.
It may come as a surprise (and I cannot give an explanation for that), but the current behavior is in compliance with the serialization spec:
• XHTML: "The name following <!DOCTYPE MUST be the same as the local part of the name of the element." [1]
• HTML: "The name following <!DOCTYPE MUST be HTML or html." [2]
Cheers, Christian
[1] http://www.w3.org/TR/xslt-xquery-serialization-31/#XHTML_DOCTYPE [2] http://www.w3.org/TR/xslt-xquery-serialization-31/#HTML_DOCTYPE
basex-talk@mailman.uni-konstanz.de