- One of the more powerful capabilities of XSLT…is the ability to apply style sheet templates…based upon the values of the incoming XML data.…And that's what we're going to look at in this example.…So let's open up conditional_logic.xml…and also open conditional_logic.xslt…So this is the same XML file that…we've been using previous example.…So there's an items root tag and it has…a collection of item tags underneath it.…
And the contents of the XSLT style sheet…should start to look familiar by now.…So this is the xsl:for-each tag…I introduced in the previous exercise.…And there's a select statement here…which is using an xpath expression…to match all the item tags in the document.…So what we're going to do is apply…some conditional logic to the data.…So the appearance of each item in the output…will look slightly different based upon…the data in the source.…So I'll add some code for that.…What I'm going to do is use the xsl:if tag to do this.…
And that comes along with a test attribute.…And I'm going to test the available attribute.…
- What is XML?
- Advantages and drawbacks of XML
- Proper XML syntax
- Working with XML namespaces
- Styling XML tags
- Discovering and creating document content
- Manipulating XML content using XPath and XSLT
- Document type definitions and XML schema
Skill Level Beginner
1. Getting Started
2. XML Overview
3. Working with XML
4. Manipulating XML with the DOM
5. XML and XPath
6. XML and XSLT
7. XSLT Examples
8. Document Type Definitions
9. XML Schema
Next steps1m 4s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.