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

Re: Getting Unexpected Results from .//* = $set-of-el

Subject: Re: Getting Unexpected Results from .//* = $set-of-elements
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 24 Feb 2018 20:17:20 -0000
Re:  Getting Unexpected Results from .//* =  $set-of-el
So my misunderstanding of "=" is that it is comparing values, not nodes--I
clearly never understood that properly.

That then explains why an empty element would produce the results I was
seeing: "" is equal to any other empty node.

Doh!

I will try Mike's intersection expression.

Cheers

W.

--
Eliot Kimber
http://contrext.com

o;?On 2/23/18, 6:39 PM, "Michael Kay mike@xxxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:


    > On 24 Feb 2018, at 00:18, G. Ken Holman g.ken.holman@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
    >
    > Ignore that second expression ... I wrote it too hastily and I'm now
back at my desk to think about it.
    >
    > This would work I think:
    >
    >  <xsl:value-of select="some $this in .//* satisfies
    >                        some $that in $elements-to-keep
    >                        satisfies $this is $that"/>
    >

    I think that's equivalent to saying that the intersection of the two sets
is non empty:

    select="exists(.//* intersect $elements-to-keep)"

    Michael Kay
    Saxonica

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.