by Oren Ben-Kiki

We are pleased to include a unique use of XSLT devised and summarized below by Oren Ben-Kiki. The N-Queens problem is discussed in many places dealing with artificial intelligence search algorithms. It is a problem which simply asks how to place the maximum number of queens on a chess board such that no queen can attack another (while I was writing a draft of this book, my niece Anna Marie was avidly occupied—using pawns—for some 27 minutes before finding a solution).

It was originally attributed to Max Bezzel in the German chess magazine Schach in 1848.[1] It was called the 8-Queens problem and was eventually republished in 1850, catching the attention of mathematicians seeking to solve all possible arrangements (there are 92). ...

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.