ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
RE: [xsl] apply one XSLT stylesheet to another one ?
by Michael Kay other posts by this author
Nov 27 2006 11:00AM messages near this date
[xsl] apply one XSLT stylesheet to another one ? | RE: [xsl] apply one XSLT stylesheet to another one ?
& XSLT >  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[@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@[...].com> 
--~--
Thread:
Michael Stephan
Michael Kay
Brian Martinez

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved