xsl-list
[Top] [All Lists]

Re: Lookup Table?

2004-08-17 09:30:30
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(_at_)mulberrytech(_dot_)com
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
======================================================================



<Prev in Thread] Current Thread [Next in Thread>