-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:siha="http://www.a-sit.at/siha" xmlns:fo="http://www.w3.org/1999/XSL/Format">
-<!--
 
    ************************************************************
    ** fo/content.xsl
    ************************************************************
   
-->
-<xsl:template name="createContent">
<xsl:apply-templates mode="content" select="//siha:chapter"/>
</xsl:template>
-<!--
 
    ************************************************************
    ** prolog (chapter 1)
    ************************************************************
   
-->
-<xsl:template match="siha:chapter[1]" mode="content">
-<!--
  wenn 1.Kapitel eine nummerierung dann wahrscheinlich kein vorwort ...  
-->
-<xsl:if test="//siha:chapter[1]/siha:title/siha:ordinal">
<xsl:call-template name="createChapter"/>
</xsl:if>
</xsl:template>
-<!--
 
    ************************************************************
    ** content (chapter >1)
    ************************************************************
   
-->
-<xsl:template match="siha:chapter" mode="content">
<xsl:call-template name="createChapter"/>
</xsl:template>
-<xsl:template name="createChapter">
-<fo:block xsl:use-attribute-sets="div1.style">
-<fo:block xsl:use-attribute-sets="h1.style">
-<xsl:call-template name="setAnchor">
<xsl:with-param name="anchor.name" select="'CHAPTER '"/>
<xsl:with-param name="anchor.ordinal"/>
</xsl:call-template>
</fo:block>
<xsl:apply-templates mode="content" select="node()"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** section
    ************************************************************
   
-->
-<xsl:template match="siha:section" mode="content">
-<fo:block xsl:use-attribute-sets="h2.style">
-<xsl:call-template name="setAnchor">
<xsl:with-param name="anchor.name" select="'SECTION '"/>
-<xsl:with-param name="anchor.ordinal">
<xsl:call-template name="setOrdinalSection"/>
</xsl:with-param>
</xsl:call-template>
</fo:block>
-<fo:block xsl:use-attribute-sets="div2.style">
<xsl:apply-templates mode="content" select="node()"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** subsection
    ************************************************************
   
-->
-<xsl:template match="siha:subsection" mode="content">
-<fo:block xsl:use-attribute-sets="div3.style">
-<fo:block xsl:use-attribute-sets="h3.style">
-<xsl:call-template name="setAnchor">
<xsl:with-param name="anchor.name" select="'SUBSECTION '"/>
-<xsl:with-param name="anchor.ordinal">
<xsl:call-template name="setOrdinalSubsection"/>
</xsl:with-param>
</xsl:call-template>
</fo:block>
<xsl:apply-templates mode="content" select="node()"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** topic
    ************************************************************
   
-->
-<xsl:template match="siha:topic" mode="content">
-<fo:block xsl:use-attribute-sets="div3.style">
-<fo:block xsl:use-attribute-sets="h3.style">
<xsl:call-template name="setAnchorTopic"/>
</fo:block>
<xsl:apply-templates mode="content" select="node()"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** subsubsection
    ************************************************************
   
-->
-<xsl:template match="siha:subsubsection" mode="content">
-<fo:block xsl:use-attribute-sets="div4.style">
-<fo:block xsl:use-attribute-sets="h4.style">
-<xsl:call-template name="setAnchor">
<xsl:with-param name="anchor.name" select="'SUBSECTION '"/>
-<xsl:with-param name="anchor.ordinal">
<xsl:call-template name="setOrdinalSubsubsection"/>
</xsl:with-param>
</xsl:call-template>
</fo:block>
<xsl:apply-templates mode="content" select="node()"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** paragraph
    ************************************************************
   
-->
-<xsl:template match="siha:paragraph" mode="content">
-<fo:block xsl:use-attribute-sets="div2.style">
-<fo:block xsl:use-attribute-sets="h2.style">
<xsl:call-template name="setTitle"/>
</fo:block>
<xsl:apply-templates mode="content" select="node()"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** title
    ************************************************************
   
-->
<xsl:template match="siha:title" mode="content"/>
-<!--
 
    ************************************************************
    **  detailed
    ************************************************************
   
-->
-<xsl:template match="siha:detailed" mode="content">
-<fo:block xsl:use-attribute-sets="div4.style">
-<xsl:if test="$debug.mode='on'">
<xsl:attribute name="color">green</xsl:attribute>
<xsl:attribute name="border-color">green</xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="border-width">thin</xsl:attribute>
</xsl:if>
<xsl:apply-templates mode="content"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** abstract
    ************************************************************
   
-->
-<xsl:template match="siha:abstract" mode="content">
-<fo:block xsl:use-attribute-sets="abstract.style">
<xsl:apply-templates mode="content"/>
</fo:block>
</xsl:template>
-<!--
 
    ************************************************************
    ** emphasize
    ************************************************************
   
-->
-<xsl:template match="siha:emphasize" mode="content">
-<xsl:choose>
-<xsl:when test="@level='0' ">
-<fo:inline xsl:use-attribute-sets="level.0.style">
<xsl:apply-templates mode="content"/>
</fo:inline>
</xsl:when>
-<xsl:when test="@level='1' ">
-<fo:inline xsl:use-attribute-sets="level.1.style">
<xsl:apply-templates mode="content"/>
</fo:inline>
</xsl:when>
-<xsl:when test="@level='2' ">
-<fo:block xsl:use-attribute-sets="level.2.style">
<xsl:apply-templates mode="content"/>
</fo:block>
</xsl:when>
-<!--
  level 3 for new entries  
