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

Discussion in 'XML' started by schaf, May 29, 2005.

  1. schaf

    schaf Guest

    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
    schaf, May 29, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,588
    A. Bolmarcich
    May 27, 2005
  2. Replies:
    0
    Views:
    543
  3. grbgooglefan
    Replies:
    1
    Views:
    422
  4. Masschelein Bart

    Abort a system call

    Masschelein Bart, Jul 4, 2005, in forum: Ruby
    Replies:
    2
    Views:
    346
    Robert Klemme
    Jul 4, 2005
  5. Sri
    Replies:
    0
    Views:
    96
Loading...

Share This Page