You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by JNBS <jb...@etu.utc.fr> on 2000/12/15 11:27:44 UTC

implementation of a decision table

 hello,
 
 I'm currently working on xsl implementation of a decision table. 
 According to the fact that a decision table is noting else than a big SWITCH, 
I've decided to implement it this way :
 
 <xsl:template match="//item[clause of decision]">
 ...
 <xsl:template match="//item[clause of decision]">
 ...
 <xsl:template match="//item[clause of decision]">
 ...

First, I ask myself if a thing like 
 
 <xsl:template match="//item">
	 <xsl:choose>
	 	<xsl:when test="clause of decision">...
	 	<xsl:when test="clause of decision">...
	 	<xsl:when test="clause of decision">...
	 	<xsl:otherwise>...
	 </xsl:choose>
</xsl:template>

is better than my first choice?
Despite I fond it worse at the first time, I'me really think about this 
alternative, because I encoutered some pbs when I wanted to use variables 
inside <xsl:template> clauses.
In fact, there's no other possibilities to put variable declarations in each 
<xsl:template> clause, so as I've got one thousand decision clauses, it will 
imply a dramatical redundancy.
But maybe I'm wrong and there's one magic way to deal with one var. declaration 
used in all the <xsl:template> clauses...

Thanks to the attention you will pay to my request.

JNBS.
jbiarrot@etu.utc.fr
A young french computer engineer.