MediaWiki:Key Start Keys2ExcelXML-Table de.xsl

From FloraWiki - das Wiki zur Schweizer Flora
Jump to: navigation, search

<?xml version="1.0"?> <xsl:stylesheet version="1.0"

 xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
               > 
   <xsl:param name="current_date_time" />
     <xsl:output  method="xml" encoding="UTF-8" indent="yes"/>


 <xsl:template match="/Seiten">
   <xsl:text disable-output-escaping='yes'><?mso-application progid="Excel.Sheet"?></xsl:text>
   <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:o="urn:schemas-microsoft-com:office:office"
     xmlns:x="urn:schemas-microsoft-com:office:excel"
     xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
     xmlns:html="http://www.w3.org/TR/REC-html40">
     <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
       <Author><xsl:value-of select="/Seiten/Seite/Key_Start[1]/creators"/></Author>
       <LastAuthor>Unbekannt</LastAuthor>
       <Created><xsl:value-of select="$current_date_time"/></Created>
       <Company>http://wiki.infoflora.ch/swissflorawiki/de/</Company>
       <Version></Version>
     </DocumentProperties>
     <xsl:apply-templates/>
   </Workbook>
 </xsl:template>


 <xsl:template name="key-start-keys" match="/Seiten/Seite">
   <xsl:for-each select="./Key_Start">
     <xsl:call-template name="key-start" >
       <xsl:with-param name="key_start_nodes" select="."/>
     </xsl:call-template>
   </xsl:for-each>
 </xsl:template>
 <xsl:template name="key-start" >
   <xsl:param name="key_start_nodes" />
 <ss:Worksheet>
   <xsl:attribute name="ss:Name">
     <xsl:choose>
       <xsl:when test="$key_start_nodes/title">
         <xsl:call-template name="remove_any_tag" >
           <xsl:with-param name="text" select="translate($key_start_nodes/title,$apos, )"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>Schlüssel_<xsl:number format="1" count="title"/></xsl:otherwise>
     </xsl:choose>
   </xsl:attribute>
   <Styles>
     <Style ss:ID="ce1"><Alignment ss:Rotate="90"/></Style>
   </Styles>
