C.1. Architecture
C.1.1. Overall structure
Aside from headers, the stylesheet consists of two sets of templates.
The first set computes the set of solutions to the N-Queens problem. It is built around the following principle: each template invocation is responsible for emitting all the solutions to the problem, given that part of the solution is known. The second set is in charge of formatting each solution into an HTML table for display. It processes a solution row by row and column by column, emitting the relevant HTML table tags for displaying the resulting chessboard.
C.1.2. Solution representation
To make this architecture work, we need some way to represent a solution during the execution of the stylesheet. The first set of templates would ...
Get XSLT and XPATH: A Guide to XML Transformations now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.