<xsl:template match="felt[@typeid=22]">
<xsl:param name="type"/>
<xsl:choose>
<xsl:when test="$foredragid!=''">
...
</xsl:when>
<xsl:otherwise>
<xsl:variable name="slutdato">
<xsl:choose>
<xsl:when test="func:urlEncode(key('findFelt', $feltid)/ekstraXmlInfo/dage)=-1 or func:urlEncode(key('findFelt', $feltid)/ekstraXmlInfo/dage)=-1000">
<xsl:value-of select="func:alterDate('yyyy-MM-dd')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="startdato">
<xsl:choose>
<xsl:when test="func:urlEncode(key('findFelt', $feltid)/ekstraXmlInfo/dage)=-1 or func:urlEncode(key('findFelt', $feltid)/ekstraXmlInfo/dage)=-1000">
<xsl:value-of select="'1900-01-01'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'nu'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="kursus_stillinger">
<xsl:choose>
<xsl:when test="$type!=''">
<xsl:value-of select="$type"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$kursusid=$kursus_homepage_intranet">
<xsl:value-of select="$kursus_stillinger_ekstern"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$kursus_stillinger_nbi"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="ISISJobXml" select="concat('
http://isis.ku.dk/isis/scripts/foredragv1/xml_foredrag.aspx?kategori=stillingsopslag&kursusid=', $kursus_stillinger, '&startdato=', $startdato, '&slutdato=', $slutdato)"/>
<xsl:variable name="ISISJobXmlDoc" select="document($ISISJobXml)"/>
<xsl:choose>
<xsl:when test="count($ISISJobXmlDoc/event:ISIS/event:foredrag)=0">
<h1><xsl:value-of select="overskrift"/></h1>
<p><xsl:value-of disable-output-escaping="yes" select="key('findTekst', 'tekstTilIngenEmner')/tekst[lang($sprog)]"/></p>
</xsl:when>
<xsl:otherwise>
<h1><xsl:value-of select="overskrift"/></h1>
<xsl:for-each select="$ISISJobXmlDoc/event:ISIS/event:foredrag">
<xsl:sort select="event:start" order="descending" />
<div style="border: solid 1px {$farve_logo}; padding: 5px; margin-bottom: 20px;">
<xsl:if test="event:titel[.!=''] or event:titelE[.!='']">
<p class="date_italic">
<xsl:value-of disable-output-escaping="yes" select="key('findTekst', 'tekstOpslået')/tekst[lang($sprog)]"/> <xsl:value-of select="func:formatDateInt(event:start, $sprog, 'false')"/>
</p>
<h2>
<a href="{concat(func:side($sprog, $felt_stillinger_vis), '?foredragid=', event:foredragid, '&lang=', $sprog)}">
<xsl:choose>
<xsl:when test="$sprog='en'">
<xsl:value-of disable-output-escaping="yes" select="event:titelE"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="event:titel"/>
</xsl:otherwise>
</xsl:choose>
</a>
</h2>
<xsl:choose>
<xsl:when test="$sprog='en'">
<xsl:value-of disable-output-escaping="yes" select="func:truncate(event:abstraktE, 300, key('findTekstNr', '55')/tekst[lang($sprog)])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="func:truncate(event:abstrakt, 300, key('findTekstNr', '55')/tekst[lang($sprog)])"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</div>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>