1 / 19

Tutorial 04 ( cont ’)

Tutorial 04 ( cont ’). Using XPath Patterns in an XSLT Style Sheet. Contents. The Angel.Falls Bookstore Problem Solution. I. The Angel.Falls Bookstore Problem. The following XML file contains information about the Angel Falls bookstore including books.

helen
Download Presentation

Tutorial 04 ( cont ’)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 04 (cont’) Using XPath Patterns in an XSLT Style Sheet

  2. Contents • The Angel.Falls Bookstore Problem • Solution

  3. I. The Angel.Falls Bookstore Problem • The following XML file contains information about the Angel Falls bookstore including books

  4. Create a new XSLT document so that the XML file can be shown in a web browser display the all of books in the bookstore. • It also displays a summary table that shows: • Number of available books, • Number of book in English language • The most expensive book • The oldest book • And the total price for all books.

  5. II. Solution • Creating a new XSLT file • Inserting the title • Using for loop to retrieve data • Displaying products • Creating summary table • Testing

  6. 1. Creating a new XSLT file • Create a new XSL file and insert its template, save it as bookstore.xsl

  7. 2. Inserting the title • Format the title using html tag

  8. 3. Using for loop to retrieve data

  9. 4. Displaying products

  10. 5. Developing summary table 5.1 Creating summary table 5.2 Count available books 5.3 Count number of English books 5.4 Find the most expensive book 5.5 Find the oldest book

  11. 5.1 Creating summary table 5.1.1 Displaying the elements and attributes of orders 5.1.2 Calculating the order value

  12. 5.2 Count available books

  13. 5.3 Count number of English books

  14. 5.4 Find the most expensive book

  15. 5.5 Find the oldest book

  16. 5.6 Calculate the total price

  17. 6. Testing • Attach the XSLT file into XML file • Open the XML file with a web browser to check again.

  18. References • New Perspectives on Creating Web Pages with HTML and XML (Patrick Carey & Mary Kemper) - Course Technology Publisher • Creating Cool Web Sites with HTML, XHTML and CSS - Taylor, Dave, Wiley • http://w3schools.com/xpath/default.asp

More Related