You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							320 lines
						
					
					
						
							12 KiB
						
					
					
				
			
		
		
	
	
							320 lines
						
					
					
						
							12 KiB
						
					
					
				<?xml version="1.0"  encoding="UTF-8"?> | 
						|
<xsl:stylesheet version="1.0" | 
						|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | 
						|
<xsl:import href="pageComponents_html.xsl" /> | 
						|
<!--In diesem Stylesheet können Sie individuelle templates unterbringen, | 
						|
  die in ihrer Präzedenz das normale Stylesheet  | 
						|
  pageComponents_html.xsl überragt. -->  | 
						|
<xsl:import href="pageComponents_html_final.xsl" /> | 
						|
<xsl:import href="resultset_html.xsl" /> | 
						|
<xsl:import href="interLinks_html.xsl" /> | 
						|
<xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," /> | 
						|
 | 
						|
<xml:output method="application/vnd.ms-excel" /> | 
						|
<xsl:template match="/"> | 
						|
<xsl:call-template name="xlsworkbook"/> | 
						|
</xsl:template> | 
						|
<xsl:template name="xlsworkbook"> | 
						|
<xls_workbook vorlage=""> | 
						|
 | 
						|
  <!-- define the xl styles--> | 
						|
	<xsl:call-template name="xls_Styles" /> | 
						|
<!--Seitenformat--> | 
						|
<xsl:call-template name="xls_PageFormat" /> | 
						|
  <!-- define the xl data for the first sheet --> | 
						|
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement"> | 
						|
<xsl:choose> | 
						|
<xsl:when test="@typ='image'"> | 
						|
<xsl:text> | 
						|
 | 
						|
</xsl:text> | 
						|
</xsl:when> | 
						|
<xsl:when test="@typ='tabelle'"> | 
						|
 | 
						|
<xsl:call-template name="xslsheet"/> | 
						|
	 | 
						|
</xsl:when> | 
						|
<xsl:otherwise> | 
						|
</xsl:otherwise> | 
						|
</xsl:choose> | 
						|
</xsl:for-each> | 
						|
 	 | 
						|
</xls_workbook> | 
						|
</xsl:template> | 
						|
 | 
						|
<xsl:template name="xslsheet"> | 
						|
<xls_sheet name="{substring-after(substring-after(../felder/feld[ @varname='Studiengang']/value,'_'),'_')}"> | 
						|
 | 
						|
<xls_row height="600"> | 
						|
<xls_cell style="maskenname" width="10000"><xsl:value-of select="../maskenname" /></xls_cell> | 
						|
</xls_row> | 
						|
 | 
						|
 | 
						|
<xsl:call-template name="legende_xl"> </xsl:call-template> | 
						|
<xls_row height="1000"><xls_cell></xls_cell></xls_row> | 
						|
 | 
						|
<xsl:call-template name="xlsheader"/> | 
						|
 | 
						|
<xsl:call-template name="xslrows"/> | 
						|
</xls_sheet> | 
						|
</xsl:template> | 
						|
 | 
						|
<xsl:template name="xslrows"> | 
						|
<xsl:for-each select="sqlerg/row"> | 
						|
<xsl:call-template name="xslsinglerow"/> | 
						|
</xsl:for-each>  | 
						|
</xsl:template> | 
						|
 | 
						|
 | 
						|
<xsl:template name="xslsinglerow"> | 
						|
<xsl:variable name="erglevelmax"> | 
						|
<xsl:if test="count(../../sqlerg/row/col [ f_name = 'ebene' ]) > 0"> | 
						|
<xsl:choose> | 
						|
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '4']) > 0"> | 
						|
<xsl:text>4</xsl:text> | 
						|
</xsl:when> | 
						|
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '3']) > 0"> | 
						|
<xsl:text>3</xsl:text> | 
						|
</xsl:when> | 
						|
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '2']) > 0"> | 
						|
<xsl:text>2</xsl:text> | 
						|
</xsl:when> | 
						|
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '1']) > 0"> | 
						|
<xsl:text>1</xsl:text> | 
						|
</xsl:when> | 
						|
<xsl:otherwise> | 
						|
<xsl:text>5</xsl:text> | 
						|
</xsl:otherwise> | 
						|
</xsl:choose> | 
						|
</xsl:if> | 
						|
</xsl:variable> | 
						|
<!--Hinweis: Wenn für die row eine Ebene angegeben ist, wird die Darstellung vom Server definiert | 
						|
   Style der Zelle (z.B. body_dec) wird ignoriert, Attribut numeric ist wichtig für Darstellung, | 
						|
   per datatype decimal wird Nachkommastellenanzeige eingestellt--> | 
						|
<xls_row> | 
						|
<!-- DQ 14.12.07 In Zukunft noch erglevelmax auswerten when$erglevelmax = 5 and --> | 
						|
