It sounds as if you want to use named output declarations: two different <xsl:output> declarations, distinnguished by the name attribute, using the format attribute of xsl:result-document to decide which one to invoke.
Michael Kay

From: [] On Behalf Of Schochler, Richard E
Sent: 17 May 2004 19:21
To: ''
Subject: [saxon] Controlling output method

Within my xslts, I make several passes over my data. The first pass creates multiple .xhtml files as needed. The subsequent passes build several XML files for the purpose of generating tocs and indexes. The means of generating these files are kept in additional xslts which are *imported* into my main xslts.

For several reasons, including handling entities, I include the dtd declaration for xhtml in my xsl:output element

<xsl:output method="xhtml" doctype-public="" doctype-system="dtd/xhtml/xhtml1-transitional.dtd"/>

Is there anyway to prevent this declaration from showing up in my generated xml files?