Questions tagged [xpath-3.0]

Use this tag for questions specific to XML Path Language (XPath) version 3.0

W3C Recommendations:

Resources:


Online Training

A"The Evolution of XPath: What’s New in XPath 3.0" -- A Pluralsight video-course (4.5h), by Dimitre Novatchev


47 questions
4
votes
1 answer

Can a function defined by xsl:function substitute for an xpath 3.0 inline function?

I was playing with this example in the xpath 3.0 spec: fn:fold-left(function($a, $b) { $a + $b }, 0, 1 to 5) I tried to substitute the inline function with a function defined by xsl:function.
Fred Finkle
  • 1,947
  • 3
  • 18
  • 21
4
votes
2 answers
4
votes
1 answer

Iterate over nodes containing CDATA and concatenate them and how to retrieve specific data of the concatenate data

I'm new to XSLT and need to solve a nasty problem and I've no change to solve it. The following example describes my problem: XXX123456123]]>
Dirk
  • 121
  • 1
  • 7
3
votes
1 answer

Any XPath/XSLT/XQuery 3.0 specific learning resources out there?

I'd prefer books. Do you know of any due to be released? Work ongoing? I ask as I want to get up to speed with the new features in 3.0 (I know its not finalized yet), but I can't seem to find much. I know I could ref the ongoing spec but if that…
Dino Fancellu
  • 1,974
  • 24
  • 33
3
votes
3 answers

Parsing a URL query string into a map of parameters with XPath

What would be the most readable way to parse a URL query string into a { 'param': 'value' } map in XSLT/XPath 3.0? Note: this is the inverse function of the one described in Building a URL query string from a map of parameters with XPath. Update: I…
3
votes
3 answers

Building a URL query string from a map of parameters with XPath

What would be the most readable way to build a URL query string from a { 'param': 'value' } map in XSLT/XPath 3.0?
3
votes
1 answer

xslt: whats the easiest way to do a negated selection?

Basically what I would like is something like this that finds all nodes where the ID cannot be lookup'ed up ('broken links') : But this is not working as…
darune
  • 10,480
  • 2
  • 24
  • 62
3
votes
1 answer

XPath 3.x - sort function

I need to sort a sequence of elements using plain XPath 3.0, so no XQuery, no XSL-T and no code. I tried following this answer on how to use the sort function, but I'm not an expert in XPath, so I couldn't figure out how to use it. So, my document…
Lukas
  • 756
  • 7
  • 20
3
votes
1 answer

XPath: Why does /document-node() match the document node?

An XPath expression of / returns the document node. An XPath expression of /html is equivalent to /child::html and given an HTML document would return the html element. This is of course evaluated by going to the document node (indicated by the /)…
VKK
  • 882
  • 7
  • 19
3
votes
1 answer

Xquery Node returns HTML code and browser don't read it

I have a XML code looking like this: <div style="text-align: justify;">El Casino de Asturias alberga una sala polivalente para cualquier tipo de acto desde conferencias, convenciones o reuniones de trabajo, hasta…
Santanor
  • 566
  • 1
  • 7
  • 20
2
votes
3 answers

How to do a case insensitive lookup over a set of nodes in XSLT/XPATH?

Say I have this data: and I have this other data:
toddmo
  • 20,682
  • 14
  • 97
  • 107
2
votes
2 answers

XPath 3.0 Recursive Query

I have some XML data with an inheritance-like semantics, and I'd like to make a query that takes the inheritance into consideration. I know it is not possible in XPath 1.0, but I believe it is possible in XPath 3.0, but I'm not familiar with 3.0. So…
Daniel C. Sobral
  • 295,120
  • 86
  • 501
  • 681
2
votes
2 answers

XPath 3.0 Serialize without Namespaces in Scope

While answering this question, it occurred to me that I know how to use the XSLT 3.0 (XPath 3.0) serialize() function, but that I do not know how to avoid serialization of namespaces that are in scope. Here is a minimal example: XML Input
Mathias Müller
  • 22,203
  • 13
  • 58
  • 75
2
votes
2 answers

What does ! mean in XPath 3.0?

XPath 3.0 defines a new operator called the 'mapping operator'. It is denoted by the exclamation mark --!. What does A!B mean? How do we use the ! operator? Could someone give me an example?
Chong Lip Phang
  • 8,755
  • 5
  • 65
  • 100
2
votes
2 answers

Construct an alphabetical sequence

This XPath expression: for $n in 1 to 5 return $n Returns 1 2 3 4 5 Is it possible to do something similar with alphabetic characters?
1
2 3 4