XSLT
Transform XML into HTML or another XML shape with templates.
What you will be able to do
- Use xsl:template match to handle nodes.
- Use xsl:apply-templates to recurse.
- Use xsl:value-of to output values.
- Keep transforms small and tested.
In plain English
XSLT is a declarative transformation language. Templates match nodes and apply other templates. Use it for document conversion and feeds, and keep the transformation separate from application code.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<h1><xsl:value-of select="course/title" /></h1>
</xsl:template>
</xsl:stylesheet>Your turn
EasyMatch the root
Write an xsl:template that matches /.
HTML · starter
<xsl:template>Check your understanding before moving on.
Knowledge checkQuestion 1
Which element outputs a node value in XSLT?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.