[xsl] copying <xsl:stylesheet> tag to output xsl file

Subject: [xsl] copying <xsl:stylesheet> tag to output xsl file
From: "tony" <dhirajtorane@xxxxxxxxx>
Date: Wed, 2 Jan 2002 19:39:59 +0530
Hi,
I have this XSL file as below..i want to copy the <xsl:stylesheet> tag to
the output xsl file, as i need the "my" namespace declaration in the
generated output xsl file.

<xsl:stylesheet version="1.0"  xmlns:my="http://mysite.com/mynamespace";>
 <xsl:output method="xml" version="1.0" indent="yes"/>
 <xsl:template match="/">
   <xsl:for-each select="document('')/xsl:stylesheet">
   <xsl:copy>
         <xsl:apply-templates/>
   </xsl:copy>
   </xsl:for-each>
 </xsl:template>


When i apply this XSL on a XML , it copies the <xsl:stylesheet> element
properly, but the <xsl:apply-template> applies the template on to this
same XSL file instead of the XML file.
e.g. The templates are applied on to <xsl:output> , <xsl:template>,
<xsl:for-each>, <xsl:copy> tags which are actually in the XSL file.

Can some one tell me a way by which i can copy the <xsl:stylesheet> element
to the output XSL file, & apply the templates on to the XML file so that the
output of comes between
<xsl:stylesheet version="1.0"  xmlns:my="http://mysite.com/mynamespace";>
        <!-- output from the XML file after applying the templates -->
</xsl:stylesheet>
tags.

I am sorry but i am not able to form the question properly.
Thanks,
Dhiraj


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread