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

Re: Order of applying templates

Subject: Re: Order of applying templates
From: "Steve Muench" <smuench@xxxxxxxxxxxxx>
Date: Mon, 3 Jul 2000 23:35:53 -0700
steve luethje
| So far so good... But when I use my stylesheet now, the result is that the
| order of the page will be messed up. I get all Header1's, all Header2's and
| then all Texts. And not as I wanted Header1-Text-Header1-Header2-Text.
| What do I have to change in my stylesheet file in order to keep the order
| of the XML file?

If you want to process all children of <Content>
in document order (engaging the appropriate
template for each element you encounter) you can do:

<xsl:template match="Content">
  <!-- 
   | With no "select" attribute, defaults to process children
   | of the current node 
   +-->
  <xsl:apply-templates/>
</xsl:template>

Or to limit it to only specific children, but still
process them as they "lie" in document order, you
can do:

<xsl:template match="Content">
  <xsl:apply-templates select="Header1|Header2|Text"/>
</xsl:template>

hope this helps.
______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
Business Components for Java & XSQL Servlet Development Teams
Oracle Rep to the W3C XSL Working Group
Author "Building Oracle XML Applications", O'Reilly, Oct 2000


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


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.