xpath or operator,xpath pipe,xpath pipe operator,xsl or operator,xsl boolean operator,xpath pipe or,operator pipe,xml or operator,what does an operator do,pipe operator, xml%%%xpath or operator - RE: The pipe '

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

RE: The pipe '|' operator: Does it mean Or or Union?

Subject: RE: The pipe '|' operator: Does it mean Or or Union?
From: kakridge@xxxxxxxxxxxxx
Date: Wed, 14 Jan 2004 13:43:15 -0500
xpath or operator
That makes sense, especially with the fact the 'or' returns a Boolean.
The color commentary is welcomed. :)

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Wendell Piez
Sent: Wednesday, January 14, 2004 1:12 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  The pipe '|' operator: Does it mean Or or Union?

At 12:15 PM 1/14/2004, Jeff wrote:
>kakridge@xxxxxxxxxxxxx wrote:
>>I've noticed the the Muenchian method uses '|' and that everyone
refers
>>to this as a Union.  However, I also read that this
>><xsl:template match="foo | foobar">
>>means to match the foo OR foobar elements.  Does the definition of the
>>operator change based on the application?
>
>Matching "foo | foobar" gives you the union of the set of all foo with
the 
>set of all foobar.  You can read it as "OR", but it's still a union 
>operator.  XPath has a separate "or" operator, but that's not the same
thing.

It may also help to recall the rationale for matching: my node matches a

pattern if there is another node in the document from which my node can
be 
retrieved, using the given pattern as an XPath expression. (This would
make 
for chaos, except of course not all XPath location paths are allowed as 
patterns -- only some of the ones that look "down").

Since all foo and all foobar elements have parent nodes, any of them can
be 
reached, from somewhere, using the XPath "foo | foobar". In other words,

the pattern matches any node in the union set of foo and foobar
elements.

(The "or" operator returns a Boolean, so it can't be used in a pattern
-- 
apart from inside predicates -- since it doesn't return nodes at all.)

Hm, I seem to be offering lots of color commentary today....

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



 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.