Dynamic doctype in XSLT transform (correct use of result-document instruction)
问题 I'm using XSLT and need to generate the doctype dynamically in the transformed output, based on a parameter. I hear that this cann't be done using XSLT 1.0, but can with version 2.0, using the result-document tag. So far, from following the answer in this question, I have something like this: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="html" indent="yes"/> <xsl:param name="doctype.system" select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1