Re: [xsl] Lookup Table?

Subject: Re: [xsl] Lookup Table?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 17 Aug 2004 12:30:30 -0400
Cezar,

At 10:07 PM 8/16/2004, Josh wrote:
How about something like this?
<xsl:value-of select="count(//MOP[number(.)&gt;0])"/>

I like this. It leverages your rule that open accounts are numbered, whereas non-numbered accounts will cast to NaN when you use the number() function. Hence, no lookup table is required.


Cheers,
Wendell

> This is the situation: I need to get the number of currently open account
> (which is indicated by MOP element), If MOP value is a number, not a
> 2-char-code, then the current account is opened, otherwise it's close. The
> MOP number could be 01 - 09. This is the xml:



====================================================================== 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 ======================================================================

Current Thread