Click here to Skip to main content
15,888,984 members
Everything / Programming Languages / XSLT

XSLT

XSLT

Great Reads

by Alex Pumpet
A simple program for comparing table data from two sources - SQL databases, Excel, CSV or XML-files
by Marco Merola
Creating PDF documents from XML
by Dan Radu
The DACBuilder application provides auto-generation features from multiple database systems in multiple programming languages.
by Gavin Sinai
Using the open source Saxon library, .NET programmers can benefit from XSL 2.0 and XQuery 1.0.

Latest Articles

by Patrice T
My learnings and the problems that I encountered while making my very first Stylesheet for ToDoList
by HenkAlles
Show Simple Log - see the article by Jochen Scharr - in the browser with a nice layout
by Chris Stefano
A custom tool for Visual Studio .NET which runs an XSL transformation to generate code
by thatraja
Using XSLT version 1.0 to group XML using Multiple Columns

All Articles

Sort by Updated

XSLT 

10 Dec 2023 by Bassam Abdul-Baki
That's a different homework problem. You'll have to rewrite it to parse by the same values.
9 Dec 2023 by Bassam Abdul-Baki
Can't use xsl:sort as is. See https://stackoverflow.com/questions/42806139/using-preceding-sibling-with-with-xslsort[^]. Your best bet is to sort it to another XML node-set and then parse it. The following works somewhat. This adds an extra |...
9 Dec 2023 by diadtp
I have the following xml - Token1 1,2 Token2 4,5 Token1 7,8 And...
26 Jul 2023 by Larry Chapman II
The following XML document is stored in an object called "x": Tove Jani Reminder Don't forget me this weekend What will each of the following...
26 Jul 2023 by Richard MacCutchan
The document.write statement is part of the HTML DOM, and nothing to do with XML. XML is merely a useful way of formatting data for transmission between computing systems or applications. So it seems that you are mixing two different systems...
26 Jul 2023 by Larry Chapman II
Okay so, as far as I've come along this is essentially what I'm trying to do here: something else should be showing var parser, xmlDoc; var text =...
25 Jul 2023 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
22 Jul 2023 by Andre Oosthuizen
I have added a small template in your code that should convert the DateTimes based on the tutorial at - Formatting Dates and Times[^] -
22 Jul 2023 by stijn de Decker
Hi, Can some help me, I need to convert datetime to epoch, i use this script but on the new server i am not allowed to use document('') function. So how get it back to work, can someone covert it for me. This is the code i use:
22 Jul 2023 by Graeme_Grant
Where? How? Where is the code? What is the exact error that you are seeing and which line of code? Help us help you. We can't see your screen. You need to use the green "Improve question" and post your code with you data. You need to tag your...
9 Feb 2023 by Raj.rcr
Dear All, I am using #003134 Hex color code in XSLT as below And I am calling it as below: ...
9 Feb 2023 by Richard Deeming
The XML format you're using comes from Excel 2003, which was limited to a palette of 56 colours. Any colours not in the palette will be mapped to the nearest match. You can see the palette here: Color Palette and the 56 Excel ColorIndex...
31 Aug 2022 by Sam226
Hi.. I have a request where I have to concat two string(Eg: posting date and posting time) and required Output format is dateTime with millisecond(Eg:2022-06-17T16:16:26.503).Kindly help What I have tried: ...
31 Aug 2022 by Richard MacCutchan
See XSLT Format Date | How to Format Date in XSLT with Examples?[^]
13 Jun 2022 by .Net Perfect Dev
​ Hello, i want to validate by xsd an attribute can contain a float type or a word "exist". after search in the net i found this solution(https://www.w3schools.com/xml/schema_facets.asp)� but it does not worked. how to fix that ? ​ What I have...
13 Jun 2022 by .Net Perfect Dev
ok this is an exemple : xml file: and this is the xsd file which i tried:
13 Jun 2022 by ludosoep
It is a little odd that a double type can hold the value "exist". The example you've sent actually describes pattern matching on a string type. So it is either changing the type to string or define a double value that is considered equal to...
29 Mar 2022 by Member 15502485
I want to split each into parts after grouping values of CC and Att found in I am able to achieve it to some extent , but not in a consistent way. With some data is...
29 Mar 2022 by Maciej Los
Well, you can use Linq. See: void Main() { XDocument xdoc = GetXmlData(); var result = xdoc.Descendants("rf") .GroupBy(x => new {CC = x.Value.Equals("CC"), Att = x.Value.Equals("Att")}) .ToList(); result.Dump(); } // Define other methods...
5 Jul 2021 by Member 9346617
I am using xslt to convert xml into csv file. I want to add new line (CRLF) in csv file for data seperation. What I have tried: I am using in xslt to create new line in csv. It is actually creating new line as...
5 Jul 2021 by Maciej Los
Take a look here: How to implement Carriage return in XSLT - Stack Overflow[^]
17 Apr 2021 by Pankaj Patel yosa
How can i write multiple values in the same line and value should be write between specific position. XML File:
3 Apr 2021 by Patrice T
My learnings and the problems that I encountered while making my very first Stylesheet for ToDoList
21 Feb 2021 by HenkAlles
Show Simple Log - see the article by Jochen Scharr - in the browser with a nice layout
13 Feb 2021 by Chris Stefano
A custom tool for Visual Studio .NET which runs an XSL transformation to generate code
28 Dec 2020 by GeetYG
Hi, Here is my below input request, Since my input request and XSLT is lengthy I made it short here. I will be getting nearly 10 ProdustID's, I have to fetch all of them and I want to write it without using "template match" since I cannot use...
16 Nov 2020 by GeetYG
Hi, Hope I get a solution here. I have imported "Codelist.xsl" file in my another xslt and trying to call the template based upon the codes. In the imported file it contains list of code values. the input contains the codes. I'm not able to...
15 Nov 2020 by Richard Deeming
The URI you've specified for your import is not valid. Assuming the files are in the same folder, remove the local:/// prefix.
31 Jul 2020 by thatraja
Using XSLT version 1.0 to group XML using Multiple Columns
27 May 2020 by vulisiramu
Hi, How to convert date format in xslt. I have created application as shown belowI used xml :-------------- 338 SureshVL RonVL ...
4 Mar 2020 by smksamy
Hi Friends, I have the task to convert the XML files to word document, I have the XML with various dtd, Each DTD have individual Stylesheet, the requirement was XML files must convert with a relevant stylesheet, I tried below code. What I have tried: @ECHO * * * FOR %%i IN...
11 Feb 2020 by patilvaibhavrao
body { font-family:"Arial"; } th ...
28 Jan 2020 by Debasis samal
I have an xml which contains an Array for which i am writing xslt . here is the sample xml . 2 10...
26 Oct 2019 by Dave the Golfer
I am trying to sort the data in an xml file before creating reports of the data. My xml file is like Joe Soap Man...
26 Oct 2019 by RickZeeland
See answers here: c# - DTD prohibited in xml document exception - Stack Overflow[^] And here some more blahblah about using DTD's: https://support.microsoft.com/es-pa/help/315533/how-to-validate-an-xml-document-by-using-dtd-xdr-or-xsd-in-visual-basi[^]
12 Sep 2019 by Sean Ewington
Web development beginner tutorials. A compilation of web development tutorials that serve as a beginner's walk to web development
9 Aug 2019 by Richard Deeming
Try: True EDIT: Based on your updated question and comment, I'm guessing that you want the following: If CompDate[@Op] is either "E" or "A", then the statement is true if and only if TimestampChange has no Op attribute,...
8 Aug 2019 by Member 11403304
How do I check TimeStampChange node is the only node with Op code AND in CaseEvent there are no Op codes on any other child nodes? i.e. CaseEvent\TimeStampChange Op="E" and there are no Op codes on any other child elements. If statement will be True when TimeStampChange is the only node in...
6 Aug 2019 by Richard MacCutchan
You already posted this question at https://www.codeproject.com/Questions/5163990/How-do-I-add-conditions-to-XSLT[^]. Please do not repost.
5 Apr 2019 by Matias Lopez
Displaying XML Files with CSS/XSLT
6 Jan 2019 by Member 10242311
Hi Friends, I have one task, to create live XML editor with preview. i need to upload & update the xml document in tool, I have already developed the XSLT for XML to HTML transformation. shall i combine this both in same tool. which technology is better to done this job, What I have tried:...
6 Jan 2019 by Dirk Bahle
There is no straight answer, it depends on your skills and what you want to archive. Here is an XmlNotePad using Windows Forms and here is an Xml viewer using WPF XmlExplorer. So, the answer is as usual: It depends :-) ...
5 Jan 2019 by RickZeeland
Maybe you can use xmlwebpad it can be found here: CodePlex Archive[^]
18 Oct 2018 by Gavin Sinai
Using the open source Saxon library, .NET programmers can benefit from XSL 2.0 and XQuery 1.0.
13 Aug 2018 by MKM_Matt
Just tried this and it is working...
13 Aug 2018 by MKM_Matt
No doubt a quick one for you experts, but for me it has been a fruitless afternoon. I have XML that I have been asked to interrogate a bit further (cut down version below...) What I want to do is output the various parts and represent in html. All I need to add is the env:destination/@branch. ...
7 Aug 2018 by Member 11403304
I have the StatuteCode node below, I would like to check if the first 3 characters are not equal to 169. Running How do I do it using xslt choose? What I have tried. I think this is wrong. What I have tried:
7 Aug 2018 by Richard Deeming
Try: starts-with - XPath | MDN[^]
4 Jul 2018 by Krishna P Seetharaman
Issues faced and learnings found during the generation of pipe delimited flat file generation
11 Jun 2018 by JUST_Neeraj
JSON to JSON transformation - XSLT equivalent for JSON
31 May 2018 by robinsonpaul
Hi Guys, Normally we can pass the XML path as param for XSLT and we can render an HTML as out put .In this case Template are designed in a way that its calling with param key of that XML. My requirement is to pass the XML itself as param instead of path .Is it Possible? Please see the code...
10 May 2018 by Member 10242311
Hi Friends, I have the task to show the popover when click the content. i need to show the existing html content in Popover. sampe ref 1 sampe data sampe ref
27 Apr 2018 by IslandFreedom
I am calling an xslt.Transform from C# to convert an XML file from an old format to a newer format. Is there any way to report on fields that are not in the new format that were in the old? I was hoping to create an error report to alert the user on fields that they would need to manually...
21 Apr 2018 by NitinShrivastava
In this article, we will try to understand Data Binding in AngularJS
24 Mar 2018 by Member 13744416
I was looking for the other way around and didn't find a solution yet. But in your case you could use the mendeley reference management software. Not only can it read CSL-files but also you have a quite easy to use powerful reference manager. With the word pluging installed you can add...
22 Mar 2018 by sng0006
I have Microsoft Office Word 2013 as well as have a CSL citation style that has my preferred citation style for academic papers. I want to add my preferred style to word reference styles, but office 2013 supports XSL style sheets. My preferred style is not available in xsl format. how to convert...
20 Mar 2018 by Alex Pumpet
A simple program for comparing table data from two sources - SQL databases, Excel, CSV or XML-files
7 Feb 2018 by Member 13666870
Hi there.. I am trying to create a xslt document via XML. In my XML I have the below text
1 Nov 2017 by Saurav J
Convert table from outlook email body into datatable or list using .NET C# EWS Managed API and HtmlAgilitypack
13 Oct 2017 by Member 13463091
In my xsl there are already templates defined for elements like para, graphic etc. Example below: But I want to add an extra node at the innermost level in case of a...
13 Oct 2017 by phil.o
Maybe XSLT Element[^] could be of any help? Kindly.
3 Aug 2017 by Member 13344557
Have you figured out a solution to this? I need to do exactly this as I am getting the XML file as-is from another vendor. The problem is where we send it to they pull out the middle section of the XML (where I need to add these namespaces to this "new" root node). Don't ask me why they can't...
2 Aug 2017 by Nikita D. Sinelnikov
Creating a pretty-view XML for web applications (or other needs)
24 Jul 2017 by Member 13324229
How i select on xml node when xml have namespace. Here simple xml without namespace. Test 42 ...
24 Jul 2017 by Member 13324229
I have solution. The tip of I have solution[^] was good. You must on every node add prefix. Like in this:
4 Jul 2017 by tranthanhtu.vn
This tip explains how we should structure our project folder
15 Jun 2017 by tranthanhtu.vn
In this article, we will why and why not using DI & IoC from my real situation.I did not tell you that DI is not good. From my view, each tech has it own pros and cons. So It is better if we know when we can use which techs for our business.
28 May 2017 by tranthanhtu.vn
In this article, we will see how to use multi-languages(i18n) in angular2
28 May 2017 by tranthanhtu.vn
In this article, We will have a look to unserstand how RESTful/WebApi was applied in my code
19 May 2017 by Dave Kreskowiak
You don't. XSD 1.1 isn't supported. In order to use it you need either a 3rd party library, none of which are cheap or free, or write your own support for it, which isn't trivial.
19 May 2017 by Balram Awasthi
How to validate xsd 1.1 in Visual Studio 2010 Error : The...
8 May 2017 by swayamrath
I have a source XML and that looks like 2017-05-05T08:52:51Z 10.132.195.26 ...
8 May 2017 by Patrice T
try to replace with
8 May 2017 by Richard Deeming
The select query passed to apply-templates and for-each is relative to the current node. You are already in HOST_LIST_VM_DETECTION_OUTPUT/RESPONSE/HOST_LIST/HOST, so your apply-templates query is looking for: ...
27 Apr 2017 by Member 13157812
I need to group the data based on element and populate it. below mentioned is input xml and if you see there are 4 rows for P and then Head element starts that's where i need to group with following P's. I need to convert this- ...
7 Apr 2017 by Member 13113934
I have XML which is huge with more than 50,000 tags. I need to group them by and then by but limit number of to 3000 under each . Also need to ensure, if has more than 3000, they should come under...
20 Mar 2017 by Member 11403304
My first xml doc has ProtectionOrder that is not deleted. The output displayed by my xslt is correct.The second xml doc has ProtectionOrder that have been deleted. The output displayed by my xslt is not working.How do I make my xslt work for each of the two xml documents?Expected...
20 Mar 2017 by Member 11403304
I showed what output should look like when a ProtectionOrder is deleted in the xml input document and also when the ProtectionOrder is not deleted in the xml input document.My xslt code is working for ProtectionOrder that has not been deleted.For the ProtectionOrder that is deleted, is it...
14 Mar 2017 by python_here
My xml is: 02 02 03 04 05 06 06 08 09 10My current Output: Splits the xml...
16 Nov 2016 by Lars Hove Christiansen
XML Visualizer v.2 improves the standard XML Visualizer in Visual Studio 2005, 2008, 2010, 2012, 2013 and 2015.
21 Oct 2016 by O.Nasri
A good demo to know how you can implement an XSD & XSLT processor using C#
9 Aug 2016 by Vicky Siddharth
I am trying to Transform the XSLT,XSL file into .xsl . So i tried below codingBelow Coding is working fine. But when i open the created Excel sheet it is opening in XML SPREAD SHEET 2003. But it should be open in Excel 97-2003 Workbook. How can i achieve ?What I have tried:string...
9 Aug 2016 by Patrice T
you can't open an .xlsx (excel xml file) in excel 2003 because the .xlsx format was introduced with Excel 2007.You need to install a MS extension to excel that allow excel 2003 to read .xlsx (Excel 2007) format.
9 Aug 2016 by Kornfeld Eliyahu Peter
How to: Access Office Interop Objects by Using Visual C# Features (C# Programming Guide)[^]Microsoft.Office.Interop.Excel namespace ()[^]How to: Use COM Interop to Create an Excel Spreadsheet (C#)[^]https://support.microsoft.com/en-us/kb/302084[^]
7 Aug 2016 by Rahul S Chavhan
Validate an XML document in SQL Server using XSD by Rahul Chavhan
6 Aug 2016 by Petrov Vladimir
The alternative way of the MFC Project from Existing Code creation
4 Aug 2016 by Syed Zain Zaidi
I'm working on travelport api for flight search. I have sent the lowfaresearchreq request and received the response. now i have to select one of the search results to send to AirPriceReq requestWhat I have tried:I'm trying to add a button with each node so that i can select particular...
4 Aug 2016 by prateekfgiet
i guess you are getting response either in xml/json format, you need to Deserialize that response into object it will come into the collection form like listofFilght.you create request object before sending request from "listofFilght" collection and get flight detail by .ElementAt()
20 Jul 2016 by Member 12645050
I have an xslt that transforms any xml but places it all in one line. I am trying to create a DTD at the top of the file however I keep getting a message from the xslt processor in regards to the first line."The markup in the document preceding the root element must be well-formed."Below...
17 Jul 2016 by Member 12472874
A library I am developing is supposed to create reports in PDF format with XSL transformation. A colleague recommended FO.NET[^]. However, FO.NET lacks several important features:1. If a string is tool long for a table column or the page, there is no line break. All variants of keep-together...
4 Jul 2016 by Vicky Siddharth
i am exporting excel by transform xml,xslt into xls. Below is my coding :ds.WriteXml(MyXmlPath); XPathDocument xmlDoc = new XPathDocument(MyXmlPath); XslCompiledTransform XSLTransform = new XslCompiledTransform(); XSLTransform.Load(AppBasePath + @"\Master\XSLT\" +...
30 Jun 2016 by senthill
This article describes how to customize master page, how to customize home page and it will give you tips to improve the look and feel of the SharePoint site.
20 Jun 2016 by NJ44
I am new to xslt coding and need your help. I am designing an email template using xslt and I have created a button using styling. This button is displayed only when the receiver is Microsoft outlook(mso). Following is the code. Please pay attention to the href attribute inside v:roundrect...
27 May 2016 by George Jonsson
There are a few errors in both your XML file and the style sheet.1. In the XMLshould bestylesheet misspelled2. In the XSLTXML is case sensitive, so the...
27 May 2016 by Member 12546783
Is there something wrong with my XML? It wont use any of the stylesheet's I try to apply to it. This is what my xml looks like. Item Code ...
27 May 2016 by Member 10518986
I have follow below procedure to use xslt version 2.0 file in visual studio 2010 but unable to get result. Please any help I have other xsl editor but required to use visual studio 2010Backup your existing fileLocation: C:\Program Files\Microsoft Visual Studio...
27 May 2016 by jleelim@hotmail.com
XSLT 2.0 is not supported in .NET framework. Instead, Microsoft is now considering supporting XSLT 3.0 in .NET framework. The work item is currently under review and will largely base on how many people feel it’s important. Please vote link below if you want a true implementation.Implement...
25 May 2016 by Member 12546615
Hi, I am trying to send data to a server using POST protocol with XMLHttpRequest, but the xhr object isn't hitting '3'. I know this is because of a code error because I keep getting a 500 error, but I don't know how to change the code to use POST protocol. I'm following an example, but it's not...
27 Apr 2016 by frostazaza
I have several attributes which contain numbers. But one of them or several (or even every) may not be defined (i.e. no such attr in xml-file). I need to display sum of attrs, so when at least one of them is undefined I get NaN.So how can I avoid getting NaN? I mean I need to interpret NaN...
27 Apr 2016 by George Jonsson
I know this question already has an accepted answer, but it always makes me cringe when I see hard coded solutions like this.Better to to try to sum up all existing attributes, than to use their specific names.What if you want to add attr4 and attr5 later?Then you have to change your...