GoSVG User Guide
Stylesheet Processors
If you want to split games into more than one diagram, you will need the xml stylesheet processor Xalan,
bsf.jar and js.jar
and some luck, because they don't seem to work as well together as they used to. Otherwise try Saxon.
For Microsoft Windows users, there's xml2pdf, a free program from Alt Soft which can also generate svg files.
GoSVG Features
- Board cut-outs
- Diagram Splitting
- Miscellaneous
General Examples
-
- The following commands take as input the Go game called 'in.xml',
and output an svg file called 'out.svg'
-
- On a Win9x system using Xalan, to set 'showMarks' to 'All'
write:
java -classpath c:\xalan\bin\xalan.jar;c:\xalan\bin\xerces.jar
org.apache.xalan.xslt.Process -in in.xml -xsl goSVG1-0.xsl -out
out.svg -PARAM showMarks All
-
- On a Win9x system using Saxon, to set 'format' to 'plain'
and 'showMarks' to 'All' write:
-
- java -classpath c:\saxon\saxon.jar com.icl.saxon.StyleSheet
-o out.svg in.xml goSVG1-0.xsl showMarks=All format=plain
-
- On a Win9x system using Xalan, to output a diagram numbering
moves 101-200 as 1-100, write:
java -classpath c:\xalan\bin\xalan.jar;c:\xalan\bin\xerces.jar;c:\rhino\js.jar;c:\xalan\bin\bsf.jar
org.apache.xalan.xslt.Process -in in.xml -xsl goSVG1-0.xsl-out
out.svg -PARAM numberFrom 101 -PARAM stopAt 200 -PARAM numberOffset
100
- Note that you must use Xalan and include the paths to js.jar
and bsf.jar for this to work. It can be quite slow - about 30
seconds.
Board cut-outs
-
- Controlled by:
- <xsl:param name="clipX">0</xsl:param>
<xsl:param name="clipY">0</xsl:param>
-
- By setting the clipX and clipY parameters you can control
what section of the board is shown.
- The section you want to display must contain at least two
board edges.
- Positive values of clipX slide the board to the right, obscuring
the right-hand side.
- Negative values of clipX slide the board to the left, obscuring
the left-hand side.
- Positive values of clipY slide the board down, obscuring
the lower side.
- Negative values of clipY slide the board up, obscuring the
upper side.
- For example setting clipY to -5 will hide the upper 5 rows
of the board.
Diagram splitting
- Controlled by:
- <xsl:param name="stopAt">999</xsl:param>
<xsl:param name="numberFrom">0</xsl:param>
<xsl:param name="numberOffset">0</xsl:param>
-
- Example - To split a game diagram into 3 sub-diagrams, you
need to invoke the stylesheet 3 times.
- The first time set stopAt to 100.
- The second time set stopAt to 200, and numberFrom to 101.
Optionally set numberOffset to 100.
- The third time to display the rest of the game, set numberFrom
to 201. Optionally set numberOffset to 200.
Miscellaneous
- There are quite a few parameters you can set to control the
look of your diagram.
- Most are self explanetory, or explained in the stylesheet.
- Some are explained in more detail below.
format
- Controlled by:
- <xsl:param name="format">pretty</xsl:param>
-
- This can also be 'plain', which is designed to look like
the kind of diagram you see in a book.
- Plain format gives solid black and white stones, thicker
grid lines, thicker board outline and larger handicap points.
boardName and showName
- Controlled by:
- <xsl:param name="boardName"/>
- <xsl:param name="showName">on</xsl:param>
-
- You can give a diagram a name using boardName. This will
appear below the board.
- For example "Figure 1" Note that the double quotes
are necessary because of the space in the parameter.
- You can switch on/off the display of the Game name using
showName.
- The Game name (if it exists) is part of the xml file and
will be displayed at the top of the diagram.
hideInfo
- Controlled by:
- <xsl:param name="hideInfo">Application,BoardSize,User</xsl:param>
-
- The default is to hide the Application,BoardSize and User
information tags.
- If you wanted to display the boardsize, you would set hideInfo
to 'Application,User'