<xsl:if test="count(col[ f_name = 'ebene' ]) > 0">  | 
						|
<xsl:attribute name="ebene"><xsl:value-of select="6-$erglevelmax+number(col[ f_name = 'ebene' ]/wert)" /></xsl:attribute> | 
						|
</xsl:if> | 
						|
<xsl:if test="@issumme='true'">  | 
						|
<xsl:attribute name="ebene"><xsl:value-of select="'summe'" /></xsl:attribute> | 
						|
</xsl:if> | 
						|
<!--MB keine Zelle für Linkspalten, 4/2010 keine versteckten Spalten--> | 
						|
<xsl:for-each select="col[(starts-with(f_name,'hidden'))=false and starts-with(f_name,'next') = false ]"> | 
						|
<xls_cell> | 
						|
	 | 
						|
         <xsl:variable name="checkname"><xsl:value-of select="concat('hidden',f_name,'dp')"/></xsl:variable> | 
						|
    <xsl:choose>         <!--MB wenn es eine versteckte hidden_decimalpl gibt auswerten--> | 
						|
       | 
						|
        <!--MB 4/2010 wenn decimalzahl aber decimalplaces=0 als nicht als decimal sondern integer ausgeben s.u. --> | 
						|
        <!-- typ 8 timestamp nicht als Decimalzahl sondern Text ausgeben --> | 
						|
	<xsl:when test="(@typ='2' or @typ='3') and count(../col[f_name=$checkname]) = 0"> <!-- DecimalFormat --> | 
						|
		<xsl:attribute name="style">body_dec</xsl:attribute> | 
						|
		<xsl:attribute name="numeric">true</xsl:attribute> | 
						|
		<xsl:attribute name="datatype">decimal</xsl:attribute> | 
						|
		<xsl:choose> | 
						|
    <xsl:when test="wert != ''"> | 
						|
    <xsl:value-of select="wert" /> | 
						|
   <!--<xsl:value-of select="format-number(wert,'###.###.###.###.##0,00','German')" />--> | 
						|
    </xsl:when> | 
						|
    <xsl:otherwise> | 
						|
    <xsl:value-of select="' '" /> | 
						|
    </xsl:otherwise> | 
						|
    </xsl:choose> | 
						|
    	</xsl:when> | 
						|
	<xsl:when test="(@typ='2' or @typ='3') and count(../col[f_name=$checkname]) >0 and ../col[f_name=$checkname]/wert!='0'"> <!-- DecimalFormat --> | 
						|
		<xsl:attribute name="style">body_dec</xsl:attribute> <!-- row.ebene überlagert ggfs! --> | 
						|
		<xsl:attribute name="numeric">true</xsl:attribute> | 
						|
		<xsl:attribute name="datatype">decimal</xsl:attribute> | 
						|
		<!--<xsl:value-of select="wert" />--> | 
						|
		<xsl:choose> | 
						|
    <xsl:when test="wert != ''"> | 
						|
    <xsl:value-of select="wert" /> | 
						|
   <!--<xsl:value-of select="format-number(wert,'###.###.###.###.##0,00','German')" />--> | 
						|
    </xsl:when> | 
						|
    <xsl:otherwise> | 
						|
    <xsl:value-of select="' '" /> | 
						|
    </xsl:otherwise> | 
						|
    </xsl:choose> | 
						|
		 | 
						|
	</xsl:when> | 
						|
	 | 
						|
<xsl:when test="../col[f_name=$checkname]/wert='0' or @typ='4' or @typ='5'"> <!-- MB: Integer/ auch typ 5 Smallint --> | 
						|
<xsl:attribute name="style">body_int</xsl:attribute> <!-- row.ebene überlagert ggfs! --> | 
						|
<xsl:attribute name= "numeric">true</xsl:attribute> | 
						|
<xsl:attribute name="datatype">integer</xsl:attribute> | 
						|
<!--<xsl:value-of select="wert" />--> | 
						|
<xsl:choose> | 
						|
<xsl:when test="wert != ''"> | 
						|
  <!-- MB formatierung format-number(wert,'###.###.###.###.###','German') raus, macht Excel selbst --> | 
						|
<xsl:value-of select="wert " /> | 
						|
</xsl:when> | 
						|
    <xsl:otherwise> | 
						|
    <xsl:value-of select="' '" /> | 
						|
    </xsl:otherwise> | 
						|
    </xsl:choose> | 
						|
		 | 
						|
	</xsl:when> | 
						|
<!-- deutsche datumsfelder können von POI noch nicht richtig verarbeitet werden | 
						|
<xsl:when test="@typ='91'"> | 
						|
<xsl:attribute name="style">body_date</xsl:attribute> | 
						|
<xsl:attribute name="datatype">date</xsl:attribute> | 
						|
<xsl:value-of select="wert " /> | 
						|
