xsl-list
[Top] [All Lists]

Re: Order of xsl:template matching

2005-05-11 05:57:28
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(_at_)canada(_dot_)com 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
 


--~------------------------------------------------------------------
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>
--~--




                
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.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>