Sunday, November 03, 2002

ChessGML to SVG

Displaying chess games in Web pages using ChessGML and SVG

If you have the Adobe SVG plug-in installed, you should see an animated chess game…

The ChessGML/SVG stylesheet is an XSLT transformation that converts chess games in PGN or ChessGML notation to an SVG file, which can simply be linked to from an HTML page for viewing in a browser that supports SVG.

The ChessGML game notation, created by Andreas Saremba, is an XML encoding for chess games as well as tournament tables. A ChessGML file can be generated by hand or converted from PGN (Andreas Saremba provides a converted with the SGML package). SVG is a vector graphics format for the Web, developped by the W3C. SVG is also an XML vocabulary, so we use XSLT, the XML-to-XML transformation language to perform the transformation. The advantages of using SVG for viewing chess in a browser are:

it is a vector graphics format, you can zoom in or out the board and you won't get bitmap artefacts
A game encoded in SVG comes as one file: no separate font or images. Everything is held together in the .svg file, which can easily be embedded in your html.

SVG, ChessGML, and XSLT are open standards, and many open source implementations exist. Only the Adobe SVG viewer isn't, but it is still freely available.

SVG, ChessGML, and XSLT are XML standards and therefore benefits from XML's accessibility, interoperability and usability features.

The ChessGML/SVG stylesheets are released under the W3C Software Notice and License.
http://people.w3.org/maxf/ChessGML/

No comments:

Post a Comment

con·cept