</xsl:when> | 
						|
--> | 
						|
	<xsl:otherwise> | 
						|
	<!--Typ=1 ist string und wird defaultmäßig behandelt --> | 
						|
	<xsl:attribute name="style">body</xsl:attribute> <!-- row.ebene überlagert ggfs! --> | 
						|
	<xsl:call-template name="field_type" /> | 
						|
   <!-- MB 8/2015 da next... eh nicht angezeigt werden kann auf resultsetLink verzichtet werden, | 
						|
         so kommen bei Usern die emailadressen als reiner text raus | 
						|
	 | 
						|
	<xsl:variable name="zs"> | 
						|
    <xsl:call-template name="field_value"> | 
						|
    </xsl:call-template> | 
						|
    </xsl:variable> | 
						|
    <xsl:call-template name="resultsetLink"> | 
						|
    <xsl:with-param name="zs2" select="$zs" /> | 
						|
    </xsl:call-template> | 
						|
    --> | 
						|
     <xsl:call-template name="field_value"/> | 
						|
     <!-- MB 5.5.08 ablegen in zs3 und aufruf von get_val_or_nbsp nicht nötig--> | 
						|
 | 
						|
</xsl:otherwise> | 
						|
</xsl:choose> | 
						|
 | 
						|
	</xls_cell> | 
						|
 | 
						|
</xsl:for-each><!--cell--> | 
						|
		 | 
						|
		</xls_row> | 
						|
</xsl:template> | 
						|
 | 
						|
<xsl:template name="xlsheader"> | 
						|
<xsl:choose> | 
						|
<xsl:when test="/ergebnisse/ergebnis/ergebniselement/sqlerg/headers/@hasAggregationHeaders='true'"> | 
						|
<xsl:variable name="nr_rows"><xsl:value-of select="count(sqlerg/aggregationHeaders/tr)" /></xsl:variable> | 
						|
<xsl:for-each select="sqlerg/aggregationHeaders/tr"> | 
						|
<!-- AK 20.08.2014 Der Header bekommt eine höhere Zeile--> | 
						|
<xls_row height="600"> | 
						|
<xsl:if test="position()=1"> | 
						|
<xsl:attribute name="repeating"><xsl:value-of select="$nr_rows" /></xsl:attribute> | 
						|
</xsl:if> | 
						|
<xsl:for-each select="th"> | 
						|
<xsl:if test="starts-with(@f_name,'next') = false and starts-with(@f_name,'hidden') = false"> | 
						|
<xls_cell style="heading"> | 
						|
<xsl:attribute name="width"><xsl:value-of select="@width * 280" /> </xsl:attribute> | 
						|
<xsl:if test="@colspan != ''"> | 
						|
<xsl:attribute name="colspan"><xsl:value-of select="@colspan" /> </xsl:attribute> | 
						|
</xsl:if> | 
						|
<xsl:if test="@rowspan != ''"> | 
						|
<xsl:attribute name="rowspan"><xsl:value-of select="@rowspan" /> </xsl:attribute> | 
						|
</xsl:if> | 
						|
<xsl:call-template name="removeBackslashN" > | 
						|
    <xsl:with-param name="derwert"><xsl:value-of select="." /></xsl:with-param> | 
						|
    <xsl:with-param name="format"><xsl:value-of select="'xls'" /></xsl:with-param> | 
						|
    </xsl:call-template>  | 
						|
</xls_cell> | 
						|
</xsl:if> | 
						|
</xsl:for-each> | 
						|
</xls_row> | 
						|
</xsl:for-each> | 
						|
</xsl:when> | 
						|
<xsl:otherwise> | 
						|
<!-- alt Normale headers --> | 
						|
<xls_row repeating="true"> | 
						|
<!--MB 04/2010 versteckte Spalten nicht kein Header für Linkspalten--> --> | 
						|
<xsl:for-each select="sqlerg/headers/header[(starts-with(f_name,'hidden'))=false and starts-with(f_name,'next') = false ]"> | 
						|
	<xsl:call-template name="xlssingleheader"> | 
						|
    <xsl:with-param name="derwert" select="wert" /> | 
						|
    </xsl:call-template> | 
						|
 </xsl:for-each> | 
						|
</xls_row> | 
						|
</xsl:otherwise> | 
						|
</xsl:choose> | 
						|
</xsl:template> | 
						|
<xsl:template name="xlssingleheader"> | 
						|
<xsl:param name="derwert" />  | 
						|
<xls_cell style="heading"> | 
						|
<xsl:attribute name="width"><xsl:value-of select="@width * 280" /> </xsl:attribute> | 
						|
    <!--max. 2 Umbrüche pro Zelle --> | 
						|
    <!--<xsl:value-of select="string($derwert) "/>--> | 
						|
     | 
						|
	<xsl:variable name="header1">  | 
						|
	<xsl:choose> | 
						|
		<xsl:when test="(contains(string($derwert),'\n'))"> | 
						|
		<xsl:value-of select="substring-before($derwert,'\n') "/> | 
						|
		 <xsl:text> | 
						|
