38,833 questions
0
votes
1
answer
26
views
How to lookup multiple values of a key in a map in xslt 3.0
I am new to XSLT and I am trying to simply print one of the values of a key in XSLT3.0. Please help me with this.
My XML:
<AggregatedData>
<wd:Report_Data xmlns:wd="urn:com.workday....
Advice
1
vote
3
replies
71
views
Split single XML document into multiple XML documents
I have a task to split an XML that I'm receiving using XSLT. The input XML is formatted as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<...
2
votes
2
answers
184
views
What is the biggest number that MSXML can handle in XSLT?
When doing some numerical calculations in XSL templates I stumbled over the fact that a value of 3.600.000.000 which represents the number of microseconds in an hour can be represented in MSXML v6 ...
7
votes
3
answers
181
views
How can I pass a list of elements as a template's param to work on each on them with a for-each approach in XSLT 1.0?
I am working with XSLT 1.0 through a Java project, and I am unable to update to 2.0. I am attempting to write a Parent template that should call within it a Child template. I wish for the Parent ...
1
vote
2
answers
62
views
Sort entries in an XML file using Saxon 12.9 and an XSLT 3.0 stylesheet
I'm trying to sort entries in an XML file using Saxon, Saxon:sort and an XSLT 3.0 stylesheet.
I need to sort the nodes by the date in the <blogger:filename> field, which has the date as part of ...
-1
votes
1
answer
66
views
XSLT Transformation is not working as expected
Input XML
<tns:ipartycredit>
<ns3:crPtyRole>ACWINS</ns3:crPtyRole>
<ns3:crPtyRoleIndicator>R</ns3:crPtyRoleIndicator>
<ns3:crPtyInformationTag>57</...
1
vote
2
answers
163
views
xsl:try / xsl:catch - how to abort after the 10th error?
We are processing XML files of the following form with a burst-streamed XSLT-Transformation. Each Dok is independent of the others and a dynamic error in transforming one <Dok>should not ...
1
vote
2
answers
69
views
How to use XSLT to group consecutive following elements satisfying a certain condition (colspan)
See the XML code of a table below. My task is to add two attributes (NAMEST and NAMEEND) to every ENTRY element which has one or more consecutive following ENTRY elements with the text "##colspan#...
1
vote
3
answers
127
views
XSLT: Copy the majority of XML but replace subnode with a new data
There is an outdated section within the data, and I need to replace it. The replacement data is static and needs to go in place of existing Nodes.
<headerNode1>
<headerNode2>
<...
1
vote
2
answers
122
views
How to remember change of values in between for-each loops
I am writing a program, that will divide my students into groups. Lets say the groups are A, B, C and D. In each group there can be only so many students. Those numbers I have in a global variable:
&...
0
votes
2
answers
76
views
How do I add a \usepackage line to the generated latex from an XSL when using Saxon 12?
Using Saxon 12.8, I can compile an XML source to a TEX file. I am using the XSL file for Latex from TEIC/Stylesheets to do this.
My XML source however has some math that will need the amsmath package. ...
0
votes
2
answers
90
views
How to use XSLT to count consecutive following elements satisfying a certain condition
See the XML code of a table below. My task is to add an attribute (MOREROWS) to every ENTRY element which has one or more consecutive following rows with the text "##rowspan##" in the ENTRY ...
2
votes
2
answers
78
views
Performance of adding an entry to a large map [closed]
I have a large sequence of maps: 15,000 rows of 85 columns, initially created from sql:
<xsl:variable name="original-sequence" select="sql:prepared-query($connection, $sql)()"/&...
0
votes
2
answers
76
views
xpath filtering misleading misconception behavior [closed]
I have noticed this xpath misleading behavior problem,
for this expression:
elemA[ not(elemB) ]
it has two meanings:
1. yes show all elemA filtered all childs elemB. eg: select all elements but ...
1
vote
1
answer
56
views
XSLT for-each with using last and aggregation
I am not sure if this is possible with XSLT but I am trying to get the below XML into a format where it is name, title, date (if same date then only get date once), last value of In time (might not be ...
0
votes
0
answers
50
views
Why error about adding an “attribute” after adding a “node” when the “copy” has the attribute wildcard first?
When running the below XSLT
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xquery="http://www.w3.org/2005/xpath-functions"...
1
vote
1
answer
48
views
How can I access an API endpoint in XSLT if the API requires some authentication headers in the request
I can use the XSLT document() function to access external resources, so long as any authentication can be passed via the URL, e.g.
https://api.domain.com/call_x/id?api-key=abcd1234
However if the ...
0
votes
1
answer
32
views
XSLT 1.0 Report distinct values from XML
This is a sample of data from my XML table:
<table>
<tr>
<td>LCC/8700087542</td>
<td>010E</td>
<td>LHAO</td>
<td>HWAA</td>
<td>Add</...
1
vote
1
answer
54
views
What is adding a whitespace to the end of the output string for this XPath?
Using the latest Saxon parser.
This is a snip of a larger XML file.
<osm>
<node id="38275590">
<tag k="name" v="Wimbledon"/>
</node&...
0
votes
2
answers
110
views
How do I set the SystemId for an XSLT stylesheet in memory
(Inspired by an old question)
I have some stylesheets that use the anonymous document('') function to implement look-up tables.
<!-- example the lookup table data -->
<ref:data xmlns:ref=&...
2
votes
2
answers
47
views
Transpose rows into columns using xslt with associated values
I want to use xslt to transpose my input to generate a header for my csv file while printing associated values in the rows
Here is my sample XMl
<?xml version="1.0" encoding="UTF-8&...
0
votes
1
answer
50
views
XML Transformation in akka
I am trying to transform an XML inside an Akka Flow, using javax.xml.transform.Transformer:
Flow<ByteString, ByteString, NotUsed> transformXml(@NonNull final Source<ByteString, ?> xslt) {
...
1
vote
2
answers
63
views
xml-to-json number-formatter error when using input paran
I have the following stylesheet
<xsl:stylesheet
version="1.0"
xmlns:test="test"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xs="http://...
0
votes
0
answers
82
views
XML Indentation removal - reinsertion of spaces
I am having difficulty as I try to remove indentation in an XML document. I am attempting to do this by employing 2 techniques:
Adding <xsl:strip-space elements="*"/>
Applying “...
2
votes
1
answer
48
views
Select for XSL Descriptor is not picking up the value
I have relatively simple xml/xsl but I am not getting the value of the email descriptor in my output. I have tried several versions of getting the descriptor. @wd:Descriptor, @*:Descriptor, wd:...