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

RE: Number of times apply-templates gets executed.

Subject: RE: Number of times apply-templates gets executed.
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 07 Jan 2003 14:26:20 -0500
RE:  Number of times apply-templates gets executed.
Viral,

This is actually a pretty nice example of how XSL-think is different from the kind of thinking that is useful (and necessary) in procedural languages:

At 12:07 PM 1/7/2003, you wrote:
So I was thinking that if I could test and see if the displayCommunity
template got applied or not then that will tell me we found a record or not.
But I am not sure how to determine how many times that template was applied
or not.

Mmhm. In other words, you're asking for a side-effect (some kind of state that can tell you whether a given template was applied or not). But the same logic could be addressed by asking "does a matching record exist in the source?", and if not, outputting the error message.


This question is very easy to ask in XSLT. And notice it is actually a more straightforward question -- being a question about your data, not your process. It's a nice little lesson, especially for those just getting their feet wet with XSLT.

Please post again with a short example showing your source code, if you need more concrete suggestions.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.