</xsl:text> | 
						|
		<xsl:value-of select="substring-after($derwert,'\n') "/> | 
						|
		</xsl:when> | 
						|
		<xsl:otherwise> | 
						|
		<xsl:copy-of select="$derwert" /> | 
						|
		</xsl:otherwise> | 
						|
	</xsl:choose> | 
						|
	</xsl:variable> | 
						|
	<xsl:variable name="header2"> | 
						|
	<xsl:choose> | 
						|
		<xsl:when test="(contains(string($header1),'\n'))"> | 
						|
		<xsl:value-of select="substring-before($header1,'\n') "/> | 
						|
		<xsl:text> | 
						|
</xsl:text> | 
						|
		<xsl:value-of select="substring-after($header1,'\n') "/> | 
						|
		</xsl:when> | 
						|
		<xsl:otherwise> | 
						|
		<xsl:value-of select="$header1" /> | 
						|
		</xsl:otherwise> | 
						|
	</xsl:choose> | 
						|
	</xsl:variable> | 
						|
	<xsl:choose> | 
						|
		<xsl:when test="(contains(string($header2),'\000'))"> | 
						|
		<xsl:value-of select="substring-before($header2,'\000') "/> | 
						|
		<xsl:text> | 
						|
</xsl:text> | 
						|
		<xsl:value-of select="substring-after($header2,'\000') "/> | 
						|
		</xsl:when> | 
						|
		<xsl:otherwise> | 
						|
		<xsl:value-of select="$header2" /> | 
						|
		</xsl:otherwise> | 
						|
	</xsl:choose> | 
						|
 | 
						|
</xls_cell> | 
						|
</xsl:template> | 
						|
<xsl:template name="legende_xl"> | 
						|
<xls_row height="1000"> | 
						|
<xls_cell style="legende"> | 
						|
<xsl:for-each select="../felder/feld"> | 
						|
<xsl:if test="(value !='' or sicht/@isFirstInGroup='false' or @isstandtoday='false')  and @varname != 'sort' and @varname != 'maxoffset' and @varname!='##line##' "> | 
						|
	<xsl:choose> | 
						|
		<xsl:when test="string-length(caption_short) > 0 and caption_short != 'null'" > | 
						|
		<![CDATA[]]><xsl:value-of select="normalize-space(string(caption_short))" /><![CDATA[]]> | 
						|
		</xsl:when> | 
						|
		<xsl:otherwise> | 
						|
		<![CDATA[]]><xsl:value-of select="normalize-space(string(@varname))" /><![CDATA[]]> | 
						|
		</xsl:otherwise> | 
						|
		</xsl:choose><xsl:text>: </xsl:text> | 
						|
		<![CDATA[]]><xsl:value-of select="normalize-space(string(value_caption))" /><![CDATA[]]> | 
						|
		<!-- bei Mehrfachauswahl keine Einschränkung auf 50  Zeichen sinnvoll | 
						|
		<xsl:if test="string-length(wert/caption) < 50"> | 
						|
		<![CDATA[]]><xsl:value-of select="normalize-space(string(value_caption))" /><![CDATA[]]> | 
						|
		</xsl:if> | 
						|
		<xsl:if test="string-length(wert/caption) > 49"> | 
						|
			<![CDATA[]]><xsl:value-of select="substring(value_caption,0,50)" /><![CDATA[]]><xsl:text>...</xsl:text> | 
						|
		</xsl:if>--> | 
						|
		<xsl:if test="sicht!=''"> | 
						|
			<![CDATA[]]><xsl:text> (</xsl:text><xsl:value-of select="sicht" /> | 
						|
			<xsl:if test="@stand!=''"><xsl:text> - Stand:</xsl:text><xsl:value-of select="@stand"/></xsl:if> | 
						|
			<xsl:text>)</xsl:text><![CDATA[]]> | 
						|
			</xsl:if> | 
						|
	<xsl:text>; </xsl:text> | 
						|
	</xsl:if> | 
						|
</xsl:for-each> | 
						|
<xsl:text>User: </xsl:text><xsl:value-of select="/ergebnisse/user" /> | 
						|
<xsl:text>; Stand: </xsl:text><xsl:value-of select="../stand" /> | 
						|
</xls_cell> | 
						|
</xls_row> | 
						|
<xsl:if test="../hinweis!=''"> | 
						|
<xls_row height="1000"><xls_cell style="legende"><xsl:value-of select="../hinweis"/></xls_cell></xls_row> | 
						|
</xsl:if> | 
						|
</xsl:template> | 
						|
</xsl:stylesheet>
 | 
						|
 |