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

Re: matching question

Subject: Re: matching question
From: Garvin Riensche <g.riensche@xxxxxxx>
Date: Wed, 06 Aug 2008 13:25:53 +0200
Re:  matching question
Thanks for your answer. So, if my stylesheet only consists of one template without an apply-templates:

<xsl:template match="node()">

I guess there's a build-in template with a call of apply-templates so that this template is executed.

If my input is like


the above template matches only <a> although <b> is also a node that is "children of some parent". What's the reason for that?


1. For any template rule T to be fired, two conditions must apply:

(a) someone has to call apply-templates selecting a particular node N

(b) Node N has to match the match pattern for rule T.

2. The pattern match="node()" is short for match="child::node()". So it
doesn't match all nodes, it only matches nodes that are children of some
parent. That is, it matches elements, text nodes, comments, and processing
instructions, but not attributes, document (=root) nodes, or namespaces.

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.