eXist-db / exist

eXist Native XML Database and Application Platform
https://exist-db.org
GNU Lesser General Public License v2.1
429 stars 180 forks source link

[feature] Implement missing functions #3595

Closed dizzzz closed 4 years ago

dizzzz commented 4 years ago

I compared the presence of all (w3c defined) functions in eXist-db with the spec; I found a few yet missing functions:

  array:sort()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions/array

  fn:collation-key()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions
  fn:default-language()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions 
  fn:element-with-id()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions
  fn:format-integer()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions 
  fn:path()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions 
  fn:transform()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions
  fn:uri-collection()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions

  map:find()  is not defined in module namespace: http://www.w3.org/2005/xpath-functions/map
adamretter commented 4 years ago

@dizzzz I think @joewiz already maintains such a list... possibly as a Gist. Perhaps you guys could combine them?

joewiz commented 4 years ago

@dizzzz My list is here in the docs: https://exist-db.org/exist/apps/doc/xquery#unsupported-features - and it specifies which arities are missing. (The more up-to-date source is here: https://github.com/eXist-db/documentation/blob/master/src/main/xar-resources/data/xquery/xquery.xml#L111-L155.)

Your list is missing fn:document-uri#0, fn:nilled#0 (https://github.com/eXist-db/exist/issues/3243), fn:round#2, fn:trace#1, and map:merge#2.

I would heartily welcome any efforts to add the missing functions!

I think there's been some work on array:sort here: https://github.com/adamretter/exist/tree/array-sort.

There's no need to wait until 6.0.0. I think it only needs a minor release - i.e., 5.3.0.

adamretter commented 4 years ago

I think there's been some work on array:sort

@joewiz I just back-ported our implementation from FusionDB for you - https://github.com/eXist-db/exist/pull/3596