JSP™ and XML Integrating XML and Web Services in Your JSP™ Application
by Casey Kochmer, Erica Frandsen
The Sorting Table Stylesheet
Now that we have walked through the process of converting a ResultSet to a JDOM representation, it's time to take a look at the transforming stylesheet.
This XSL stylesheet is as generic as possible. In fact, it can be used to transform many different sets of data without altering anything. Any XML document that has grandchild elements with text data and child elements that group the grandchild elements can be output as a table with linked labels using this stylesheet.
The stylesheet has two root-level parameters. The first, Sort, is the column number by which to sort the resulting table. This parameter is used to enable the JSP to pass this sorting information through from the URL parameter. The value of the second ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access