Web TechnologyTU Board 2022
Given an XML document that contains a list of products with the following elements: productname, category, price, and quantity, write an XSLT stylesheet that: a) Filters out any products that have a…
10Given an XML document that contains a list of products with the following elements: productname, category, price, and quantity, write an XSLT stylesheet that: a) Filters out any products that have a quantity less than 10. b) Groups the remaining products by category and creates a new XML document with a new element called "category" that contains the products within that category as child elements. c) Within each category element, sort the products by price in descending order. d) Transforms the element "productname" into an attribute of each product element. e) Add a new element called "total-price" to each product element, which contains the total price of the product (price × quantity).
Discussion
Loading…