From the course: XML Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Simple XSLT
- [Instructor] In this chapter, we're going to take what we've learned about XSLT, and put it through it's paces to see what it can do. So let's start by opening up the file simpletransform.xml in our XSLT chapter, and this file is pretty simple. It only has one XML tag in it, and it's pretty straight forward, there's some text in the tag. So let's also open up, simpletransform.xslt, and this is the style sheet that we're going to build that's going to match the JavacoTea tag in this XML file right here. So first, right at the top, is my xsl:stylesheet declaration. So this tells the style sheet parser that this in fact, an XSL style sheet, and next I have a template. The template uses an XPath expression to match this template with the content in the XML file. In this case, the match expression says, start at the root of the document, and then, look for a tag named JavacoTea, and again, you can see in the XML file, that's exactly what we have. When the match takes place, the contents…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.