July 2001
Intermediate to advanced
592 pages
11h 16m
English
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.
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 ...