xsl:function does abort just after the call of the function

S

schaf

Hi !
I'm writing a new xsl:function, which uses two other functions. But by
the call of the first function, it would be abort just after the call.
Not even the xsl:param would be set.
I don't have any idea, why this works like this. Could you please help
me ?

Here my xsl-code:

<xsl:function name="rsh:bestanden">
<xsl:param name="studiumTyp" as="xs:string"/>
<xsl:param name="kursTyp" as="xs:string"/>
<xsl:variable name="minPunkte"
select="$study-def/studium[@studiumID=$studiumTyp]/studiumTeil[@studiumTeilID=$kursTyp]/ECTSPunkte"/>

<xsl:variable name="summeECTSPunkte">
<v>0</v>
<xsl:for-each
select="$study-def/studium[@studiumID=$studiumTyp]/studiumTeil[@studiumTeilID=$kursTyp]/kursRef">
<xsl:variable name="kursID" select="@ref"/>
<!--The call of the rsh:noteByKursID...does not work! Why ???-->
<xsl:variable name="kursNote"
select="rsh:noteByKursID($kursID)"/>
<xsl:if test="$kursNote != 'F'">
<v><xsl:value-of
select="rsh:ECTSPunkteByKursID($kursID)"/></v>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:choose>
<xsl:when test="sum($summeECTSPunkte/*) &lt; $minPunkte">
<xsl:sequence select="'false'"/>
</xsl:when>
<xsl:eek:therwise>
<xsl:sequence select="'true'"/>
</xsl:eek:therwise>
</xsl:choose>
</xsl:function>

<xsl:function name="rsh:noteByKursID">
<xsl:param name="parKursID" as="xs:string"/>
<xsl:sequence
select="$person-ref/var[position()=var[node()=$parKursID] +
1]/wert"></xsl:sequence>
</xsl:function>

<xsl:function name="rsh:ECTSPunkteByKursID">
<xsl:param name="kursID" as="xs:string"/>
<xsl:variable name="lektionen"
select="$study-def/kurs[@kursID=$kursID]/lektionen"/>
<xsl:sequence select="if($lektionen &gt;= 12) then($lektionen
div 12) else(0)"/>
</xsl:function>

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top