-->
-<xsl:when test="@level='3' ">
-<fo:block xsl:use-attribute-sets="level.3.style">
<xsl:apply-templates mode="content"/>
</fo:block>
</xsl:when>
</xsl:choose>
</xsl:template>
-<!--
  cut off role-details inside an item or appendix environment  
-->
<xsl:template match="siha:appendix/siha:topic/siha:role | siha:appendix/siha:role" mode="content"/>
-<xsl:template match="siha:role" mode="content">
-<xsl:if test="not(count(child::*)=0)">
-<fo:block xsl:use-attribute-sets="role.style">
<fo:inline xsl:use-attribute-sets="b.style">Relevanz:</fo:inline>
<xsl:apply-templates mode="content" select="siha:management"/>
<xsl:apply-templates mode="content" select="siha:maintenance"/>
<xsl:apply-templates mode="content" select="siha:user"/>
<xsl:apply-templates mode="content" select="siha:client"/>
</fo:block>
</xsl:if>
</xsl:template>
-<xsl:template match="siha:link" mode="content">
-<xsl:choose>
-<!--
  IKT-Board  
-->
-<xsl:when test="child::siha:iktboard">
[
<xsl:value-of select="child::siha:iktboard/siha:gegenstand"/>
]
</xsl:when>
-<!--
  LAW  
-->
-<xsl:when test="child::siha:law">
<xsl:value-of select="child::siha:law/siha:name"/>
-<xsl:if test="boolean(child::siha:law/siha:shortname)">
<xsl:text> (</xsl:text>
<xsl:value-of select="child::siha:law/siha:shortname"/>
<xsl:text>)</xsl:text>
</xsl:if>
-<xsl:if test="boolean(child::siha:law/siha:index)">
<xsl:text>, </xsl:text>
<xsl:value-of select="child::siha:law/siha:index"/>
<xsl:text> idgF,</xsl:text>
</xsl:if>
</xsl:when>
-<!--
  href  
-->
-<xsl:when test="child::siha:href">
<xsl:value-of select="child::siha:href/siha:name"/>
-<xsl:if test="boolean(child::siha:href/siha:shortname)">
<xsl:text> (</xsl:text>
<xsl:value-of select="child::siha:href/siha:shortname"/>
<xsl:text>)</xsl:text>
</xsl:if>
</xsl:when>
-<!--
  internal references  
-->
-<xsl:when test="child::siha:intern">
<xsl:value-of select="child::siha:intern/siha:name"/>
</xsl:when>
-<!--
  other links  
-->
-<xsl:when test="child::siha:otherlink">
<xsl:value-of select="child::siha:otherlink/siha:name"/>
-<xsl:if test="boolean(child::siha:otherlink/siha:shortname)">
<xsl:text> [</xsl:text>
<xsl:value-of select="child::siha:otherlink/siha:shortname"/>
<xsl:text>]</xsl:text>
</xsl:if>
-<xsl:if test="boolean(child::siha:otherlink/siha:index)">
<xsl:text>, </xsl:text>
<xsl:value-of select="child::siha:otherlink/siha:index"/>
<xsl:text>,</xsl:text>
</xsl:if>
-<xsl:if test="boolean(child::siha:otherlink/siha:version)">
<xsl:text> (</xsl:text>
<xsl:value-of select="child::siha:otherlink/siha:version"/>
<xsl:text>),</xsl:text>
</xsl:if>
</xsl:when>
-<!--
  literature  
-->
-<xsl:when test="child::siha:literature">
<xsl:value-of select="child::siha:literature/siha:name"/>
-<xsl:if test="boolean(child::siha:literature/siha:index)">
<xsl:text> [</xsl:text>
<xsl:value-of select="child::siha:literature/siha:index"/>
<xsl:text>]</xsl:text>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:template>
-<!--
 
    <xsl:template match="siha:management | siha:maintenance | siha:user | siha:client" mode="content">
    <xsl:if test="@type='INTERN' or @type='EXTERN'"> Management;</xsl:if>
    </xsl:template>
   
-->
-<xsl:template match="siha:management" mode="content">
<xsl:if test="@type='SET'"> Management;</xsl:if>
</xsl:template>
-<xsl:template match="siha:maintenance" mode="content">
<xsl:if test="@type='SET'"> Umsetzung/Wartung;</xsl:if>
</xsl:template>
-<xsl:template match="siha:user" mode="content">
<xsl:if test="@type='SET'"> Anwender/innen;</xsl:if>
</xsl:template>
-<xsl:template match="siha:client" mode="content">
<xsl:if test="@type='SET'">Kundin/ Kunde;</xsl:if>
</xsl:template>
-<!--
   <xsl:template match="*" mode="content"/> 
-->
-<!--
 
    ************************************************************
    ** trap-doors mode="toc"
    ************************************************************
   
-->
<xsl:template match="siha:meta" mode="content"/>
<xsl:template match="siha:source" mode="content"/>
-<!--
 
    ************************************************************
    ** new attribute
    ************************************************************
   
-->
-<xsl:template name="addNewSection">
-<xsl:choose>
-<xsl:when test="@class">
<xsl:apply-templates select="node()" mode="content"/>
</xsl:when>
-<xsl:otherwise>
<xsl:apply-templates select="node()" mode="content"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>