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

Re: how to create variable by comparing two variables

Subject: Re: how to create variable by comparing two variables using [not]
From: "Dave Lang emaildavelang@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 14 Oct 2018 20:16:10 -0000
Re:  how to create variable by comparing two variables
I think I did a poor job of explaining what I'm trying to do.

I have two lists of jpg names: $jpg_few and $jpg_many.

I know that there are jpg names in $jpg_many that are not in jpg_few, but that's okay, I'm not interested in them.

I'm trying to find what jpg names are in $jpg_few that are NOT in $jpg_many.

I thought I had tokenized $jpg_few and $jpg_many when I created them.

When I try to create a new variable by using a "not" expression with $jpg_few and $jpg_many, I get an error message re: "A sequence of more than one item is not allowed as the first argument of fn:tokenize()".

I tried doing string-join to $jpg_few and $jpg_many before putting them in the expression but that didn't work either.

Here's the expression I'm trying to use to create a variable that shows which jpg names from $jpg_few are NOT in $jpg_many.

<xsl:variable name="jpgs_in_xml_not_directories" select="($jpg_few)[not(. = $jpg_many)]"/>

I think the problem is that I'm trying to do something with $jpg_few and $jpg_many that I can't do because they're strings or something, but this is where I get in over my head. Frustratingly, I used exactly the same syntax with three different (but also tokenized) variables earlier in the script and it worked fine.

Any assistance appreciated.
thx
dave

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.