-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:siha="http://www.a-sit.at/siha">
-<!--
 
  ************************************************************
  ** file contains definition for the common elements  
  ** fo/common.xsl
  ************************************************************
   
-->
-<!--
 
    ************************************************************
    ** set title
    ************************************************************
   
-->
-<xsl:template name="setTitle">
<xsl:value-of select="siha:title/siha:name"/>
</xsl:template>
-<!--
 
    ************************************************************
    ** set ordinal(s)
    ************************************************************
   
-->
-<xsl:template name="setOrdinal">
<xsl:value-of select="siha:title/siha:ordinal"/>
</xsl:template>
-<!--
  set ordinal section  
-->
-<xsl:template name="setOrdinalSection">
<xsl:value-of select="ancestor::siha:chapter/siha:title/siha:ordinal"/>
<xsl:value-of select="ancestor::siha:appendix/siha:title/siha:ordinal"/>
<xsl:text>.</xsl:text>
</xsl:template>
-<!--
  set ordinal subsection  
-->
-<xsl:template name="setOrdinalSubsection">
<xsl:call-template name="setOrdinalSection"/>
<xsl:value-of select="ancestor::siha:section/siha:title/siha:ordinal"/>
<xsl:text>.</xsl:text>
</xsl:template>
-<!--
  set ordinal subsubsection  
-->
-<xsl:template name="setOrdinalSubsubsection">
<xsl:call-template name="setOrdinalSubsection"/>
<xsl:value-of select="ancestor::siha:subsection/siha:title/siha:ordinal"/>
<xsl:text>.</xsl:text>
</xsl:template>
-<!--
  set ordinal topic  
-->
-<xsl:template name="setOrdinalTopic">
<xsl:value-of select="@prefix"/>
<xsl:text> </xsl:text>
-<xsl:choose>
-<!--
  automatische Indizierung  für den Link  
-->
-<xsl:when test="not(boolean(@ordinal))">
<xsl:value-of select="ancestor::siha:section/@ordinal"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="count(ancestor::siha:topic)+1"/>
</xsl:when>
-<xsl:when test="boolean(@ordinal)">
<xsl:value-of select="@ordinal"/>
</xsl:when>
</xsl:choose>
</xsl:template>
-<!--
 
    ************************************************************
    ** set anchor(s)
    ************************************************************
   
-->
-<!--
  set default anchor  
-->
-<xsl:template name="setAnchor">
<xsl:param name="anchor.name"/>
<xsl:param name="anchor.ordinal"/>
-<fo:inline keep-with-next.within-line="always">
<xsl:value-of select="$anchor.ordinal"/>
<xsl:call-template name="setOrdinal"/>
<xsl:text> </xsl:text>
<xsl:call-template name="setTitle"/>
</fo:inline>
</xsl:template>
-<!--
  set anchor topic  
-->
-<xsl:template name="setAnchorTopic">
-<fo:inline keep-with-next.within-line="always">
<xsl:call-template name="setOrdinalTopic"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
</fo:inline>
</xsl:template>
-<!--
 
    ************************************************************
    ** set reference(s)
    ************************************************************
   
-->
-<!--
  set default reference  
-->
-<xsl:template name="setReference">
<xsl:param name="ref.name"/>
<xsl:param name="ref.ordinal"/>
-<fo:inline keep-with-next.within-line="always">
<xsl:value-of select="$ref.ordinal"/>
<xsl:call-template name="setOrdinal"/>
<xsl:text> </xsl:text>
<xsl:call-template name="setTitle"/>
</fo:inline>
-<fo:inline keep-together.within-line="always">
<xsl:text> </xsl:text>
<fo:leader leader-pattern="dots" keep-with-next.within-line="always"/>
<xsl:text> </xsl:text>
-<!--
 
      <fo:basic-link internal-destination="{$id}">
        <fo:page-number-citation ref-id="{$id}"/>
      </fo:basic-link>
 
-->
</fo:inline>
</xsl:template>
-<!--
  set reference topic  
-->
-<xsl:template name="setRefTopic">
-<fo:inline keep-with-next.within-line="always">
<xsl:call-template name="setOrdinalTopic"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
</fo:inline>
-<fo:inline keep-together.within-line="always">
<xsl:text> </xsl:text>
<fo:leader leader-pattern="dots" keep-with-next.within-line="always"/>
<xsl:text> </xsl:text>
-<!--
 
      <fo:basic-link internal-destination="{$id}">
        <fo:page-number-citation ref-id="{$id}"/>
      </fo:basic-link>
 
-->
</fo:inline>
</xsl:template>
-<!--
  set reference appendix  
-->
-<xsl:template name="setRefAppendix">
-<fo:inline keep-with-next.within-line="always">
<xsl:text>Anhang </xsl:text>
<xsl:call-template name="setOrdinal"/>
<xsl:text>: </xsl:text>
<xsl:call-template name="setTitle"/>
</fo:inline>
-<fo:inline keep-together.within-line="always">
<xsl:text> </xsl:text>
<fo:leader leader-pattern="dots" keep-with-next.within-line="always"/>
<xsl:text> </xsl:text>
-<!--
 
      <fo:basic-link internal-destination="{$id}">
        <fo:page-number-citation ref-id="{$id}"/>
      </fo:basic-link>
 
-->
</fo:inline>
</xsl:template>
</xsl:stylesheet>