[xsl] Keeping comments in an XML file

Subject: [xsl] Keeping comments in an XML file
From: Julie Holloway <jhllwy@xxxxxxxxx>
Date: Wed, 3 Sep 2003 11:49:32 -0700 (PDT)
Thanks everyone for your previous answers.
Following is my xsl script.  As tested using WSAD,
comments are kept in the resulting xml file.  However,
when used with ISMP, the comments are removed.  I am
wondering if there is a better way to keep the
comments.

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

    <xsl:output method="xml" />

    <!-- <xsl:template match="*|@*">  -->
    <xsl:template match="*|@*|comment()">
	<xsl:copy>
	  <xsl:apply-templates select="@*" /> 
	  <xsl:apply-templates select="node( )" /> 
	</xsl:copy>
    </xsl:template>
    
    <xsl:template
match="import[@plugin='com.test.ejbdeploy.ui']"/>
    <xsl:template
match="extension[view/@name='%Ejb_Project_view']"/>
    <xsl:template
match="extension[wizard/@name='%Ejb_Project_wizard_name']"/>
    <xsl:template
match="extension[@name='%Ejb_Nature_name']"/>
        		  		
</xsl:stylesheet>


=====
Julie

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Current Thread