Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Order of applying templates

From: "Steve Muench" <smuench@------------->
To:
Date: 7/3/2000 4:36:00 PM
| 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent