[basex-talk] Problems installing EXPath

2021-09-02 Thread Jonathan Robie
I tried installing EXPath, but without success.


> REPO INSTALL http://files.basex.org/modules/expath/functx-1.0.xar
Stopped at , 1/66:
[repo:parse] functx-1.0.xar: Resource "expath-pkg.xml" not found..


If I download the .xar and unzip it, it looks like this:


[image: image.png]

Here is the content of expath-pkg.xml:


http://expath.org/ns/pkg";
 name="http://www.functx.com";
 abbrev="functx"
 version="1.0"
 spec="1.0">

   FunctX library

   
  http://www.functx.com/functx.xsl
  functx.xsl
   
   
  http://www.functx.com
  functx.xq
   



Any thoughts?


Jonathan


[basex-talk] Custom map combinator

2021-09-02 Thread Marco Lettere

Dear all,

just thinking out loudly ... Whether it could be interesting to specify 
a function with proper signature as a custom combinator for map:merge.


Currently "duplicates" : "combine" results in the entry value being a 
sequence of the originating values. This could cause loss of information 
in the case that one of the merged maps does not contain the key. It 
could be useful to use defaults or placeholders instead ...


Maybe even combine the values as strings or numbers 

Too exotic?

M.



Re: [basex-talk] probably a bug

2021-09-02 Thread Liam R. E. Quin
On Thu, 2021-09-02 at 17:22 +0200, Rob Stapper wrote:
> Hi Cristian,
> 
> Consider snippets [1] and [2], both result in false(). That can’t be
> right to me.
> 
> [1] () = 4
> [2] () != 4
> 

[1] means, there is an item in the left sequence whose atomized value
is equal to some value on  the right.
There isn't, so it's false.

[2] means, there's some item on the left whose value is unequal to some
value on  the right.
hence, (1, 2, 3) != (1, 2, 3) is true because for example 1 onthe left
is != to 2 on the right. Since there is no such pair of items here the
result is  false.

!= is  almost never useful - it doesn't do what most people expect, and
was included in XPath 1 for completeness.

Use not($seq1 = $seq2) for more sanity, or use eq  and ne for 
singletons.

Liam



-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org



[basex-talk] ignore previous mail, please!

2021-09-02 Thread Rob Stapper
I need a holyday. Sorry about the previous mail. Need to use not()-function 
offcourse.

Rob.

Sent from Mail for Windows



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: [basex-talk] probably a bug

2021-09-02 Thread Martin Honnen

On 02.09.2021 17:22, Rob Stapper wrote:


Consider snippets [1] and [2], both result in false(). That can’t be
right to me.

[1] () = 4

[2] () != 4


The empty sequence is neither equal to nor unequal to the number 4 as it
doesn't contain any item to compare 4 to:

https://www.w3.org/TR/xquery-31/#id-general-comparisons

General comparisons are existentially quantified comparisons that may be
applied to operand sequences of any length.

The result of the comparison is true if and only if there is a pair of
atomic values, one in the first operand sequence and the other in the
second operand sequence, that have the required magnitude relationship.
Otherwise the result of the comparison is false.


[basex-talk] probably a bug

2021-09-02 Thread Rob Stapper
Hi Cristian,

Consider snippets [1] and [2], both result in false(). That can’t be right to 
me.

[1] () = 4
[2] () != 4

Rob.

Sent from Mail for Windows



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus