All Questions
3,955
questions
0
votes
2
answers
28
views
XPath 1.0 predicate with number function doesn't match all nonzero values in XSLT input
I'm using the xsltproc command and getting unexpected output from a predicate using the number() function. I'm trying to use number()'s output as a boolean, with 0 treated as false and all other ...
0
votes
1
answer
44
views
XSLT - Find most recently _closed_ prior element
xslt 1.0 I am afraid. I have access to exslt. I am otherwise looking to try to avoid using extension functions.
I need to find the most recently CLOSED xslt element of a particular type, rather than ...
0
votes
1
answer
42
views
fn:parse-json and NUL bytes in XPath
I know that XML doesn't allow NUL bytes in it, but I though that it would somehow work with JSON:
parse-json("""\u0000""") => serialize(map{"method": "...
1
vote
0
answers
62
views
Need to remove the duplicate node values index based using xslt 1.0
I tried various ways to get rid of the duplicate node values but couldn't achieve the desired result. Below is the input XML.
<before>
<class>
<type>352&...
0
votes
1
answer
31
views
XPATH select span containing anchor with specific href
I am trying to write an XPath statement that selects a span with a given class that contains an anchor with a given href. This is what I have now:
//span[.[contains(@class, 'versiontext')]/a[contains(...
1
vote
1
answer
64
views
Saxon9: How do I get the declared variables from the net.sf.saxon.expr.XPathContext in a Java extension function
I have declared several Java extension functions by implementing my own net.sf.saxon.functions.JavaExtensionLibrary and passing it to the net.sf.saxon.Configuration and thereby to the net.sf.saxon....
0
votes
2
answers
42
views
Javascript Document.evalute failing with 'name()' in XPath
I am attempting to use the Javascript Document evaluate function with valid XPath that uses the name() / local-name() function but am consistently getting the following error in Jfiddle:
The string '/...
0
votes
3
answers
79
views
XPath - how to exclude text from child node
I want this output (example):
I want this
I'm working with a XML/TEI document and I need to work with XPath expression and I want as output the text in the div/u, but without the text inside node ...
0
votes
1
answer
85
views
Result of SaxonJS.XPath.evaluate( fn:transform() ) doet not return root document node
For a NodeJs tool I have to perform a simple transformation of XML using XSLT.
I want to use SaxonJs, but I do not want to get in the whole xslt3/sef thing (the xslt changes and the tool needs to run ...
0
votes
2
answers
53
views
merge xml - bring element names from doc b into doc a as attribute values, match on child text (or position?)
👋 Hello and thanks in advance for any advice!
XML A
Metadata export a
Element names are custom, reflecting local field names
Element child text identical to B in content, document order
<metadata&...
0
votes
1
answer
87
views
How to unwrap and enclose elements between two other elements
I am currently transferring an MS Access query into XML to then use XSLT 3.0 to input the XML into FrameMaker for publishing purposes. In the process, I have to parse through various Access RTF fields ...
0
votes
1
answer
72
views
How to remove namespace declaration but preserve prefix in XML using XSLT
I have an XML with prefix & namespace declaration on some nodes and I would like to remove the declaration but preserve the prefix.
Current XML is showing up as below
<Body>
<n1:...
0
votes
1
answer
85
views
Select an element where the attribute @id corresponds to the attribute @newid of the current node() (ONLY XPATH)
<content>
<root>
<parametrs @id='par1'><displayText>Text1</displayText></parametrs>
<parametrs @id='par2'><displayText>Text2</displayText></...
0
votes
1
answer
40
views
Create specific XSL with depending variables
I am trying to built a XSL(t) file to specify an importruleset for my application. My source XML is coming from SPARQL.
The problem is that the number of variables is different for every query. What I ...
0
votes
0
answers
49
views
XPath parser continously looping to find Xpath function library in a given custom xpath expression
I am trying to load a custom library of XPath functions in my project using a custom build jar.
However when the function is called to load the XPath functions i get redirected to XPathParser.java ...