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

Re: Order of xsl:template matching

Subject: Re: Order of xsl:template matching
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Wed, 11 May 2005 05:57:28 -0700 (PDT)
matching report
For e.g. if the XML is ..
<test>
 <TEXT>sldj aldj aldj a</TEXT>
 <REPORT>12345</REPORT>
</test>

You may do -

<xsl:template match="test">
  <xsl:apply-templates select="REPORT" />
  <xsl:apply-templates select="TEXT" />
</xsl:template>

<xsl:template match="TEXT">
  <!-- anything you wish to write -->
</xsl:template>

<xsl:template match="REPORT">
  <!-- anything you wish to write -->
</xsl:template>

Regards,
Mukul

--- mylistaddress@xxxxxxxxxx wrote:
> Hi again,
> 
> Given this XML chunk:
> <TEXT>sldj aldj aldj a</TEXT>
> <REPORT>12345</REPORT>
> 
> How can I apply templates and have the REPORT appear
> before the TEXT in the results of the
> transformation?
> 
> By default, ther matches seem to get processed in
> the
> order in which they appear in the XML. To change
> this
> order, must I use xsl:value-of select= of the
> fields,
> or can it be done with template matching?
> 
> Thanks,
> 
> JW
> 
> 


		
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/

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.