summaryrefslogtreecommitdiff
path: root/oracle-conversion/sort-lesson.xsl
blob: 54c460175933fdd97265b861dd677fbe3582a216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="modul">1</xsl:param>

<xsl:template match="ROW">
	<ROW>
		<xsl:copy-of select="*"/>
	</ROW>
</xsl:template>
<xsl:template match="ROW" mode="order">
	<xsl:apply-templates select="//ROWSET[@NAME='lessons']/ROW[LESSON_ID=current()/LESSON_ID and MODUL=$modul and TYP='SELECT']"/>
</xsl:template>

<xsl:template match="/">
	<ROWSET>
		<xsl:apply-templates select="DATABASE/ROWSET[@NAME='lesson_order']/ROW[MODUL=$modul]" mode="order">
			<xsl:sort select="NR"/>
		</xsl:apply-templates>
	</ROWSET>
</xsl:template>
</xsl:stylesheet>