<xsl:for-each select="$key_start_nodes"> <xsl:for-each select="child::*"> <Row> <Cell><xsl:value-of select="name(.)"/></Cell> <Cell> <xsl:call-template name="remove_translate_tags" > <xsl:with-param name="text" select="."/> </xsl:call-template> </Cell> </Row> </xsl:for-each> </xsl:for-each> <xsl:if test="$key_start_nodes/following-sibling::node()/Feld_1[contains(.,'(')]"> <Row><Cell>add_decision_backlinks</Cell><Cell>1</Cell></Row> </xsl:if> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/Feld_1[contains(.,'*') and not(following-sibling::parentlead) and not(preceding-sibling::parentlead)]"> <Row><Cell>decision_alternative_code</Cell><Cell>*</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/Feld_1[contains(.,$rsquo) and not(following-sibling::parentlead) and not(preceding-sibling::parentlead)]"> <Row><Cell>decision_alternative_code</Cell><Cell><xsl:value-of select="$rsquo"/></Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/Feld_1[contains(.,$apos) and not(following-sibling::parentlead) and not(preceding-sibling::parentlead)]"> <Row><Cell>decision_alternative_code</Cell><Cell><xsl:value-of select="$apos"/></Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/Feld_1[contains(.,'a') and not(following-sibling::parentlead) and not(preceding-sibling::parentlead)]"> <Row><Cell>decision_alternative_code</Cell><Cell>a-z</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/Feld_1[contains(.,'A') and not(following-sibling::parentlead) and not(preceding-sibling::parentlead)]"> <Row><Cell>decision_alternative_code</Cell><Cell>A-Z</Cell></Row> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, concat('a',$rsquo))]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>a-z<xsl:value-of select="$rsquo"/></Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, concat('A',$rsquo))]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>A-Z<xsl:value-of select="$rsquo"/></Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, 'a*')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>a-z*</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, 'A*')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>A-Z*</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, concat('a',$apos))]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>a-z<xsl:value-of select="$apos"/></Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, concat('A',$apos))]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>A-Z<xsl:value-of select="$apos"/></Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, 'a-')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>a-z</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, 'a–')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>a-z</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, 'A-')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>A-Z</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, 'A–')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>A-Z</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, '1–')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>number</Cell></Row> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$key_start_nodes/following-sibling::node()/parentlead[starts-with(../descendant-or-self::Feld_1, '1-')]"> <Row><Cell>nested_decision_alternative_code</Cell><Cell>number</Cell></Row> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> <Row><Cell></Cell><Cell></Cell></Row> <Row> <Cell ss:StyleID="ce1">decision_number</Cell> <Cell ss:StyleID="ce1">decision_alternative_number</Cell> <Cell ss:StyleID="ce1">nested_decision_number</Cell> <Cell ss:StyleID="ce1">nested_decision_alternative_number</Cell> <Cell ss:StyleID="ce1">next_decision_number</Cell> <Cell ss:StyleID="ce1">debug_info_Feld_1_decision_code_and_alternative</Cell> <Cell ss:StyleID="ce1">debug_info_Feld_3_next_decision_code_and_alternative</Cell> <Cell ss:StyleID="ce1">alternative_text</Cell> <Cell ss:StyleID="ce1">remarks</Cell> <Cell ss:StyleID="ce1">occurrence</Cell> <Cell ss:StyleID="ce1">description</Cell> <Cell ss:StyleID="ce1">result_link</Cell> <Cell ss:StyleID="ce1">result_text</Cell> <Cell ss:StyleID="ce1">result_id</Cell> <Cell ss:StyleID="ce1">scientific_name</Cell> <Cell ss:StyleID="ce1">scientific_name_synonyms</Cell> <Cell ss:StyleID="ce1">common_names</Cell> <Cell ss:StyleID="ce1">decision_heading</Cell> <Cell ss:StyleID="ce1">primary_media_1</Cell> <Cell ss:StyleID="ce1">caption_primary_media_1</Cell> <Cell ss:StyleID="ce1">label_primary_media_1</Cell> <Cell ss:StyleID="ce1">primary_media_2</Cell> <Cell ss:StyleID="ce1">caption_primary_media_2</Cell> <Cell ss:StyleID="ce1">label_primary_media_2</Cell> <Cell ss:StyleID="ce1">primary_media_3</Cell> <Cell ss:StyleID="ce1">caption_primary_media_3</Cell> <Cell ss:StyleID="ce1">label_primary_media_3</Cell> <Cell ss:StyleID="ce1">primary_media_4</Cell> <Cell ss:StyleID="ce1">caption_primary_media_4</Cell> <Cell ss:StyleID="ce1">label_primary_media_4</Cell> <Cell ss:StyleID="ce1">primary_media_5</Cell> <Cell ss:StyleID="ce1">caption_primary_media_5</Cell> <Cell ss:StyleID="ce1">label_primary_media_5</Cell> <Cell ss:StyleID="ce1">large_primary_media_1</Cell> <Cell ss:StyleID="ce1">caption_large_primary_media_1</Cell> <Cell ss:StyleID="ce1">label_large_primary_media_1</Cell> <Cell ss:StyleID="ce1">large_primary_media_2</Cell> <Cell ss:StyleID="ce1">caption_large_primary_media_2</Cell> <Cell ss:StyleID="ce1">label_large_primary_media_2</Cell> <Cell ss:StyleID="ce1">collapsed_media_1</Cell> <Cell ss:StyleID="ce1">caption_collapsed_media_1</Cell> <Cell ss:StyleID="ce1">label_collapsed_media_1</Cell> <Cell ss:StyleID="ce1">collapsed_media_2</Cell> <Cell ss:StyleID="ce1">caption_collapsed_media_2</Cell> <Cell ss:StyleID="ce1">label_collapsed_media_2</Cell> <Cell ss:StyleID="ce1">collapsed_media_3</Cell> <Cell ss:StyleID="ce1">caption_collapsed_media_3</Cell> <Cell ss:StyleID="ce1">label_collapsed_media_3</Cell> <Cell ss:StyleID="ce1">collapsed_media_4</Cell> <Cell ss:StyleID="ce1">caption_collapsed_media_4</Cell> <Cell ss:StyleID="ce1">label_collapsed_media_4</Cell> <Cell ss:StyleID="ce1">collapsed_media_5</Cell> <Cell ss:StyleID="ce1">caption_collapsed_media_5</Cell> <Cell ss:StyleID="ce1">label_collapsed_media_5</Cell> <Cell ss:StyleID="ce1">collapsed_media_6</Cell> <Cell ss:StyleID="ce1">caption_collapsed_media_6</Cell> <Cell ss:StyleID="ce1">label_collapsed_media_6</Cell> <Cell ss:StyleID="ce1">collapsed_media_captionlines</Cell> <Cell ss:StyleID="ce1">plant_height</Cell> <Cell ss:StyleID="ce1">plant_height_min</Cell> <Cell ss:StyleID="ce1">plant_height_from</Cell> <Cell ss:StyleID="ce1">plant_height_to</Cell> <Cell ss:StyleID="ce1">plant_height_max</Cell> <Cell ss:StyleID="ce1">plant_height_unit</Cell> <Cell ss:StyleID="ce1">organism_size</Cell> <Cell ss:StyleID="ce1">organism_size_min</Cell> <Cell ss:StyleID="ce1">organism_size_from</Cell> <Cell ss:StyleID="ce1">organism_size_to</Cell> <Cell ss:StyleID="ce1">organism_size_max</Cell> <Cell ss:StyleID="ce1">organism_size_unit</Cell> <Cell ss:StyleID="ce1">flowering_period</Cell> <Cell ss:StyleID="ce1">flowering_period_min</Cell> <Cell ss:StyleID="ce1">flowering_period_from</Cell> <Cell ss:StyleID="ce1">flowering_period_to</Cell> <Cell ss:StyleID="ce1">flowering_period_max</Cell> <Cell ss:StyleID="ce1">altitudinal_zone</Cell> <Cell ss:StyleID="ce1">altitudinal_zone_min</Cell> <Cell ss:StyleID="ce1">altitudinal_zone_from</Cell> <Cell ss:StyleID="ce1">altitudinal_zone_to</Cell> <Cell ss:StyleID="ce1">altitudinal_zone_max</Cell> <Cell ss:StyleID="ce1">occurrence_status</Cell> <Cell ss:StyleID="ce1">floristic_regions</Cell> <Cell ss:StyleID="ce1">floristic_zones</Cell> </Row> <xsl:for-each select="following-sibling::Lead"> <xsl:call-template name="lead_as_table_row"> <xsl:with-param name="lead_parameter_nodes" select="."/> </xsl:call-template> </xsl:for-each>
 </ss:Worksheet>

