XSLT is a transformation language for XML. Its primary function is to transform XML documents into different output formats, commonly other XML, HTML or plain text.

learn more… | top users | synonyms

-1
votes
0answers
15 views

Collect filenames from directory

Comments in text. Code: ...
3
votes
1answer
34 views

XSL template for converting XML to JSON

I used saxon v9 to profile an XSL transformation which converts XML to JSON. The profiler tells me that the function which escapes certain characters takes about 70% of the total processing time. The ...
1
vote
0answers
54 views

XSLT 2.0 that analyzes an HTML5 document

This xslt analyzes a HTML5 source document. (my instinct tells me a program already exists that performs similar function, and better than this, but I can't find it) ...
2
votes
2answers
175 views

Camel Case strings in XSLT

I have a situation where I am receiving data from a web service and the data is in all caps. I have to convert to HTML and format for display. In this case, we need the string to be normalized. The ...
3
votes
1answer
486 views

Validate XML using XSD, a Catalog Resolver, and JAXP DOM for XSLT

Background As this related question describes, there does not appear to be a canonical way to validate XML files against an XSD then subsequently transform them using an XSL template with file paths ...
1
vote
0answers
343 views

Capitalize words in XSLT 1.0

Since XSLT 1.0 doesn't have a lot of convenience functions, I have had to cobble them myself. The below capitalizes "words" in a string as defined by a string of delimiters. Is there any way to ...
2
votes
1answer
59 views

Slow calculation of trigonometric sine function

Background Creating a client-side pie chart in XSLT 1.0, without extensions or external dependencies (i.e., cannot use FXSLT, EXSLT, JavaScript, etc.). Problem The code is slow; at least fifteen ...
4
votes
1answer
128 views

XSLT 2.0: Crawl HTML and add links

Background: I have 4 GB of text data dispersed in 250,000 html files. I want to interlink the files with <a> for the reader to click on. I have a 12 MB file ...
2
votes
1answer
2k views

Conditional assignment in XSLT?

I've written some XSLT where I want to assign values to some variables. Depending on whether or not a condition is met, I want the variable to be populated with a computed value and I want it to have ...
11
votes
1answer
455 views

Cross-language constants

I'm developing a web application that leverages multiple programming languages. The data flow resembles: Browser » PHP » PL/SQL » XML » XSLT » XHTML + JavaScript » Browser Using different ...
3
votes
2answers
192 views

Appendix answer key template

Goal: Extract all Appendix Titles If Appendix Title is Answer Key call custom solutions template If Not Answer Key call default appendix template XML: ...
4
votes
2answers
416 views

Transforming XML as it is being generated on a scanner

At work I've recently been tasked with creating an XSLT to transform some XML as it is being generated on a scanner. The point being to disregard some pages that we are not interested in for further ...
1
vote
1answer
127 views

How can I optimize my XSL file?

I am trying to learn to format XSL more efficiently. I can tell by the definition of duplicate variables and nearly identical templates that I did not create this efficiently at all. How could I ...
1
vote
2answers
129 views

Using Choose and Apply Templates with Mode, vs Complexless Template Matches

So I have a little XML (Sub)language, it has 3 elements of interest: para, point, and code ...
5
votes
1answer
917 views

XML Schema for an XML representation of CSV

This is intended to be part of a generalised solution to the problem of converting any (with some minor restrictions) CSV content into XML. The restrictions on the CSV, and the purpose of the schema ...
4
votes
2answers
1k views

Making a flat file

Source XML (since I haven't bothered with a schema): ...
5
votes
1answer
773 views

Using XSLT to turn content of WYSIWYG stored in XML into HTML

The CMS I use uses the Xalan XSLT processor which is a XSLT version 1.0 processor. Editors who use WYSIWYG fields within the CMS can save content that will look like either: ...