xsl-list
[Top] [All Lists]

RE: Re: [xsl] Multiple elements condition

2007-08-28 10:16:58
At 09:18 PM 8/27/2007, you wrote:
So if "note[para[2]] " means "at least 2", how do you express "exactly 2"?

If you didn't want "note[count(para)=2]", you could say note[para[2]][not(para[3])]

These could be expressed a bit more intelligibly in XPath 2:

note[exists(para[2])] -- the note has a second para

note[exists(para[2])][not(exists(para[3]))] -- the note has a second para, but not a third

But I might opt for note[count(para)=2] as it's both concise, and quite obvious.

Cheers,
Wendell


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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--