Buzzword Buster – Stylesheets, XSL and XSLT

You can become a serverless blackbelt. Enrol to my 4-week online workshop Production-Ready Serverless and gain hands-on experience building something from scratch using serverless technologies. At the end of the workshop, you should have a broader view of the challenges you will face as your serverless architecture matures and expands. You should also have a firm grasp on when serverless is a good fit for your system as well as common pitfalls you need to avoid. Sign up now and get 15% discount with the code yanprs15!

Stylesheet

A Stylesheet language or style language, is a computer language used to describe the presentation of structured documents. A structured document which doesn’t break the schema it is designed to conform to is “well-formed”.

One modern Stylesheet language with widespread use is Cascading Style Sheets (CSS), which is used to style documents written in HTML, XHTML, SVG, XUL, and other markup languages. One of the most attractive features of structured documents is that the content can be reused in many contexts and presented in various ways. Different Stylesheets can be attached to the logical structure to produce different presentations.

In order for content in structured documents to be presented, a set of stylistic rules – e.g. colours, fonts, layout – must be applied. A collection of stylistic rules is called a Stylesheet.

XSL

XSL stands for EXtensible Stylesheet Language.

CSS = Stylesheets for HTML – HTML uses predefined, well understood tags, you can use CSS to tell a browser to display an element in a special font or colour, etc.

XSL = Stylesheets for XML – XML does not use predefined tags and therefore the meaning of each tag is not well understood. XSL describes how the XML document should be displayed!

XSL consists of 3 parts:

  • XSLT – a language for transforming XML documents
  • XPath – a language for navigating in XML documents
  • XSL-FO – a language for formatting XML documents

XSLT

XSLT stands for XSL Transformations, it is a declarative, XML-based language used for the transformation of XML documents into other XML documents.

The original document is unchanged, after the transformation the new document maybe serialised by the processor in standard XML syntax or in another format such as HTML or plain text.

With XSLT you can add/remove elements and attributes to or from the output file. You can also rearrange and sort elements, perform tests and make decisions about which elements to hide and display, and a lot more.

A common way to describe the transformation process is to say that XSLT transforms an XML source-tree into an XML result-tree.

XSLT uses Xpath to find information in an XML document. Xpath is used to navigate through elements and attributes in XML documents.

In the transformation process, XSLT uses Xpath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT transform the matching part of the source document into the result document.

Further reading:

W3C schools XSLT Tutorial

Liked this article? Support me on Patreon and get direct help from me via a private Slack channel or 1-2-1 mentoring.
Subscribe to my newsletter


Hi, I’m Yan. I’m an AWS Serverless Hero and I help companies go faster for less by adopting serverless technologies successfully.

Are you struggling with serverless or need guidance on best practices? Do you want someone to review your architecture and help you avoid costly mistakes down the line? Whatever the case, I’m here to help.

Hire me.


Skill up your serverless game with this hands-on workshop.

My 4-week Production-Ready Serverless online workshop is back!

This course takes you through building a production-ready serverless web application from testing, deployment, security, all the way through to observability. The motivation for this course is to give you hands-on experience building something with serverless technologies while giving you a broader view of the challenges you will face as the architecture matures and expands.

We will start at the basics and give you a firm introduction to Lambda and all the relevant concepts and service features (including the latest announcements in 2020). And then gradually ramping up and cover a wide array of topics such as API security, testing strategies, CI/CD, secret management, and operational best practices for monitoring and troubleshooting.

If you enrol now you can also get 15% OFF with the promo code “yanprs15”.

Enrol now and SAVE 15%.


Check out my new podcast Real-World Serverless where I talk with engineers who are building amazing things with serverless technologies and discuss the real-world use cases and challenges they face. If you’re interested in what people are actually doing with serverless and what it’s really like to be working with serverless day-to-day, then this is the podcast for you.


Check out my new course, Learn you some Lambda best practice for great good! In this course, you will learn best practices for working with AWS Lambda in terms of performance, cost, security, scalability, resilience and observability. We will also cover latest features from re:Invent 2019 such as Provisioned Concurrency and Lambda Destinations. Enrol now and start learning!


Check out my video course, Complete Guide to AWS Step Functions. In this course, we’ll cover everything you need to know to use AWS Step Functions service effectively. There is something for everyone from beginners to more advanced users looking for design patterns and best practices. Enrol now and start learning!