Questions tagged [functx]

FunctX is a library of XQuery and XSLT functions.

FunctX is a library which contains more than 150 functions to be used with either XQuery or XSLT. The functions cover a wide array of topics, amongst others, Strings, Numbers and Date/Time.

16 questions
4
votes
2 answers

Using functions in XSLT

I'm learning XSLT. These questions may be obvious, but I'm really stuck now. Oxygen returns the following two kind of errors: Namespace is not declared for 'ownFunction()'. ("undeclared namespace prefix {xs}") unknown system function…
user737917
  • 107
  • 1
  • 1
  • 9
4
votes
1 answer

Unable to Use functx library with intellij idea community edition

I am trying to import functx library using following import statement but i am not able to import it to my .xqy file in intellij idea community edition - 2018.1 xquery version "1.0-ml"; import module namespace functx =…
DevNinja
  • 1,459
  • 7
  • 10
4
votes
1 answer

Using functx:index-of-match-first in XQuery to return a substring of a text node

I am trying to write an XQuery which would find all text nodes that contain a given key word in an xml file. The text node is long so I would like to return a substring(of a desired length) of the text starting at the matching key word.…
sony
  • 1,557
  • 10
  • 36
  • 50
2
votes
2 answers

Change namespace in XQuery

I found the following XQuery user-defined function in the O'Reiily book XQuery and it is used to change the namespace of an XML file when it is printed: declare namespace functx = "http://www.functx.com"; declare function…
manuzhang
  • 2,995
  • 4
  • 36
  • 67
2
votes
1 answer

functx:remove-attributes adds an empty xmlns

The function functx:remove-attributes adds automatically an empty @xmlns to the node and I would like to prevent this behavior. Example xml:
o-sapov
  • 320
  • 2
  • 13
2
votes
2 answers

Find value in sequence using XSL

I want to check if a value exists in a sequence defined as In the past, I've had success with Priscilla Walmsleys function. For clarity, I reproduce it here as…
conciliator
  • 6,078
  • 6
  • 41
  • 66
2
votes
1 answer

Last day of previous month in XSLT

Is it possible to get the last day of the previous month in XSLT? I found this function: http://www.xsltfunctions.com/xsl/functx_last-day-of-month.html but I'm not sure how to use it to get the previous month.
cloudcalculus
  • 75
  • 3
  • 8
1
vote
1 answer

XQuery - wrong indexes in substring after reverse-string function use

Im trying to implement base64 coding in a very simple way. In my approach (lets for a second put away whether its appropriate or not) I need to reverse strings and then concate them. After that this concated string is used in substring function.…
Tomasz
  • 23
  • 1
  • 6
1
vote
1 answer

XQuery node is sequence

Is is-node-in-sequence-deep-equal in XQuery? I'm wondering because I've seen the function at xqueryfunctions.com, but I'm not being able to use it.
Noor
  • 19,638
  • 38
  • 136
  • 254
0
votes
1 answer

string extraction : functx:escape-for-regex() problem in Marklogic

I am trying to extract text within a template in marklogic , but I got an error of : [1.0-ml] XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected Lpar_, expecting Rpar_ I use for functx declaration…
0
votes
0 answers

Cannot install FunctX in eXist-db

I just installed the latest stable eXist-db version 5.2.0. I have a project that uses FunctX XQuery Function Library, but when I try to install it in the eXist Package Manager I get the following error: exerr:ERROR expath repository is not…
pajevic
  • 4,607
  • 4
  • 39
  • 73
0
votes
0 answers

SynapseXPath Evaluation of the XPath expression functx:substring-before-match

I fail to use functx:substring-before-match in one of my mediation sequences [2020-03-27 12:26:56,647] [] INFO - ApplicationManager…
zar3bski
  • 2,773
  • 7
  • 25
  • 58
0
votes
1 answer

When using the xquery function "functx:between-inclusive", is it possible for the first argument to come from 2 different attribute values?

I am using xquery to search and compare values from a source xml file against an svg file. Here is my xquery: for $xval in $figure/graphic/sheet/doc(@svgsrc)//*[text() = $rdi/text()], $line in $figure/graphic/sheet/doc(@svgsrc)/svg/line …
0
votes
1 answer

xquery- getting duplicate function definition error when I use the functx library from xqueryfunctions.com

I am trying to run some Xquery code in a java program and I am using the Saxon free java library for this purpose. Now for some reason I am getting repeated "duplicate function definition" errors when I run this code-- this error is occurring for…
Arvind
  • 6,404
  • 20
  • 94
  • 143
0
votes
2 answers

XQuery: removing newline/return character from end of a string stored in a variable in query

How do I remove a new-line/return from the end of a variable? I tried functx:substring-before-last to try and remove the new line (denoting it as \r, \n and also as \r\n) but still when I output that variable's value, the newline is still there in…
Arvind
  • 6,404
  • 20
  • 94
  • 143
1
2