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

Saxon node matching order

Subject: Saxon node matching order
From: "Ed Yau" <eyau@xxxxxxxxxxxxxxx>
Date: Fri, 28 Nov 2008 14:49:49 -0000
 Saxon node matching order
Hi all,

I have a question about how Saxon chooses which node to match next.

I have some XML that looks a bit like this:

   <z> </z>

What I'm trying to achieve is the follow:

      <z> </z>

With the code below:

<xsl:template match="x" >
	<xsl:apply-templates select="y|z"/>

<xsl:template match="y">
	<xsl:apply-templates select="z"/>

<xsl:template match="z">
	<xsl:copy-of select="."/>

<xsl:template match="@*|*">
        <xsl:apply-templates select="@*|node()">

But annoyingly my code seems to be doing this instead:

      <z> </z>

It is obviously matching all the <y> tags before the <z> tags.
Does anyone know of a way around this?

Many thanks,

Vision Support Trading
Web Site - www.vstrading.co.uk
Registered Office: Beech House, Park West, Sealand Road, Chester, CH1 4RJ

Please note all electronic mail may be monitored.

The information contained in or attached to this email is intended only for
the use of the individual or entity to which it is addressed. If you are not
the intended recipient, or a person responsible for delivering it to the
intended recipient, you are not authorised to and must not disclose, copy,
distribute, or retain this message or any part of it. It may contain
information which is confidential and/or covered by legal professional or
other privilege (or other rules or laws with similar effect in jurisdictions
outside England and Wales). The views expressed in this email are not
necessarily the views of Vision Support Trading Ltd, and the company, its
directors, officers or employees make no representation or accept any
liability for its accuracy or completeness unless expressly stated to the

Current Thread


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.
First Name
Last Name
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.