6,141 questions
-3
votes
1
answer
88
views
Converting a number ofargument tags with different attributes into unique tags
I need to convert an XML file to another format. A system creates an XML log with entries like this, I now know that the format was probably selected to allow extension without changing the schema:
&...
0
votes
1
answer
68
views
I want to check the content in between to match regex condition in XSLT
In @xlink:href contains 10.1513/AnnalsATS.202508-879ED text will come different types of doi numberes in many file, How to replace it in regex mode to match the below condition. Please anyone help on ...
2
votes
2
answers
53
views
Pick the data from after the first "/" and then data after the second "/" and continous till the third slash
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" ...
-3
votes
1
answer
62
views
Delete content of XML under conditions
An XML without content should be generated if the same value occurs several times in the Item/SupplierArticleNumber and the value in the Item/SalesPrice is different.
Example XML:
<?xml version=&...
0
votes
5
answers
124
views
How to select ranges of siblings in XSLT 1.0?
Suppose I have the following XML:
<?xml version="1.0" encoding="utf8"?>
<test>
<list>
<li>a</li>
<li>a</li>
<li begin=&...
0
votes
1
answer
120
views
Errors during stylesheet compilation with saxon
I am Using saxon EE processor for conversion of XML with XSLT-2.0. but its giving error for XSL file .
Below is the Code for XSL File
<?xml version="1.0"?>
<xsl:stylesheet version=&...
0
votes
2
answers
62
views
xslt 1.0 - need a delimiter between each node value under for-each select
i have ran out of ideas on my XSLT 1.0 below. Could you guys guide me on how to insert a delimiter between every node values?
My source XML:
<NtryDtls>
<TxDtls>
<...
0
votes
1
answer
87
views
XSLT 1.0 Muenchian Method returning empty results
I'm trying to find the different unique data of a specific field.
For some, it finds them correctly, for others, it doesn't seem to be evaluated, but is detected as existing.
It's supposed to write in ...
-1
votes
1
answer
93
views
How to translate special characters using unicode and display & correctly in the same Choose block
I am trying to translate names to display correctly in a database using xsl version 1.0 logic that have special characters, specifically umlauts. I have been able to get ö, ä, and ü to be translated ...
0
votes
1
answer
52
views
Why does the W3C XSLT 1.0 specification miss the info about "mode-specific" template rules for nodes other than root and element nodes?
Section 5.8 (Built-in Template Rules) of W3C specs for XSLT 1.0 explicitly lists built-in template rules and their behaviour for all node types in the "no-mode" case (<xsl:template> ...
0
votes
1
answer
62
views
Merging multiple elements inside an XML based on a deeper nested element with XSLT
I know there are multiple articles about merging and grouping with XSLT, however I couldn't really find an article specific for my case and to be honest, I think merging/grouping in XSLT is rather ...
0
votes
1
answer
36
views
How to create a URL query string from a dynamic complex XML structure using XSLT 1.0
I need to be able to transform various XML structures into URL query strings. The tricky part is, that there are multiple XML structures, so the transformation would have to be dynamic/generic.
Here ...
0
votes
2
answers
113
views
Using node list within xsl:value-of to extract xml datas
First of all, I am completly new to xslt. I have a program that gives me an xml file with the following layout
<?xml version="1.0" encoding="utf-8"?>
<Statistic>
&...
0
votes
1
answer
76
views
xslt code to split the xml file in to mulitple xml files in runtime based on xml tag <events> and <id>
Am trying to split the xml file in to multiple xml files based on the xml tag / in the input xml file. the individual output xml files should go in sequence as per the input xml /from top to bottom of ...
0
votes
0
answers
67
views
Dynamically adding footer at the end of page XSLT
I am trying to add a footer at the end of each page in my XSLT file in this format:
"Page (current page number) of (max page number) - + <timestamp DD/MM/YYYY HH:MM:SS>"
Here is a ...
1
vote
1
answer
55
views
Remove nodes on missing child reference
I have (thanks to SO!!) already some XSLT to "filter and remove / xsl:copy" using clearly defined conditions, but now I'm facing a kind of "Wildcards / search everything on everywhere&...
0
votes
1
answer
64
views
XSL Transformation with Javascript
I looking for a good example how inject javascript inside of XSLT file and then will be transformed into html. My transformation works very well, but when I following every documentation about adding ...
0
votes
0
answers
24
views
SAXParseException contained in an export cannot be identified
We are having issue with an export failing and it's calling out the offending line and column but the problem is I cant identify in the XSLT Line number 19 and column 33 is just open space
The spill ...
0
votes
1
answer
57
views
Grouping by Nodes using XSLT - Bunching together all nodes that go with ID
I am still new to XSLT. My last question was trying to get similar IDs and Names grouped together. I got a great answer that did help me group by ID but now it's grabbing all the sibling nodes that ...
1
vote
2
answers
52
views
XSLT Transformation: usage of Position and current using XSLT 1.0
This is input XML:
<deliveryStatusRequest>
<Partner>
<partyRoleId>A47422</partyRoleId>
<Banner>
<partyRoleId>A47423</partyRoleId&...
0
votes
1
answer
56
views
XSLT Code to extract an element value on basis of a condition
I have below XML where I want to extract the p2 element value for p1 value is Orange using XSLT and then show that value in the variablePrint tag.
<rootyFruity xmlns:h="http://www.w3.org/TR/...
0
votes
1
answer
68
views
How do I use XSLT to create a loop with XML that includes CDATA?
I am trying to create a generic XSLT that will work with multiple types of queries. I found an XSLT format that seems to work for everything I need, except looping to the next user. Within the program ...
2
votes
1
answer
76
views
XSLT 1.0 Recursive template call in XML Transformation
The HandlingUnitItem (/HandlingUnit/HandlingUnitItem/HandlingUnit/HandlingUnitItem) in the XML path getting repeated in the XML output. I'm not able to figure out why it was getting repeated in the ...
0
votes
1
answer
51
views
XSL sorting nodes at different levels of one hierarchy
I have an XML in which I wish to sort different nodes based on different criteria. I wish to have the output as an XML as well. The issue I run into is when a node-set matching one of the sort is an ...
0
votes
1
answer
54
views
XSLT retrieve number of lines in texts
I'm completely new to XSLT and I've the following problem to solve, hoping in some suggestions and help.
With this xml as input
<?xml version="1.0" encoding="utf-8"?>
<...
0
votes
2
answers
42
views
remove SOAP envelope from xml
I have below input XML with SOAP envelope and need to remove soap envelope in output xml.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="...
0
votes
1
answer
69
views
change XML declaration to single quote
I have below incoming xml format and for this input XML I just need to add soap envelope.
Input xml
<?xml version="1.0" encoding="UTF-8"?>
<p:msg
xmlns:p="http://....
0
votes
1
answer
76
views
Filter against multiple strings for an element
I have data like this:
<?xml version="1.0" encoding="utf-8"?>
<TRANSFER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www....
0
votes
2
answers
61
views
XSL Indenting results
It has been awhile since I coded, and a friend has asked me for help. I can't seem to get my head around it. It's old code I'm trying to fix up.
Basically, I'm trying to make a table that indents for ...
0
votes
2
answers
66
views
Problem using a structure (for xPath translation) in XSLT 1.0
Our company has a system that regularly gets xml files from customer systems. We use xslt to transform the data from the customer structure to an xPath structure supported by our database. 95% of ...
0
votes
0
answers
40
views
How to I create a distinct list of child elements using XLS 1.0 [duplicate]
Belows is the sample XML I have to work with.
<item type="food">
<entities>
<entity type="fruit" abbreviatedText="BAN">banana</entity>
...
0
votes
2
answers
73
views
Why does my XSLT `xsl:attribute` disappear when placed after `xsl:text` in `xsl:element`?
I'm working on an XSLT transformation to create an HTML <button> element with an onclick attribute. When I define the onclick attribute before the button's text content, everything works as ...
0
votes
1
answer
48
views
XML and Stylesheet (v1.0): Issue returning multiple values from same record
I have a simple v1.0 stylesheet as below. It needs to be v1.0:
<xsl:stylesheet version = "1.0" xmlns="http://<redacted>" xmlns:xsl = "http://www.w3.org/1999/XSL/...
0
votes
1
answer
64
views
XSLT generating only output when no strings are matched
Here’s a snippet of my XSLT code:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
...
0
votes
1
answer
66
views
How to prevent end node name from being written when parsing xml with MSXML6
Apologies for the unclear title but I'm unsure of the correct terminology.
Allow me to clarify:
My starting XML
<osmChange>
<way id="304298875">
<nd ref="...
0
votes
1
answer
85
views
Why does this XSLT/XPath Concat returns a 'Nodetest expected here' error using MSXMLDom?
My XML (snip):
<way id="1237072661">
<nd ref="11488882051"/>
<nd ref="11488882048"/>
<tag k="railway" v="station&...
1
vote
1
answer
74
views
How to force XSLT doesn't close tags like <source/>
I'm using XSLT to make HTML out of XML, and in my code I have something like this:
<input/> but XSLT convert it to HTML like <input></input>, so W3 validator shows me errors like &...
1
vote
2
answers
130
views
XSLT replacing Json with plain text equivelent
Hey all I am newish at XSLT and have a XSLT output that contains some json within elements.
I've been looking around to see if there is anyway for XSLT to replace the json with just a string:
Ex:
<...
1
vote
1
answer
52
views
produce consecutive numbers based on node value in xslt1.0
In the below XML for first line ref=1 , sum of name elements equals to 5(2+3) and for second line ref=2, it is 3.
I need to produce 1,2,3,4,5 for first line and 1,2,3 for second line depending on the ...
0
votes
2
answers
64
views
Remove an element based on elements of sibling
I have data from water-pipes, in my example two valves ("Absperrorgan") and 4 text-labels. The first valve "101" has one label "xx", the valve "cd" has labels &...
0
votes
2
answers
67
views
Create a new, filtered XML and add comment
What I have:
I have an OLD.XML file
I create ("copy") a NEW.XML which is nearly the same, but some nodes are filtered out / not copied
What do I use:
An XSLT with a base-template "xsl:...
0
votes
1
answer
68
views
Efficient way to reorganize 2 sibling element list in XML into a nested structure
I have a requirement ,as below, in XSLT
A sample xml input replicating my actual scenario.
<Root>
<List1>
<list1Child>
<Id>1</Id>
<...
0
votes
1
answer
27
views
How to bring the value of a multi valued Sub tags with different parent tags under a common header tag in XSLT
I am trying to print the values in a loop for multiple occurences where one of the value's header tag is different from the other. The count of the child3 tag may be more than the child1 tag but the ...
0
votes
1
answer
70
views
How to iterate over unique records in XSLT 1.0?
I have an xml input like this :
<DepartmentData>
<Department>
<Employees>
<Employee>
<Id>123</Id>
<Name>John</Name>
...
0
votes
1
answer
66
views
get all xml attributes from a node using xlst 1.0 transformation
I have the following xml and i would like to only filter the attributes of node "A" using XLST version 1.0 transformation
<A a_1="a1" a_2="a2"/>
<B>
<C>...
1
vote
1
answer
87
views
Sum values in nested groupings in XSLT
I'm trying to do nested grouping in XSLT 1.0 and am facing some issues, below is my XML sample code.
<?xml version="1.0" encoding="iso-8859-1"?>
<INVOICE>
<GROUP ...
0
votes
2
answers
233
views
How to copy all the child elements using new namespace prefix using xslt 1.0
My goal is to achieve a output xml where initial first 2 nodes have namespace as below.
<tp:Revision>2.0.10</tp:Revision>
<tp:Header>
and from message and all of its child nodes have ...
0
votes
1
answer
112
views
How to remove default namespace xmlns using XSLT?
I have a XML file having default namespace xmlns="http://www.xxxx.com/xyz" and target namespace xmlns:tns="http://www.xxxx.com/xyz" , Both need to be removed
<?xml version="...
0
votes
2
answers
99
views
XML to CSV for child nodes
With below XSLT code able to convert from XML to CSV with enclosed quotes, but the child node (Details) is appearing in the same line.
Update: As mentioned in the forum I have updated the question ...
0
votes
0
answers
36
views
XSLT 1.0 to display combination of package numbers by SKU
I have a XSLT code where it displays the info in the form of table shown in the image where it display the packages information based on cartons numbers/package numbers individually
AS SHOWN IN IMAGE
...