</xsl:template>

 <xsl:template match="@*|node()">
   <xsl:copy>
     <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
 </xsl:template>
 <xsl:variable name="apos" select='"'"'/>
 <xsl:variable name="rsquo" select='"’"'/>
 <xsl:variable name="alphabetic" 
             select="'abcdefghijklmnopqrstuvwxyz'"/>
 <xsl:variable name="ALPHABETIC" 
             select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
 <xsl:variable name="abc2integer">a:1;b:2;c:3;d:4;e:5;f:6;g:7;h:8;i:9;j:10;k:11;l:12;m:13;n:14;o:15;p:16;q:17;r:18;s:19;t:20;u:21;v:22;w:23;x:24;y:25;z:26;</xsl:variable>
 <xsl:variable name="ABC2integer">A:1;B:2;C:3;D:4;E:5;F:6;G:7;H:8;I:9;J:10;K:11;L:12;M:13;N:14;O:15;P:16;Q:17;R:18;S:19;T:20;U:21;V:22;W:23;X:24;Y:25;Z:26;</xsl:variable>
 <xsl:template name="number_parent_lead" match="Lead/parentlead">
   Test numbering: <xsl:value-of select="descendant-or-self::parentlead" />
   
<xsl:number format="1." level="multiple" count="parentlead"/> </xsl:template> <xsl:template name="remove_string_from_to"> <xsl:param name="string"/> <xsl:param name="remove_from"/> <xsl:param name="remove_to"/> <xsl:choose> <xsl:when test="contains($string, $remove_from)"> <xsl:value-of select="substring-before($string, $remove_from)" /> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="remove_to" select="$remove_to"/> <xsl:with-param name="remove_from" select="$remove_from"/> <xsl:with-param name="string" select="substring-after($string, $remove_to)"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="remove_any_tag"> <xsl:param name="text" /> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" select="$text"/> <xsl:with-param name="remove_from" select="'<'"/> <xsl:with-param name="remove_to" select="'>'"/> </xsl:call-template> </xsl:template> <xsl:template name="remove_translate_tags"> <xsl:param name="text" /> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" select="$text"/> <xsl:with-param name="remove_from" select="'<translate><!--T:'"/> <xsl:with-param name="remove_to" select="'--> '"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'</translate'"/> <xsl:with-param name="remove_to" select="'>'"/> </xsl:call-template> </xsl:template> <xsl:template name="translate_decision_code_to_indexnumber"> <xsl:param name="text" /> <xsl:variable name="this_presumed_number"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" > <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" > <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" select="$text"/> <xsl:with-param name="remove_from" select="'('"/> <xsl:with-param name="remove_to" select="')'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="$rsquo"/> <xsl:with-param name="remove_to" select="$rsquo"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="$apos"/> <xsl:with-param name="remove_to" select="$apos"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'*'"/> <xsl:with-param name="remove_to" select="'*'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'–'"/> <xsl:with-param name="remove_to" select="'–'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'-'"/> <xsl:with-param name="remove_to" select="'-'"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="number($this_presumed_number)=$this_presumed_number"> <xsl:value-of select="$this_presumed_number"/> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="string-length(translate($this_presumed_number, $alphabetic, )) = 0"> <xsl:value-of select="substring-before(substring-after($abc2integer, concat($this_presumed_number,':')),';')"/> </xsl:when> <xsl:when test="string-length(translate($this_presumed_number, $ALPHABETIC, )) = 0"> <xsl:value-of select="substring-before(substring-after($ABC2integer, concat($this_presumed_number,':')),';')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$this_presumed_number"/> (debug info: case not considered yet. Is it numeric or alphabetic?) </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="get_clean_decision_code"> <xsl:param name="text" /> <xsl:variable name="this_presumed_decision_code"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" > <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" > <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" select="$text"/> <xsl:with-param name="remove_from" select="'('"/> <xsl:with-param name="remove_to" select="')'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="$rsquo"/> <xsl:with-param name="remove_to" select="$rsquo"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="$apos"/> <xsl:with-param name="remove_to" select="$apos"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'*'"/> <xsl:with-param name="remove_to" select="'*'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'–'"/> <xsl:with-param name="remove_to" select="'–'"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="remove_from" select="'-'"/> <xsl:with-param name="remove_to" select="'-'"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$this_presumed_decision_code" /> </xsl:template> <xsl:template name="get_clean_decision_alternative_code"> <xsl:param name="text" /> <xsl:variable name="this_clean_decision_alternative_code"> <xsl:call-template name="remove_string_from_to"> <xsl:with-param name="string" select="$text"/> <xsl:with-param name="remove_from" select="'('"/> <xsl:with-param name="remove_to" select="')'"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$this_clean_decision_alternative_code"/> </xsl:template>
 <xsl:template name="get_split_fragment_by_separator">
   <xsl:param name="separator"/>
   <xsl:param name="index"/>
   
   <xsl:param name="startfragment"/>
   <xsl:param name="restfragment"/>
   
   <xsl:choose>
     <xsl:when test="$index < 2">
       <xsl:choose>
         <xsl:when test="string-length($restfragment)">
           <xsl:choose>
             <xsl:when test="substring-before($restfragment, $separator)">
               <xsl:value-of select="substring-before($restfragment, $separator)"/>
             </xsl:when>
             <xsl:otherwise>
               <xsl:choose>
                 <xsl:when test="starts-with($restfragment, $separator)">
                   <xsl:value-of select="substring-before($restfragment, $separator)" />
                 </xsl:when>
                 <xsl:otherwise>
                   <xsl:value-of select="$restfragment"/>
                 </xsl:otherwise>
               </xsl:choose>
             </xsl:otherwise>
           </xsl:choose>
         </xsl:when>
         <xsl:otherwise>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
     <xsl:when test="contains($restfragment,$separator)">
       <xsl:call-template name="get_split_fragment_by_separator">
         <xsl:with-param name="startfragment" select="concat($startfragment,substring-before($restfragment,$separator),$separator)"/>
         <xsl:with-param name="restfragment" select="substring-after($restfragment,$separator)"/>
         <xsl:with-param name="separator" select="$separator"/>
         <xsl:with-param name="index" select="$index - 1"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 <xsl:template name="lead_as_table_row">
   <xsl:param name="lead_parameter_nodes"/>
   <xsl:variable name="debug_current_value" select="."/>
   <Row>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/Feld_1">
         <Cell>
           <xsl:choose>
             <xsl:when test="$lead_parameter_nodes/parentlead">
               <xsl:call-template name="translate_decision_code_to_indexnumber">
             <xsl:with-param name="text" select="$lead_parameter_nodes/parentlead"/>
           </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
               <xsl:call-template name="translate_decision_code_to_indexnumber">
                 <xsl:with-param name="text" select="$lead_parameter_nodes/Feld_1"/>
               </xsl:call-template>
             </xsl:otherwise>
           </xsl:choose>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/Feld_1">
         <Cell>
           <xsl:variable name="current_clean_decision_code">
             <xsl:choose>
               <xsl:when test="$lead_parameter_nodes/parentlead">
                 <xsl:call-template name="get_clean_decision_code">
                   <xsl:with-param name="text" select="$lead_parameter_nodes/parentlead"/>
                 </xsl:call-template>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:call-template name="get_clean_decision_code">
                   <xsl:with-param name="text" select="$lead_parameter_nodes/Feld_1"/>
                 </xsl:call-template>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:variable>
           <xsl:value-of select="count(preceding-sibling::*/descendant-or-self::Feld_1[starts-with(node(), $current_clean_decision_code)]) + count(./descendant-or-self::Feld_1[starts-with(node(), $current_clean_decision_code)])" />
        </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <Cell><xsl:choose><xsl:when test="$lead_parameter_nodes/nested">0</xsl:when><xsl:otherwise><xsl:choose><xsl:when test="$lead_parameter_nodes/parentlead"><xsl:variable name="current_nested_decision_number"><xsl:call-template name="translate_decision_code_to_indexnumber"><xsl:with-param name="text" select="$lead_parameter_nodes/Feld_1"/></xsl:call-template></xsl:variable><xsl:value-of select="$current_nested_decision_number"/></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/parentlead">
         <Cell>
           <xsl:variable name="this_clean_decision_code_by_parentlead">
             <xsl:call-template name="get_clean_decision_code">
               <xsl:with-param name="text" select="$lead_parameter_nodes/Feld_1"/>
             </xsl:call-template>
           </xsl:variable>
           
           <xsl:value-of select="count(preceding-sibling::*[1]/descendant-or-self::*[name()='Feld_1']/../Feld_1[starts-with(node(), $this_clean_decision_code_by_parentlead)]) + 1"/>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/Feld_3 and not($lead_parameter_nodes/parentlead)">
         <Cell>
           <xsl:call-template name="translate_decision_code_to_indexnumber">
             <xsl:with-param name="text" select="$lead_parameter_nodes/Feld_3"/>
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/Feld_1">
         <Cell><xsl:value-of select="$lead_parameter_nodes/Feld_1"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/Feld_3">
         <Cell><xsl:value-of select="$lead_parameter_nodes/Feld_3"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/Feld_2">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/Feld_2"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/remarks">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/remarks"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/occurrence">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/occurrence"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/description">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/description"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/result">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/result"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/result_text">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/result_text"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/result_id">
         <Cell><xsl:value-of select="$lead_parameter_nodes/result_id"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/scientific_name">
         <Cell><xsl:value-of select="$lead_parameter_nodes/scientific_name"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/synonyms">
         <Cell><xsl:value-of select="$lead_parameter_nodes/synonyms"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/common_names">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/common_names"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/subheading">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/subheading"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_a">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_a"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_a">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_a"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_a">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_a"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_b">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_b"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_b">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_b"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_b">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_b"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_c">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_c"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_c">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_c"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_c">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_c"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_d">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_d"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_d">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_d"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_d">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_d"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_e">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_e"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_e">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_e"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_e">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_e"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_j">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_j"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_j">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_j"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_j">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_j"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_k">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_k"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_k">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_k"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_k">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_k"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_m">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_m"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_m">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_m"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_m">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_m"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_n">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_n"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_n">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_n"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_n">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_n"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_o">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_o"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_o">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_o"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_o">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_o"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_p">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_p"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_p">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_p"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_p">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_p"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_q">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_q"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_q">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_q"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_q">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_q"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/image_r">
         <Cell><xsl:value-of select="$lead_parameter_nodes/image_r"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/caption_r">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/caption_r"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/label_r">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/label_r"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/captionlines">
         <Cell><xsl:value-of select="$lead_parameter_nodes/captionlines"/></Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/plant_height">
         <xsl:value-of select="$lead_parameter_nodes/plant_height"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:comment>kein plant_height</xsl:comment>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/plant_height_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'1'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/plant_height_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/plant_height_min">
             <xsl:value-of select="$lead_parameter_nodes/plant_height_min"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein plant_height_min</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/plant_height_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'2'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/plant_height_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/plant_height_from">
             <xsl:value-of select="$lead_parameter_nodes/plant_height_from"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein plant_height_from</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/plant_height_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'3'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/plant_height_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/plant_height_to">
             <xsl:value-of select="$lead_parameter_nodes/plant_height_to"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein plant_height_to</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/plant_height_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'4'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/plant_height_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/plant_height_max">
             <xsl:value-of select="$lead_parameter_nodes/plant_height_max"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein plant_height_max</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/plant_height_formula_min-from-to-max">
         <xsl:variable name="this_plant_height_unit">
           <xsl:call-template name="get_split_fragment_by_separator">
             <xsl:with-param name="separator" select="'/'"/>
             <xsl:with-param name="index" select="'5'"/>
             <xsl:with-param name="startfragment" select=""/>
             <xsl:with-param name="restfragment" select="$lead_parameter_nodes/plant_height_formula_min-from-to-max"/>
           </xsl:call-template>
         </xsl:variable>
         
         <xsl:choose>
           <xsl:when test="$this_plant_height_unit">
             <xsl:value-of select="$this_plant_height_unit"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:choose>
               <xsl:when test="$lead_parameter_nodes/plant_height_unit">
                 <xsl:value-of select="$lead_parameter_nodes/plant_height_unit"/>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:comment>kein plant_height_unit</xsl:comment>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/plant_height_unit">
             <xsl:value-of select="$lead_parameter_nodes/plant_height_unit"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein plant_height_unit</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/organism_size">
           <xsl:value-of select="$lead_parameter_nodes/organism_size"/>
       </xsl:when>
       <xsl:otherwise><xsl:comment>kein organism_size</xsl:comment></xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/organism_size_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'1'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/organism_size_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/organism_size_min">
             <xsl:value-of select="$lead_parameter_nodes/organism_size_min"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein organism_size_min</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/organism_size_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'2'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/organism_size_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/organism_size_from">
             <xsl:value-of select="$lead_parameter_nodes/organism_size_from"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein organism_size_from</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/organism_size_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'3'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/organism_size_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/organism_size_to">
             <xsl:value-of select="$lead_parameter_nodes/organism_size_to"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein organism_size_to</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/organism_size_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'4'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/organism_size_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/organism_size_max">
             <xsl:value-of select="$lead_parameter_nodes/organism_size_max"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein organism_size_max</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/organism_size_formula_min-from-to-max">
         <xsl:variable name="this_organism_size_unit">
           <xsl:call-template name="get_split_fragment_by_separator">
             <xsl:with-param name="separator" select="'/'"/>
             <xsl:with-param name="index" select="'5'"/>
             <xsl:with-param name="startfragment" select=""/>
             <xsl:with-param name="restfragment" select="$lead_parameter_nodes/organism_size_formula_min-from-to-max"/>
           </xsl:call-template>
         </xsl:variable>
         
         <xsl:choose>
           <xsl:when test="$this_organism_size_unit">
             <xsl:value-of select="$this_organism_size_unit"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:choose>
               <xsl:when test="$lead_parameter_nodes/organism_size_unit">
                 <xsl:value-of select="$lead_parameter_nodes/organism_size_unit"/>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:comment>kein organism_size_unit</xsl:comment>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/organism_size_unit">
             <xsl:value-of select="$lead_parameter_nodes/organism_size_unit"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein organism_size_unit</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/flowering_period">
           <xsl:value-of select="$lead_parameter_nodes/flowering_period"/>
       </xsl:when>
       <xsl:otherwise><xsl:comment>kein flowering_period</xsl:comment></xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/flowering_period_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'1'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/flowering_period_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/flowering_period_min">
             <xsl:value-of select="$lead_parameter_nodes/flowering_period_min"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein flowering_period_min</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/flowering_period_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'2'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/flowering_period_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/flowering_period_from">
             <xsl:value-of select="$lead_parameter_nodes/flowering_period_from"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein flowering_period_from</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/flowering_period_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'3'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/flowering_period_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/flowering_period_to">
             <xsl:value-of select="$lead_parameter_nodes/flowering_period_to"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein flowering_period_to</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/flowering_period_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'4'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/flowering_period_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/flowering_period_max">
             <xsl:value-of select="$lead_parameter_nodes/flowering_period_max"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein flowering_period_max</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/altitudinal_zone">
           <xsl:value-of select="$lead_parameter_nodes/altitudinal_zone"/>
       </xsl:when>
       <xsl:otherwise><xsl:comment>kein altitudinal_zone</xsl:comment></xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'1'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/altitudinal_zone_min">
             <xsl:value-of select="$lead_parameter_nodes/altitudinal_zone_min"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein altitudinal_zone_min</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'2'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/altitudinal_zone_from">
             <xsl:value-of select="$lead_parameter_nodes/altitudinal_zone_from"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein altitudinal_zone_from</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'3'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/altitudinal_zone_to">
             <xsl:value-of select="$lead_parameter_nodes/altitudinal_zone_to"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein altitudinal_zone_to</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
         <Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max">
         <xsl:call-template name="get_split_fragment_by_separator">
           <xsl:with-param name="separator" select="'/'"/>
           <xsl:with-param name="index" select="'4'"/>
           <xsl:with-param name="startfragment" select=""/>
           <xsl:with-param name="restfragment" select="$lead_parameter_nodes/altitudinal_zone_formula_min-from-to-max"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <xsl:when test="$lead_parameter_nodes/altitudinal_zone_max">
             <xsl:value-of select="$lead_parameter_nodes/altitudinal_zone_max"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:comment>kein altitudinal_zone_max</xsl:comment>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:otherwise>
     </xsl:choose>
         </Cell>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/occurrence_status">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/occurrence_status"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/floristic_regions">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/floristic_regions"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$lead_parameter_nodes/floristic_zones">
         <Cell>
           <xsl:call-template name="remove_translate_tags" > 
             <xsl:with-param name="text" select="$lead_parameter_nodes/floristic_zones"/> 
           </xsl:call-template>
         </Cell>
       </xsl:when>
       <xsl:otherwise><Cell></Cell></xsl:otherwise>
     </xsl:choose>
   </Row>
 </xsl:template>

</xsl:stylesheet>