I have an XSLT 1.0 (2.0 is not an option) stylesheet which produces
XHTML. It can, depending on a parameter, produce a full XHTML
validable document or just a
In XSLT the value of omit-xml-declaration
must be either yes
or no
, you can't use Attribute Value Templates there. This applies to both 1.0 and 2.0.
The doctype attributes can use AVTs, but the problem is that you cannot omit the attribute, you can only output an empty attribute and this leads to output that has empty doctype strings.
Sorry, can't be done with XSLT. You can either use two different stylesheets, or set the output parameters in the code that calls the XSLT processor.