23 posts tagged “xslt”
2025
Today I learned - via a proposal to remove mentions of XSLT from the HTML spec - that congress.gov
uses XSLT to serve XML bills as XHTML - here's H. R. 3617 117th CONGRESS 1st Session for example.
View source on that page and it starts like this:
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="billres.xsl"?> <!DOCTYPE bill PUBLIC "-//US Congress//DTDs/bill.dtd//EN" "bill.dtd"> <bill bill-stage="Introduced-in-House" dms-id="H5BD50AB7712141319B352D46135AAC2B" public-private="public" key="H" bill-type="olc"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> <dublinCore> <dc:title>117 HR 3617 IH: Marijuana Opportunity Reinvestment and Expungement Act of 2021</dc:title> <dc:publisher>U.S. House of Representatives</dc:publisher> <dc:date>2021-05-28</dc:date> <dc:format>text/xml</dc:format> <dc:language>EN</dc:language> <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights> </dublinCore> </metadata> <form> <distribution-code display="yes">I</distribution-code> <congress display="yes">117th CONGRESS</congress><session display="yes">1st Session</session> <legis-num display="yes">H. R. 3617</legis-num> <current-chamber>IN THE HOUSE OF REPRESENTATIVES</current-chamber>
Digging into those XSLT stylesheets leads to billres-details.xsl
- gist copy here - which starts with a huge changelog comment with notes dating all the way back to 2004!
2024
Matt Webb’s Colophon. I love a good colophon (here's mine, I should really expand it). Matt Webb has been publishing his thoughts online for 24 years, so his colophon is a delightful accumulation of ideas and principles.
So following the principles of web longevity, what matters is the data, i.e. the posts, and simplicity. I want to minimise maintenance, not panic if a post gets popular, and be able to add new features without thinking too hard. [...]
I don’t deliberately choose boring technology but I think a lot about longevity on the web (that’s me writing about it in 2017) and boring technology is a consequence.
I'm tempted to adopt Matt's XSL template that he uses to style his RSS feed for my own sites.
2006
XSL Flickr. An XSL interface to the Flickr API. It even does auth!
[xsl] Replace newline characters(\n) with <br>. This is why I’m not a fan of XSLT for templating.
Microsummaries in Firefox 2. Neat new feature: short summaries of pages extracted using XSLT.
2005
X2V. XSLT to change hCalendar and hCard in to iCalendar and vCard.
Safari 1.3 is out (via Software Update). New features include contenteditable support, XSLT and a major performance improvements.
Google Maps and XSL
I’ll probably write more on this later, but it seems that Google Maps is using XSL. I spotted it loading the following pages while sniffing its activity with LiveHTTPHeaders:
[... 174 words]2004
XML.com: Automated Tree Drawing: XSLT and SVG. Includes a recursive text parser in XSLT. May cause your brain to melt.
IE Objectifier (via) mod_action + XSLT + PHP = neat hack.
Introducing dbagg3, an Atom-powered client/server aggregator. Way smart aggregator built on top of Atom and XSLT.
Amazon’s Web Services and XSLT. The Amazonn REST API lets you feed in the URL of an XSLT document.
XHTML FAQ: please remove application/xml XSLT hack (via) Bjoern Hoehrmann blows it out of the water.
Mark Pilgrim’s Atom feed (via) Atom + XSL + CSS = a self explanatory feed that functions in a browser.
A Transforming Experience for Content Management? (via) Good overview of XSLT 2.0.
2003
Using XPath to mine XHTML
This morning, I finally decided to install libxml2 and see what all the fuss was about, in particular with respect to XPath. What followed is best described as an enlightening experience.
[... 576 words]Moveably Type with XSLT
Kevin Davis has set up an impressive demonstration of the power of Moveable Type templates when combined with browser-side XSLT transformations. He’s set up MT to output an XML document containing just his entries (similar to an RSS feed), along with a link to an XSLT stylesheet that causes Mozilla and IE 6 to transform the entry and render it as XHTML.
Clearout
- Tristan Louis’ RSS to Necho convertor puts paid to the idea that the success of one format will be detrimental to the usefulness of the other.
- O’Reilly’s RegExp Power series (part one and part two) demonstrate some powerful tricks for use with Perl compatible regular expressions.
- Norman Walsh explains Content Negotiation and some of the pitfalls with modern browser implementations.
- So that’s what happened to Digitiser. See also a Digitiser Tribute and a Mr Biffo interview from 2001 for background information. I cuss you bad.
- George Orwell: Politics and the English Language
- Clay Shirky: A Group Is Its Own Worst Enemy. The title is misguiding; this is an essay about how online groups behave and how to look after them.
- A Java HttpClient Class.
- Some good stuff on Boxes and Arrows: Ten Quotable Moments: Challenges and Responses for UI Designers and Views and Forms: Principles of Task Flow for Web Applications (Part 1).
- Inside our notions of “document” and Inside our documents II—the Runoff model.
- 5 days worth of XSLT observations from Simon St. Laurent: One, Two, Three, Four, Five.
- Windows programming with open source tools: Minimalist GNU For Windows and Win32 Programming with GNU C and C++.
XHTML is still great for content
In response to Mark Pilgrim’s Poisoning the envelope, Brian Donovan has expanded upon his opinion that long term web facing content should not be stored as (X)HTML:
[... 317 words]2002
Excellent introduction to XSLT
Rescuing XSLT from Niche Status is A Gentle Introduction to XSLT through HTML Templates
. It is something of a hybrid article, consisting of a discussion of the problems involved with both teaching and learning XSLT followed by an excellent (if somewhat brief) tutorial covering the most important XSLT tags and concepts and how they can be used to convert a simple XML document in to XHTML.
Generating HTML with XQuery
Generating XML and HTML using XQuery (via More Like This). I had been confusing XQuery with XPath—it turns out XQuery is a fully featured scripting language which can be used to do all kinds of things with data from XML documents. The article explains how XQuery can be used to build a web photo gallery application and compares XSLT and XQuery using a Docbook transformation example.
50 XSLT tips
50 XSLT Tips. I particularly like Tip 13, whish shows how you can use a recursive template call to print things out multiple times (for example, 5 asterisks for something with a 5 star rating).
Installing PHP and XSL on Windows
I’m currently reinstalling PHP on my Windows machine, and in doing so I came across this tutorial: Installing XSL and PHP on Windows. The tutorial provides all the necessary files and instructions to get XSL working with minimum hassle. I’ve been meaning to play with XSL for some time, and this has provided me with just the boost I needed to give it a go.