xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Olsthoorn <...@mediasys.nl>
Subject XSL, why another language?
Date Wed, 11 Oct 2000 14:19:19 GMT
Dear reader,

RenderX has a nice XSL sheet, which is capable of creating a chess-board FO
file from a XML file which contains some chess-moves.
You can see the stylesheet at:
http://www.renderx.com/Tests/chess/chess.xsl

However, when reading this stylesheet, I noticed that XSL is just trying to
do programming constructs:

Extraction:

- <xsl:choose>
- <xsl:when test="$move = 'O-O'">
- <xsl:variable name="y">
- <xsl:choose>
  <xsl:when test="$player = 'white'">1</xsl:when> 
  <xsl:otherwise>8</xsl:otherwise> 
  </xsl:choose>
  </xsl:variable>
- <xsl:variable name="result">
- <xsl:call-template name="move-piece">
  <xsl:variable name="from" select="(substring(substring-before($coords,
'-'), 2, 1) - 1) * 8 + string-length(substring-before('abcdefgh',
substring(substring-before($coords, '-'), 1, 1))) + 1" /> 

This is really ugly! It takes us back in time!
Why don't we figure out a nice Java API, which can do the XSL-translation?
And forget about the current XSLT syntax?

Greets,
René Olsthoorn.
ROL@europe.com


Mime
View raw message