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

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