Hi, let $doc := <html><head><title>Example Title</title></head><body><p>Paragraph</p></body></html> return serialize($doc, map{"method":"xhtml", "version":"5.0"}) results in [SESU0013] Invalid 'version' value '5.0'; must be one of: 1.0,1.1. How can I make sure, I get the <!DOCTYPE html> and all empty elements closed? As far as I remember, the W3C has ratified an XHTML serialization of HTML5 as legit part of the HTML5 spec (replacing the "Polyglot HTML5" term). -- Minden jót, all the best, Alles Gute, Andreas Mixich
Am 04.05.2019 um 12:41 schrieb Andreas Mixich:
let $doc := <html><head><title>Example Title</title></head><body><p>Paragraph</p></body></html> return serialize($doc, map{"method":"xhtml", "version":"5.0"})
Use serialize($doc, map{"method":"xhtml", "html-version":"5.0"}) Note however that XHTML usually means the HTML elements are in the XHTML namespace i.e. let $doc := <html xmlns="http:/www.w3.org/1999/xhtml"><head><title>Example Title</title></head><body><p>Paragraph</p></body></html> return serialize($doc, map{"method":"xhtml", "html-version":"5.0"})
participants (2)
-
Andreas Mixich -
Martin Honnen