From the course: XML Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Solution: BusinessCard XSLT
From the course: XML Essential Training
Solution: BusinessCard XSLT
(upbeat ambient music) - All right, how did you do? Were you able to get the list of business cards into the HTML page as a sorted table with the count? Let's review my code. So remember, we needed to count the number of business cards and put that into the title of the page. So let's open my code, and this is my finished XSLT style sheet. So to do the counting, we needed to use the count function, and this is one of the hints I gave you, along with the value of tag to put the number of business card elements into the page. So you can see here that inside my H1, I'm using the value of tag, and I'm selecting the count of business card tags, right? So you can see I'm matching against the root business cards, right? This is the root of the file, the root of the XML data, and I'm counting all the business cards, and that's how I got the count of how many business cards that there are. Then we needed to extract certain pieces of data from the XML and build an HTML table, and the top part…
Contents
-
-
-
-
-
-
-
-
-
(Locked)
What is XSLT?4m 10s
-
(Locked)
Defining XSLT style sheets3m 35s
-
(Locked)
Simple XSLT4m 6s
-
(Locked)
Repeating items5m 13s
-
(Locked)
Conditional logic6m 47s
-
(Locked)
Sorting data2m 24s
-
(Locked)
XSLT in the browser6m 26s
-
(Locked)
Challenge: BusinessCard XSLT2m 44s
-
(Locked)
Solution: BusinessCard XSLT1m 57s
-
(Locked)
-
-
-