Questions tagged [xslt]
22 questions
32
votes
9 answers
Are there any good reasons to use, learn, or recommend XSLT?
I am a developer for the last 8 years. We used XSLT primarily to transform XML into HTML. We also used it for XML to XML transformation.
But we have replacement for everything now. HTML can be comfortably created through programming languages such…

SaravananArumugam
- 501
- 1
- 4
- 11
24
votes
4 answers
Why is XSLT so rarely used on the web?
XSLT is a mature, widely accepted standard.
It can be used in browsers (even in old IE) and on the server side (nginx has an XSLT module, which can be used from programming languages, of course). Its implementations are compiled and, therefore,…

George Sovetov
- 383
- 2
- 9
17
votes
5 answers
XSLT equivalent for JSON
I was interested in finding (or if necessary developing) an XSLT equivalent for JSON.
As I have not found any, I was considering the possible query language to use for matching JSON paths so as to apply templates (from JavaScript) when there was a…

Brett Zamir
- 329
- 1
- 2
- 10
17
votes
5 answers
XSLT and possible alternatives
I had a look at XSLT for transforming one XML file into another one (HTML, etc.). Now while I see that there are benefits to XSLT (being a standardized and used tool) I am reluctant for a couple of reasons
XSLT processors seem to be quite huge /…

wirrbel
- 3,018
- 2
- 21
- 33
11
votes
3 answers
What is a good design pattern for generating an Excel (xlsx) file in code?
See my Update at the bottom for more.
I occasionally have projects where I have to output some data as an Excel file (xlsx format). The process is usually:
User clicks some buttons in my application
My code runs a DB query and processes the…

user2023861
- 770
- 4
- 10
9
votes
6 answers
Is Razor or XSLT better for my project?
I'm in the early stages in the design of a system that will essentially be split into two parts. One part is a service and the other is an interface with the service providing data through something like OData or XML. The application will be based…

Daniel Little
- 1,402
- 12
- 16
6
votes
1 answer
Mapping variable inputs to user interface elements
Background
Developing a system for creating eBooks. The data is highly normalized. The eBook designs are packaged as "themes." The themes can be configured with options for: fonts, colours, some layout, and thematic elements (such as squares for…

Dave Jarvis
- 743
- 6
- 28
6
votes
3 answers
Is there an effective way to test XSL transforms/BizTalk maps?
Creating repeatable tests for BizTalk maps is frustrating. I can't find a way to handle testing them like I'd do unit testing, because I can't find ways to break them into logical chunks. They tend to be one big monolithic unit, and any change has…

nlawalker
- 3,002
- 20
- 21
5
votes
1 answer
Are XML Schemas bad for constantly evolving file formats?
I'm struggling with a client-server project where I have Java apps out on the Internet that store data to a backend server. The format of this data is well-defined, but the project is constantly evolving, so the definition keeps changing! To cope…

vocaro
- 208
- 1
- 5
4
votes
1 answer
Alternative to XML / XSLT for artifact generation?
The scenario:
A system needs to produce a variety of artifacts to present to end-users during the normal course of business. Examples of these artifacts would be permits, invoices, or receipts -- imagine any online app that gives you one of those…

D. Lambert
- 161
- 4
4
votes
3 answers
Why do XSLT editors insert tab or space characters into XSLT to format it?
All XSLT editors I've tried till now add tab or space characters to the XSLT to indent it for formatting. This is done even in places within the XSLT where these characters are significant to the XSLT processor.
XSLT modified for formatting in this…

pgfearo
- 944
- 4
- 11
- 19
3
votes
1 answer
Transforming XML to JSON in C++
Working with XML in C++ seems a bit of a pain and I'm looking at a way to output JSON.
I've stumbled on two different approaches:
A) XSLT transformations:
http://controlfreak.net/xml-to-json-in-xslt-a-toolkit/
B) Dedicated library such as…

Jimmy
- 109
- 1
- 10
2
votes
0 answers
Is a long XSLT file a code smell?
Is a long XSLT file a code smell?
In imperative programming languages it's generally acknowledged that very large classes and/or sub-routines are an indication of possible problems, e.g. a class that is doing too much. Such a class should be…

redcalx
- 345
- 3
- 14
2
votes
2 answers
Code execution time out occasionally
I am working on an e-commerce website. There is a case where I need to fetch the whole data in database through a third-party API and send it to an indexing engine. This third-party API has many functions like getproducts, getproductprice, etc., and…

None
- 121
- 3
2
votes
2 answers
Using XSLT for messaging instead of marshalling/unmarshalling Java message objects
So far I have been using either handmade or generated (e.g. JAXB) Java objects as 'carriers' for messages in message processing software such as protocol converters. This often leads to tedious programming, such as copying/converting data from one…
user57328