Questions tagged [xpath-3.1]

XPath 3.1 is the current version of XPath, finalized in March of 2017. It adds maps and arrays to XPath 3.0, as well as the arrow operator. Maps and arrays allow for JSON processing support. Use this tag for questions specific to XPath 3.1.

XPath 3.1 is the current version of XPath, it was finalized in March 2017, consisting of three specifications:

It builds on XPath 3.0, finalized in 2014.

The main new features in XPath 3.1 are the addition of maps and arrays to facilitate JSON processing and the arrow operator => which allows writing nested function calls like

tokenize((normalize-unicode(upper-case($string))),"\s+")

as

$string => upper-case() => normalize-unicode() => tokenize("\s+")

instead.

XPath 3.1 is supported on various platforms and with various host languages by implementations like

As XPath 3.1 is basically a subset of XQuery 3.1, any XQuery 3.1 implementation like BaseX also supports XPath 3.1.

Resources

36 questions
0
votes
1 answer

Exact meaning of this xpath

I came across this XPath string... courses[?(@.id==101)].students[?(@.id==111)] I'm not even sure if it is valid XPath because of how '?' and '.' are used. And it doesn't work in many online XPath evaluators. Although, in XPath 3, there is a lookup…
Teddy
  • 4,009
  • 2
  • 33
  • 55
0
votes
1 answer

How to expose functions defined in XSLT 2 stylesheet module to fn:transform?

The XPath 3.1 transform functions allows you to apply templates or call a named template or call a stylesheet function. However, when I try to use an existing XSLT 2.0 stylesheet module (like, for instance, the functx module documented at…
Martin Honnen
  • 160,499
  • 6
  • 90
  • 110
0
votes
1 answer

Can XProc 3 handle any XPath 3.1 value/type?

While reading up on XProc 3 I wonder whether a step like an XSLT 3 stylesheet can return any type of the XSLT 3 or XPath 3.1 data model. The spec in http://spec.xproc.org/master/head/xproc/#documents.9 has a section saying If the result is a map,…
Martin Honnen
  • 160,499
  • 6
  • 90
  • 110
0
votes
2 answers

.Net standard library that supports XPath 3.1

I'm maintaining a legacy tool of the company I work for written in C# and I'm converting it to .Net standard 2.0. It uses the Saxon-HE processor to process some XPaths and replace some configurations in files. Its NuGet package on .NET has…
gvdm
  • 3,006
  • 5
  • 35
  • 73
0
votes
1 answer

Where is xpath "element()" documented?

I just stumpled upon this xpath function(?) and I assume it is functioning like node(), etc. Hoever, I simply cannot seem to find any documentation. Example Im using latest version of saxon processor.
darune
  • 10,480
  • 2
  • 24
  • 62
0
votes
2 answers

saxon xpath 3.1 , access variables while creating map

I have the following xml document: NA Regular John Smith
123 Oak St.
WA (206) 123-4567
pavan
  • 334
  • 6
  • 20
1 2
3