xsl-list
[Top] [All Lists]

RE: [xsl] apply one XSLT stylesheet to another one ?

2006-11-27 12:00:43
Is it possible to modify one XSLT stylesheet (A) with another 
(B) to create a new one (C), I guess it is! 

Yes, it is possible.

Would be great if 
someone of you could help me, a tiny example would be more 
than great. 

Here's a tiny example:

<xsl:stylesheet...

<xsl:template match="*">
  <xsl:copy>
  <xsl:copy-of select="@*"/>
  <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>

<xsl:template match="xsl:template[(_at_)match]">
  <xsl:copy>
  <xsl:attribute name="priority" select="10">
  <xsl:copy-of select="@*"/>
  <xsl:apply-templates/>
  </xsl:copy> 
</xsl:template>

</xsl:stylesheet>

This adds a priority="10" attribute to any xsl:template with a match
attribute that does not already have a priority.

Michael Kay
http://www.saxonica.com/ 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>