[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Is there a way to define groups of templates ?

Subject: Is there a way to define groups of templates ?
From: "Eran Pe'er" <eran@xxxxxxxxxxxxx>
Date: Thu, 17 Sep 1998 12:44:42 +0200
define groups
Is there a way to define groups of templates, so that when using the "xsl:process" & "xsl:process-children" commands we can specify what templates will be evaluated for the processing ?
 
For example: 
One group of templates for generating a TOC and a different group for generating the document's content.
 
The following is my offer for a possible solution:

<xsl:template match="/">
  <HTML>   
    <HEAD>     
    </HEAD>   
    <BODY>
 
 
<!-- Generate the TOC -->
    <xsl:process-children context="TOC"/>
 
 
<!-- Generate the document's content -->
    <xsl:process-children context="content"/>
 
 
    </BODY> 
  </HTML>
</xsl:template>
 
 
 
<!-- ---------------------------------------------------
This template will be activated only if the "TOC" context
is specified in the "xsl:process-children" command
  --------------------------------------------------- -->
<xsl:template match="title" context="TOC">
  
  generate a TOC line for the title ....
  
</xsl:template>
 

<!-- ---------------------------------------------------
This template will be activated only if the "content" context
is specified in the "xsl:process-children" command
  --------------------------------------------------- -->
<xsl:template match="title" context="content">
 
 
  generate a content line for the title ...
 
</xsl:template>
 
 
I think all this is somehow connected to
Issue (pattern-pi-target):
Should it be possible to have a pattern that matches a processing instruction?
 
 
Eran Pe'er
Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.