[xsl] xsl:output and import precedence

Subject: [xsl] xsl:output and import precedence
From: "Laura Porter" <lporter@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Jan 2008 12:02:58 -0000
I apologise in advance if this is a simple question, but it's got me a
bit stumped.

I have two XSLTs, template1.xslt and teplate2.xslt. template1.xslt
imports template2.xslt

In template1.xslt, the xsl:output element is set to output xml:

<xsl:output method="xml" encoding="UTF-8" indent="no"/>

And in template2.xslt, the xsl:output element is set for xhtml:

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

Yet the resulting document contains the xhtml doctype declaration, which
I wouldn't expect as I thought the xsl:output element in template1.xslt
would have priority.

Am I missing something obvious?

Any help appreciated & TIA.

Laura.



Laura Porter
Development

-------------------------------
lporter@xxxxxxxxxxxxxxxxxxxxxxx
Limehouse Software Ltd
DDI: (020) 7566 3335
Main: (020) 7566 3320
Fax: (020) 7566 3321
Limehouse Software Ltd
4th Floor
1 London Bridge
London
SE1 9BG
Manchester Office:
3rd Floor, The Triangle, Exchange Square, Manchester M4 3TR
Tel: (0161) 240 2440, Fax: (0161) 240 2441, ISDN: 08700 119 400
Check out Limehouse Software's innovative solutions
www.limehousesoftware.co.uk - Transforming the way you publish and consult on
information
The information contained in this e-mail or in any attachments is confidential
and is intended solely for the named addressee only. Access to this e-mail by
anyone else is unauthorised. If you are not the intended recipient, please
notify Limehouse Software Ltd immediately by returning this e-mail to sender
or calling 020 7566 3320 and do not read, use or disseminate the information.
Opinions expressed in this e-mail are those of the sender and not necessarily
the company. Although an active anti-virus policy is operated, the company
accepts no liability for any damage caused by any virus transmitted by this
e-mail, including any attachments.

Current Thread