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

Re: Simple template matching problem

Subject: Re: Simple template matching problem
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 08 May 2007 01:08:25 +0200
Re:  Simple template matching problem
Steve wrote:

What you need is: match="Records[Record]" (you need a predicate, not a child specification).

I suppose I thought that Record[DATA_TYPE='x'] would override Records/Record because it was more specific. Obviously my ideas about xsl's ability to pick templates border on prescient.

Templates are chosen based on precedence rules which are clearly defined. I don't know them by heart, but in general, I think the following suffices: the more specific you get, the higher the precedence, but extra predicates or parent/child specifications do not add up and count equally.


If you want to override the default precedence (using @priority), using something below 0 will always be lower than default precedence and something above 1 will always be higher than default precedence.


Not really sure what you mean here. Yes, this is a much abbreviated
snippet from the actual xsl. Why do I need what, exactly?

Sorry, 'this' referred to '//beginDate'. It looks to me like a point for improvement of your code, but I can't tell, because I know too little of your structure. Hence the (sorry, rather vague) description of why and all.


Switching modes is something really handy why you happen to have very similar data sets that have to be treated rather differently. It looks like you have such sources, but I can't tell from your input.

Cheers,
-- Abel

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.