xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: XSL, why another language?
Date Wed, 11 Oct 2000 20:05:35 GMT
> René Olsthoorn wrote:
> 
> 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?

When XSLT 1.1 will allow portable extensions the need for those things
will be removed.

Besides, how can you write a declarative API in a procedural language?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message