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: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Schochler, Richard E
Sent: 17 May 2004 19:21
To: 'saxon-help@lists.sourceforge.net'
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

Ex:
<xsl:output method="xhtml" doctype-public="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-system="dtd/xhtml/xhtml1-transitional.dtd"/>

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


Thanks,

Rick