Skip to content

JENA-508: Partial implementation of Xpath3 functions (fn:normalize-space, fn:normalize-unicode and fn:round-half-to-even)#144

Merged
asfgit merged 7 commits intoapache:masterfrom
ales004:master
May 17, 2016
Merged

Conversation

@ales004
Copy link
Contributor

@ales004 ales004 commented May 14, 2016

I implemented the three Xpath3 functions:

  • fn:normalize-space
  • fn:normalize-unicode
  • fn:round-half-to-even

I tested the functionality taking the examples from the specs (xpath or unicode).
I still have one problem with 2 tests exprStrNormalizeUnicode10 and exprStrNormalizeUnicode11 that are not passing. I wrote in the comment of the test my findings but I am not sure how to go on from here. Someone could help?

Also while creating fn:round-half-to-even I realized that fn:round-half is not following the Xpath3 specs. I thus changes also the fn:round-half implementation. Still as I saw that the function used for fn:round-half we used for SPARQL ROUND, I decided to separate the two functions. Not sure if also SPARQL ROUND should be implemented following the Xpath 3 spec.

ales004 added 7 commits May 2, 2016 19:31
First implementation of fn:normalize-space: function and tests.
First implementation of fn:normalized-unicode with tests. Some doubt remain for part of the implementation.
I implemented fn:round-to-half-even. While implementing it, I realized that the fn:round function was not following the xpath3 directive and I thus changed it. Still as the round function (without fn) is used in SPARQL and SPARQL 1.1 seems to be based on Xpath2 (true?), I created a new roundxpath3 function that is implementing the xpath3 specs.
Tried to solve the problems on the test 10 and 11 for the NormalizeUnicode function but could not solve it fully.
@asfgit asfgit merged commit b692244 into apache:master May 17, 2016
asfgit pushed a commit that referenced this pull request May 17, 2016
@afs
Copy link
Member

afs commented May 17, 2016

Tests: exprStrNormalizeUnicode10, exprStrNormalizeUnicode11

I don't know why they are failing either. May be it's because the version of Unicodein Java is not new enough.

I've commented these out for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants