Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To add a DOCTYPE declaration to a WAM, use the xsl:output element. For example:

     <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8"
      indent="no" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />

To avoid conflict between the different weblets and the main webroutine XSL, we recommend you define your DOCTYPE declaration in your layout weblet only.

...

As some devices might look for the simplified DOCTYPE to detect if the document is HTML5, the WAM runtime outputs the simplified HTML5 DOCTYPE if the xsl:output uses the XSL-friendly legacy-compat DOCTYPE:

     <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" 
      indent="no" doctype-system="about:legacy-compat" />