Re: [xsl] XSL from XSL

Subject: Re: [xsl] XSL from XSL
From: JBryant@xxxxxxxxx
Date: Fri, 18 Nov 2005 09:59:08 -0600
I've been around that block a few times, and I have found that the key 
thing to remember is that XSL is XML. An XSL stylesheet is just another 
XML document and can be treated the same as any other XML document by an 
XSL transform.

As for copying the whole thing, an identity transform will do. If you use 
the following stylesheet as all three arguments (in, xsl, and out) for an 
XSLT processor, you'll get a copy of thing as output.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

  <xsl:output method="xml"/>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)

Current Thread