Guest User

ISVU Supplemet

a guest
Aug 29th, 2014
1,348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 106.07 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:supplement="http://isvu.srce.hr/supplement" exclude-result-prefixes="supplement">
  3.  
  4.     <xsl:param name="imagesBaseUrl"/>
  5.     <xsl:param name="konTekstSupplement"/>
  6.     <xsl:param name="uniLogoUrlHr"/>
  7.     <xsl:param name="uniLogoUrlEn"/>
  8.     <xsl:param name="vuLogoUrlHr"/>
  9.     <xsl:param name="vuLogoUrlEn"/>
  10.     <xsl:param name="ispisZadnjeStrane" select="'N'"/>
  11.     <!-- definicije izdvojene radi lakšeg podešavanja tijekom razvoja (bude li potrebno) -->
  12.     <!-- ako je leading 13, koliko mora biti lineHeight -->
  13.     <xsl:variable name="lineHeightForLeading13" select="'13pt'"/>
  14.     <!-- ako je leading 8.667, koliko mora biti lineHeight -->
  15.     <xsl:variable name="lineHeightForLeading87" select="'8.667pt'"/>
  16.     <!-- lineHeight u tablici ocjena-->
  17.     <xsl:variable name="lineHeightTablicaOcjena" select="if (/supplements/konfiguracija/@predmeti_font = 'small')                    then '8.667pt'                   else '13pt'"/>
  18.     <!-- koliko treba baseline spustiti ako se tekst fonta 7 prikazuje u retku visine 13pt-->
  19.     <xsl:variable name="baselineShiftFor7ptFontIn13ptline" select="'-4.33pt'"/>
  20.     <!-- lineHeight u tablici ocjena za ispis naziva "stranog" visokog učilišta -->
  21.     <xsl:variable name="lineHeightTablicaOcjenaNazivStranogVU" select="'8.667pt'"/>
  22.     <!-- debljina linije za potpis -->
  23.     <xsl:variable name="signatureLineThicknes" select="'0.25pt'"/>
  24.     <!-- zamjenski hyphenator za nepostojeci hr hyphenator -->
  25.     <xsl:variable name="replacementHyphenator" select="'cs'"/>
  26.     <!-- ispis u boji (za razvoj) -->
  27.     <xsl:variable name="ispisBoja" select="'N'"/>
  28.     <!-- vertikalni razmak izmedju grbova na desnoj strani -->
  29.     <xsl:variable name="razmakMedjuGrbovimaNaDesnojStrani" select="'5mm'"/>
  30.  
  31.     <!-- broj znakova u tekstu u 4.1 nakon kojeg se prelazi na sitniji font -->
  32.     <xsl:variable name="maxWithLargeFont" select="2500"/>
  33.  
  34.  
  35.     <!-- fizicke dimenzije papira -->
  36.     <xsl:attribute-set name="paper-dimension">
  37.         <xsl:attribute name="page-height">297mm</xsl:attribute>
  38.         <xsl:attribute name="page-width">210mm</xsl:attribute>
  39.         <xsl:attribute name="margin-left">0mm</xsl:attribute>
  40.         <xsl:attribute name="margin-right">0mm</xsl:attribute>
  41.         <xsl:attribute name="margin-top">0mm</xsl:attribute>
  42.         <xsl:attribute name="margin-bottom">0mm</xsl:attribute>
  43.     </xsl:attribute-set>
  44.  
  45.     <xsl:attribute-set name="attset-vuLogo">
  46.         <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
  47.         <xsl:attribute name="content-height">scale-down-to-fit</xsl:attribute>
  48.         <xsl:attribute name="width">89.5pt</xsl:attribute>
  49.         <xsl:attribute name="height">120pt</xsl:attribute>
  50.     </xsl:attribute-set>
  51.  
  52.     <xsl:attribute-set name="attset-uniLogo">
  53.         <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
  54.         <xsl:attribute name="content-height">scale-down-to-fit</xsl:attribute>
  55.         <xsl:attribute name="width">89.5pt</xsl:attribute>
  56.         <xsl:attribute name="height">120pt</xsl:attribute>
  57.     </xsl:attribute-set>
  58.  
  59.     <!-- set svojstava za blokove -->
  60.     <xsl:attribute-set name="attset-grbovi">
  61.         <xsl:attribute name="text-align">center</xsl:attribute>
  62.         <!-- <xsl:attribute name="background-color">lavenderblush</xsl:attribute> -->
  63.     </xsl:attribute-set>
  64.  
  65.     <xsl:attribute-set name="attset-zaglavljeBlok">
  66.         <xsl:attribute name="font-size">14.2pt</xsl:attribute>
  67.         <!-- bio <xsl:attribute name="font-size">12pt</xsl:attribute> -->
  68.         <xsl:attribute name="font-family">DiplomaSupplementCaps</xsl:attribute>
  69.         <xsl:attribute name="text-align">center</xsl:attribute>
  70.         <xsl:attribute name="line-height">17pt</xsl:attribute>
  71.         <xsl:attribute name="letter-spacing">0.95pt</xsl:attribute>
  72.         <xsl:attribute name="background-color">yellow</xsl:attribute>
  73.     </xsl:attribute-set>
  74.  
  75.     <xsl:attribute-set name="attset-fillerBlokCenter">
  76.         <!-- prije izmjene padding top je bio 1pt, trazilo se spustanje za 0.7mm, 1mm=2.817pt -->
  77.         <xsl:attribute name="padding-top">3pt</xsl:attribute>
  78.         <xsl:attribute name="text-align">center</xsl:attribute>
  79.         <xsl:attribute name="padding-bottom">1pt</xsl:attribute>
  80.         <xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
  81.         <xsl:attribute name="space-before.maximum">200pt</xsl:attribute>
  82.         <xsl:attribute name="space-before.optimum">120pt</xsl:attribute>
  83.         <xsl:attribute name="space-after.minimum">0pt</xsl:attribute>
  84.         <xsl:attribute name="space-after.maximum">200pt</xsl:attribute>
  85.         <xsl:attribute name="space-after.optimum">120pt</xsl:attribute>
  86.         <!-- <xsl:attribute name="background-color">pink</xsl:attribute>-->
  87.     </xsl:attribute-set>
  88.  
  89.     <!--  KORISTI SE UMJESTO SLIKE -->
  90.     <xsl:attribute-set name="attset-naslovBlok" use-attribute-sets="attset-fillerBlokCenter">
  91.         <xsl:attribute name="font-size">22pt</xsl:attribute>
  92.         <!-- bio <xsl:attribute name="font-size">19pt</xsl:attribute> -->
  93.         <xsl:attribute name="font-family">TimesNewRoman</xsl:attribute>
  94.         <!-- ORIGINAL <xsl:attribute name="font-family">DiplomaSupplementCaps</xsl:attribute> -->
  95.         <xsl:attribute name="text-align">center</xsl:attribute>
  96.         <xsl:attribute name="line-height">27pt</xsl:attribute>
  97.         <xsl:attribute name="letter-spacing">2.2pt</xsl:attribute>
  98.         <xsl:attribute name="color">rgb(180,0,20)</xsl:attribute>
  99.         <xsl:attribute name="padding-bottom">2pt</xsl:attribute>
  100.         <!-- <xsl:attribute name="background-color">pink</xsl:attribute> -->
  101.     </xsl:attribute-set>
  102.  
  103.     <xsl:attribute-set name="attset-lijevoZaglavljeBlokContainer">
  104.         <xsl:attribute name="position">absolute</xsl:attribute>
  105.         <xsl:attribute name="top">42pt</xsl:attribute>
  106.         <xsl:attribute name="left">35pt</xsl:attribute>
  107.         <xsl:attribute name="height">196pt</xsl:attribute>
  108.         <xsl:attribute name="width">87pt</xsl:attribute>
  109.     </xsl:attribute-set>
  110.  
  111.     <xsl:attribute-set name="attset-zaglavljeBlokContainer">
  112.         <xsl:attribute name="position">absolute</xsl:attribute>
  113.         <xsl:attribute name="top">42pt</xsl:attribute>
  114.         <!-- ORIGINAL: <xsl:attribute name="left">132pt</xsl:attribute> -->
  115.         <xsl:attribute name="left">70pt</xsl:attribute>
  116.         <!-- ORIGINAL: <xsl:attribute name="height">196pt</xsl:attribute> -->
  117.         <xsl:attribute name="height">196pt</xsl:attribute>
  118.         <xsl:attribute name="width">455pt</xsl:attribute>
  119.     </xsl:attribute-set>
  120.  
  121.     <xsl:attribute-set name="attset-desnoZaglavljeBlokContainer">
  122.         <xsl:attribute name="position">absolute</xsl:attribute>
  123.         <xsl:attribute name="top">42pt</xsl:attribute>
  124.         <xsl:attribute name="left">471pt</xsl:attribute>
  125.         <!--ORIG<xsl:attribute name="height">196pt</xsl:attribute>-->
  126.         <xsl:attribute name="height">240pt</xsl:attribute>
  127.         <xsl:attribute name="width">89.5pt</xsl:attribute>
  128.     </xsl:attribute-set>
  129.  
  130.     <xsl:attribute-set name="attset-normalTekst">
  131.         <xsl:attribute name="font-size">6pt</xsl:attribute>
  132.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  133.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  134.         <xsl:attribute name="line-height" select="$lineHeightForLeading87"/>
  135.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'limegreen' else 'black'"/>
  136.     </xsl:attribute-set>
  137.  
  138.     <!-- ime i prezime na naslovnici -->
  139.     <xsl:attribute-set name="attset-subtitle0Tekst" use-attribute-sets="attset-normalTekst">
  140.         <xsl:attribute name="font-size">22pt</xsl:attribute>
  141.         <!--<xsl:attribute name="font-family">TimesNewRoman</xsl:attribute> -->
  142.         <xsl:attribute name="text-align">center</xsl:attribute>
  143.         <xsl:attribute name="margin-left">10pt</xsl:attribute>
  144.         <xsl:attribute name="margin-right">10pt</xsl:attribute>
  145.     </xsl:attribute-set>
  146.  
  147.     <!-- ostali podaci na naslovnici -->
  148.     <xsl:attribute-set name="attset-subtitle1Tekst" use-attribute-sets="attset-normalTekst">
  149.         <xsl:attribute name="font-size">14pt</xsl:attribute>
  150.         <!--<xsl:attribute name="font-family">TimesNewRoman</xsl:attribute>-->
  151.         <xsl:attribute name="text-align">center</xsl:attribute>
  152.         <xsl:attribute name="margin-left">10pt</xsl:attribute>
  153.         <xsl:attribute name="margin-right">10pt</xsl:attribute>
  154.         <xsl:attribute name="margin-top">10pt</xsl:attribute>
  155.         <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
  156.     </xsl:attribute-set>
  157.  
  158.     <xsl:attribute-set name="attset-labele">
  159.         <xsl:attribute name="font-size">6pt</xsl:attribute>
  160.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  161.         <xsl:attribute name="line-height" select="$lineHeightForLeading13"/>
  162.     </xsl:attribute-set>
  163.  
  164.     <xsl:attribute-set name="attset-labeleRazine1" use-attribute-sets="attset-labele">
  165.         <xsl:attribute name="font-size">12pt</xsl:attribute>
  166.         <xsl:attribute name="font-weight">bold</xsl:attribute>
  167.         <!--<xsl:attribute name="border-top">1,5pt solid black</xsl:attribute>
  168.         <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>-->
  169.         <xsl:attribute name="font-family">SupplementSC_Medium</xsl:attribute>
  170.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'darkblue' else 'black'"/>
  171.     </xsl:attribute-set>
  172.  
  173.     <xsl:attribute-set name="attset-labeleRazine2" use-attribute-sets="attset-labele">
  174.         <xsl:attribute name="font-size">10pt</xsl:attribute>
  175.         <xsl:attribute name="font-weight">bold</xsl:attribute>
  176.         <xsl:attribute name="font-family">Supplement_Medium</xsl:attribute>
  177.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'deepskyblue' else 'black'"/>
  178.     </xsl:attribute-set>
  179.  
  180.     <xsl:attribute-set name="attset-podaciRazine2">
  181.         <xsl:attribute name="font-size">8pt</xsl:attribute>
  182.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  183.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  184.         <xsl:attribute name="line-height" select="$lineHeightForLeading13"/>
  185.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'red' else 'black'"/>
  186.     </xsl:attribute-set>
  187.  
  188.     <xsl:attribute-set name="attset-cumLaude">
  189.         <xsl:attribute name="font-size">9pt</xsl:attribute>
  190.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  191.         <xsl:attribute name="font-family">SupplementSC_Normal</xsl:attribute>
  192.         <xsl:attribute name="line-height" select="$lineHeightForLeading13"/>
  193.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'red' else 'black'"/>
  194.     </xsl:attribute-set>
  195.  
  196.     <xsl:attribute-set name="attset-naslovGrupeZnanja" use-attribute-sets="attset-normalTekst">
  197.         <xsl:attribute name="font-family">SupplementSC_Normal</xsl:attribute>
  198.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'darkgreen' else 'black'"/>
  199.     </xsl:attribute-set>
  200.  
  201.  
  202.     <xsl:attribute-set name="attset-inline-rbrOcjena">
  203.         <xsl:attribute name="font-size">7pt</xsl:attribute>
  204.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  205.         <xsl:attribute name="font-family">SupplementSC_Normal</xsl:attribute>
  206.     </xsl:attribute-set>
  207.  
  208.     <xsl:attribute-set name="attset-inline-datumIspit">
  209.         <xsl:attribute name="font-size">6pt</xsl:attribute>
  210.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  211.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  212.     </xsl:attribute-set>
  213.  
  214.     <xsl:attribute-set name="attset-podaciTabliceOcjena">
  215.         <xsl:attribute name="font-size">
  216.             <xsl:value-of select="             if (/supplements/konfiguracija/@predmeti_font = 'small')               then '7pt'               else '8pt'"/>
  217.         </xsl:attribute>
  218.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  219.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  220.         <xsl:attribute name="line-height" select="$lineHeightTablicaOcjena"/>
  221.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'red' else 'black'"/>
  222.     </xsl:attribute-set>
  223.  
  224.  
  225.     <xsl:attribute-set name="attset-zaglavljeTabliceOcjena">
  226.         <xsl:attribute name="font-size">5.5pt</xsl:attribute>
  227.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  228.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  229.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'gold' else 'black'"/>
  230.     </xsl:attribute-set>
  231.  
  232.     <xsl:attribute-set name="attset-brojeviShemeStudiranja" use-attribute-sets="attset-labeleRazine1">
  233.         <xsl:attribute name="line-height" select="$lineHeightForLeading87"/>
  234.     </xsl:attribute-set>
  235.     <xsl:attribute-set name="attset-labeleShemeStudiranja" use-attribute-sets="attset-labeleRazine2">
  236.         <xsl:attribute name="line-height" select="$lineHeightForLeading87"/>
  237.     </xsl:attribute-set>
  238.  
  239.     <xsl:attribute-set name="attset-specEctsTablica">
  240.         <xsl:attribute name="font-size">5.5pt</xsl:attribute>
  241.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  242.         <xsl:attribute name="font-family">SupplementSC_Normal</xsl:attribute>
  243.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'saddlebrown' else 'black'"/>
  244.     </xsl:attribute-set>
  245.     <xsl:attribute-set name="attset-specEctsLabela">
  246.         <xsl:attribute name="font-size">7pt</xsl:attribute>
  247.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  248.         <xsl:attribute name="font-family">SupplementSC_Medium</xsl:attribute>
  249.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'darkgreen' else 'black'"/>
  250.     </xsl:attribute-set>
  251.     <xsl:attribute-set name="attset-shemaStudijaSC">
  252.         <xsl:attribute name="font-size">6pt</xsl:attribute>
  253.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  254.         <xsl:attribute name="font-family">SupplementSC_Normal</xsl:attribute>
  255.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'darkgreen' else 'black'"/>
  256.         <xsl:attribute name="line-height" select="$lineHeightForLeading87"/>
  257.     </xsl:attribute-set>
  258.     <xsl:attribute-set name="attset-shemaStudijaItalic">
  259.         <xsl:attribute name="font-size">6pt</xsl:attribute>
  260.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  261.         <xsl:attribute name="font-family">Supplement_Normal_Italic</xsl:attribute>
  262.         <xsl:attribute name="font-style">italic</xsl:attribute>
  263.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'magenta' else 'black'"/>
  264.         <xsl:attribute name="line-height" select="$lineHeightForLeading87"/>
  265.     </xsl:attribute-set>
  266.  
  267.     <xsl:attribute-set name="attset-podaciTabliceStranoVuPredmeta">
  268.         <xsl:attribute name="font-size">7pt</xsl:attribute>
  269.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  270.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  271.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'blue' else 'black'"/>
  272.         <xsl:attribute name="line-height" select="$lineHeightTablicaOcjenaNazivStranogVU"/>
  273.     </xsl:attribute-set>
  274.  
  275.     <!-- za fusnote sa zvjezdicama -->
  276.     <xsl:attribute-set name="attset-inlineSuperscriptNazPred">
  277.         <xsl:attribute name="padding-start">0.5pt</xsl:attribute>
  278.         <xsl:attribute name="font-size">7pt</xsl:attribute>
  279.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  280.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  281.         <xsl:attribute name="line-height" select="$lineHeightTablicaOcjena"/>
  282.         <xsl:attribute name="baseline-shift">
  283.             <xsl:value-of select="               if (/supplements/konfiguracija/@predmeti_font = 'small')                 then '0pt'                 else '1pt'"/>
  284.         </xsl:attribute>
  285.     </xsl:attribute-set>
  286.  
  287.     <xsl:attribute-set name="attset-inlineSuperscriptNazDodEctsBod">
  288.         <xsl:attribute name="padding-start">0.4pt</xsl:attribute>
  289.         <xsl:attribute name="font-size">5.44pt</xsl:attribute>
  290.         <xsl:attribute name="baseline-shift">
  291.             <xsl:value-of select="               if (/supplements/konfiguracija/@predmeti_font = 'small')                 then '0pt'                 else '0.7pt'"/>
  292.         </xsl:attribute>
  293.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  294.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  295.         <xsl:attribute name="line-height" select="$lineHeightTablicaOcjena"/>
  296.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'blue' else 'black'"/>
  297.     </xsl:attribute-set>
  298.  
  299.     <xsl:attribute-set name="attset-blockNazDodEctsBod">
  300.         <xsl:attribute name="font-size">7pt</xsl:attribute>
  301.         <xsl:attribute name="baseline-shift">
  302.             <xsl:value-of select="              if (/supplements/konfiguracija/@predmeti_font = 'small')                 then '0pt'                 else $baselineShiftFor7ptFontIn13ptline"/>
  303.         </xsl:attribute>
  304.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  305.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  306.         <xsl:attribute name="color" select="if ($ispisBoja='D') then 'blue' else 'black'"/>
  307.         <xsl:attribute name="line-height" select="$lineHeightTablicaOcjena"/>
  308.     </xsl:attribute-set>
  309.  
  310.  
  311.  
  312.     <xsl:template match="/supplements">
  313.         <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  314.             <fo:layout-master-set>
  315.                 <fo:simple-page-master master-name="titlePage" xsl:use-attribute-sets="paper-dimension">
  316.                     <fo:region-body margin-top="400pt" margin-bottom="0mm" margin-left="0mm" margin-right="0mm" />
  317.                     <fo:region-before extent="144pt"/>
  318.                 </fo:simple-page-master>
  319.                 <!-- marginBottom je 61 zato da se omoguci dodavanje tankog bloka na kraju opisa znanja -->
  320.                 <fo:simple-page-master master-name="firstPage" xsl:use-attribute-sets="paper-dimension">
  321.                     <!-- ORIGINAL: <fo:region-body margin-top="259pt" margin-bottom="61pt" margin-left="59pt" margin-right="67pt" column-count="2" column-gap="7pt"/>-->
  322.                     <fo:region-body margin-top="25mm" margin-bottom="25mm" margin-left="25mm" margin-right="25mm" />
  323.                     <!--<fo:region-before extent="144pt"/>-->
  324.                 </fo:simple-page-master>
  325.                 <fo:simple-page-master master-name="secondPage" xsl:use-attribute-sets="paper-dimension">
  326.                     <!-- ORIGINAL: <fo:region-body margin-top="38pt" margin-bottom="143pt" margin-left="67pt" margin-right="59pt" column-count="2" column-gap="7pt"/> -->
  327.                     <!--<fo:region-body margin-top="38pt" margin-bottom="143pt" margin-left="67pt" margin-right="59pt"/>-->
  328.                     <fo:region-body margin-top="25mm" margin-bottom="25mm" margin-left="25mm" margin-right="25mm"/>
  329.                     <!--<fo:region-after extent="156pt"/>-->
  330.                 </fo:simple-page-master>
  331.                 <fo:simple-page-master master-name="thirdPage" xsl:use-attribute-sets="paper-dimension">
  332.                     <fo:region-body margin-top="38pt" margin-bottom="156pt" margin-left="59pt" margin-right="67pt" column-count="2" column-gap="7pt"/>
  333.                     <fo:region-after extent="156pt"/>
  334.                 </fo:simple-page-master>
  335.                 <xsl:if test="$ispisZadnjeStrane='D'">
  336.                     <fo:simple-page-master master-name="fourthPage" xsl:use-attribute-sets="paper-dimension">
  337.                         <fo:region-body margin-top="38pt" margin-bottom="62pt" margin-left="53pt" margin-right="45pt" column-count="2" column-gap="7pt"/>
  338.                         <fo:region-after extent="142pt"/>
  339.                     </fo:simple-page-master>
  340.                 </xsl:if>
  341.                 <fo:page-sequence-master master-name="firstTwoPages">
  342.                     <fo:single-page-master-reference master-reference="firstPage"/>
  343.                     <fo:repeatable-page-master-reference master-reference="secondPage"/>
  344.                 </fo:page-sequence-master>
  345.                 <fo:page-sequence-master master-name="thirdPageOnly">
  346.                     <fo:single-page-master-reference master-reference="thirdPage"/>
  347.                 </fo:page-sequence-master>
  348.                 <!-- DEFAULTNA STRANICA -->
  349.                 <fo:page-sequence-master master-name="defaultPage">
  350.                     <fo:repeatable-page-master-reference master-reference="firstPage" />
  351.                 </fo:page-sequence-master>
  352.                 <!-- /DEFAULTNA STRANICA -->
  353.                 <xsl:if test="$ispisZadnjeStrane='D'">
  354.                     <fo:page-sequence-master master-name="fourthPageOnly">
  355.                         <fo:single-page-master-reference master-reference="fourthPage"/>
  356.                     </fo:page-sequence-master>
  357.                 </xsl:if>
  358.             </fo:layout-master-set>
  359.             <xsl:apply-templates select="supplement"/>
  360.         </fo:root>
  361.     </xsl:template>
  362.  
  363.  
  364.     <xsl:template match="supplement">
  365.         <xsl:variable name="lang">
  366.             <xsl:value-of select="@lang"/>
  367.         </xsl:variable>
  368.         <xsl:variable name="brojStudija" select="count(kvalifikacija/studijskiProgram/smjerovi/smjer[rbrIspis=1])"/>
  369.         <xsl:variable name="brojZavrsnihRadova" select="count(zavrsetakStudija/zavrsniRad)"/>
  370.         <!-- starts actual layout -->
  371.         <!-- naslovna stranica prvo -->
  372.         <fo:page-sequence master-reference="titlePage" id="{concat('titlepage_', student/JMBAG, '_', student/imeStud, '_', student/prezStud )}">
  373.             <fo:static-content flow-name="xsl-region-before">
  374.                 <xsl:call-template name="ispisNaslovnica">
  375.                     <xsl:with-param name="lang" select="$lang"/>
  376.                 </xsl:call-template>
  377.             </fo:static-content>
  378.             <fo:flow flow-name="xsl-region-body">
  379.                 <xsl:call-template name="ispisPodatakaStudentNaslovnica">
  380.                     <xsl:with-param name="lang" select="$lang" />
  381.                 </xsl:call-template>
  382.             </fo:flow>
  383.         </fo:page-sequence>
  384.  
  385.         <!-- ORIGNAL: <fo:page-sequence master-reference="firstTwoPages" id="{concat('page12_', student/JMBAG, '_', student/imeStud, '_', student/prezStud )}"> -->
  386.         <fo:page-sequence master-reference="defaultPage" id="{concat('page12_', student/JMBAG, '_', student/imeStud, '_', student/prezStud )}">
  387.             <!--<fo:static-content flow-name="xsl-region-before">
  388.                 <xsl:call-template name="ispisZaglavlja">
  389.                     <xsl:with-param name="lang" select="$lang"/>
  390.                 </xsl:call-template>
  391.             </fo:static-content>-->
  392.             <!-- zavrsetak studija -->
  393.             <!--<fo:static-content flow-name="xsl-region-after">
  394.                 <xsl:call-template name="ispisZavrsetkaStudija">
  395.                     <xsl:with-param name="lang" select="$lang"/>
  396.                     <xsl:with-param name="brojStudija" select="$brojStudija"/>
  397.                     <xsl:with-param name="brojZavrsnihRadova" select="$brojZavrsnihRadova"/>
  398.                 </xsl:call-template>
  399.             </fo:static-content>-->
  400.             <fo:flow flow-name="xsl-region-body">
  401.  
  402.                 <xsl:call-template name="ispisPodatakaStudent">
  403.                     <xsl:with-param name="lang" select="$lang"/>
  404.                 </xsl:call-template>
  405.                 <xsl:call-template name="ispisPodatakaKvalifikacija">
  406.                     <xsl:with-param name="lang" select="$lang"/>
  407.                     <xsl:with-param name="brojStudija" select="$brojStudija"/>
  408.                 </xsl:call-template>
  409.                 <xsl:call-template name="ispisPodatakaUstanova">
  410.                     <xsl:with-param name="lang" select="$lang"/>
  411.                     <xsl:with-param name="brojStudija" select="$brojStudija"/>
  412.                 </xsl:call-template>
  413.                 <xsl:call-template name="ispisPodatakaRazinaKvalifikacije">
  414.                     <xsl:with-param name="lang" select="$lang"/>
  415.                     <xsl:with-param name="brojStudija" select="$brojStudija"/>
  416.                 </xsl:call-template>
  417.  
  418.                 <xsl:variable name="fontSize">
  419.                     <xsl:choose>
  420.                         <xsl:when test="/supplements/konfiguracija/@poglavlje_4_2_font = 'small'">
  421.                             <xsl:text>7pt</xsl:text>
  422.                         </xsl:when>
  423.                         <xsl:when test="/supplements/konfiguracija/@poglavlje_4_2_font = 'large'">
  424.                             <xsl:text>9pt</xsl:text>
  425.                         </xsl:when>
  426.                         <xsl:otherwise>
  427.                             <!-- za defaultnu ocjenu duljine teksta zbrajam sve tekstove sa svih studija -->
  428.                             <xsl:variable name="countCharRezultati" select="string-length(zahtjeviRezultatiStudijaPoStudiju)"/>
  429.                             <xsl:value-of select="if ($countCharRezultati &gt; $maxWithLargeFont)                             then '7pt'                             else '9pt'"/>
  430.                         </xsl:otherwise>
  431.                     </xsl:choose>
  432.                 </xsl:variable>
  433.                 <xsl:variable name="lineHeight" select="if ($fontSize = '7pt')                             then $lineHeightForLeading87                             else $lineHeightForLeading13"/>
  434.  
  435.                 <xsl:call-template name="ispisPodatakaProgram-stecenaZnanja">
  436.                     <xsl:with-param name="lang" select="$lang"/>
  437.                     <xsl:with-param name="fontSize" select="$fontSize"/>
  438.                     <xsl:with-param name="lineHeight" select="$lineHeight"/>
  439.                 </xsl:call-template>
  440.                 <!--
  441.            <xsl:apply-templates select="stecenaZnanja">
  442.               <xsl:with-param name="fontSize" select="$fontSize"/>
  443.               <xsl:with-param name="lineHeight" select="$lineHeight"/>
  444.            </xsl:apply-templates>
  445.            -->
  446.  
  447.                 <xsl:call-template name="ispisPodatakaPrijepisOcjena">
  448.                     <xsl:with-param name="lang">
  449.                         <xsl:value-of select="$lang"/>
  450.                     </xsl:with-param>
  451.                 </xsl:call-template>
  452. <!--
  453.                 <xsl:call-template name="ispisShemeOcjenjivanja">
  454.                     <xsl:with-param name="lang">
  455.                         <xsl:value-of select="$lang"/>
  456.                     </xsl:with-param>
  457.                 </xsl:call-template>
  458.  
  459.                 <xsl:call-template name="ispisUkupneKlasifikacijeKvalifikacije">
  460.                     <xsl:with-param name="lang">
  461.                         <xsl:value-of select="$lang"/>
  462.                     </xsl:with-param>
  463.                 </xsl:call-template>
  464.                 <xsl:call-template name="ispisFunkcijeKvalifikacije">
  465.                     <xsl:with-param name="lang">
  466.                         <xsl:value-of select="$lang"/>
  467.                     </xsl:with-param>
  468.                 </xsl:call-template>
  469.                 <xsl:call-template name="ispisDodatneInformacije">
  470.                     <xsl:with-param name="lang">
  471.                         <xsl:value-of select="$lang"/>
  472.                     </xsl:with-param>
  473.                 </xsl:call-template>-->
  474.  
  475.                 <!--  <xsl:apply-templates select="prijepisDodEctsBodova" />-->
  476.             </fo:flow>
  477.         </fo:page-sequence>
  478.         <!--<fo:page-sequence master-reference="defaultPage" id="{concat('page3_', student/JMBAG, '_', student/imeStud, '_', student/prezStud )}">
  479.             <fo:static-content flow-name="xsl-region-after">
  480.                 <xsl:call-template name="ispisCertifikata">
  481.                     <xsl:with-param name="lang">
  482.                         <xsl:value-of select="$lang"/>
  483.                     </xsl:with-param>
  484.                 </xsl:call-template>
  485.             </fo:static-content>
  486.             <fo:flow flow-name="xsl-region-body">
  487.                 <xsl:call-template name="ispisShemeOcjenjivanja">
  488.                     <xsl:with-param name="lang">
  489.                         <xsl:value-of select="$lang"/>
  490.                     </xsl:with-param>
  491.                 </xsl:call-template>
  492.                 <xsl:call-template name="ispisUkupneKlasifikacijeKvalifikacije">
  493.                     <xsl:with-param name="lang">
  494.                         <xsl:value-of select="$lang"/>
  495.                     </xsl:with-param>
  496.                 </xsl:call-template>
  497.                 <xsl:call-template name="ispisFunkcijeKvalifikacije">
  498.                     <xsl:with-param name="lang">
  499.                         <xsl:value-of select="$lang"/>
  500.                     </xsl:with-param>
  501.                 </xsl:call-template>
  502.                 <xsl:call-template name="ispisDodatneInformacije">
  503.                     <xsl:with-param name="lang">
  504.                         <xsl:value-of select="$lang"/>
  505.                     </xsl:with-param>
  506.                 </xsl:call-template>
  507.             </fo:flow>
  508.         </fo:page-sequence>-->
  509.         <xsl:if test="$ispisZadnjeStrane='D'">
  510.             <fo:page-sequence master-reference="fourthPageOnly" id="{concat('page4_', student/JMBAG, '_', student/imeStud, '_', student/prezStud )}">
  511.                 <fo:static-content flow-name="xsl-region-after">
  512.                     <xsl:call-template name="crtanjeShemeStudija">
  513.                         <xsl:with-param name="lang">
  514.                             <xsl:value-of select="$lang"/>
  515.                         </xsl:with-param>
  516.                     </xsl:call-template>
  517.                 </fo:static-content>
  518.                 <fo:flow flow-name="xsl-region-body">
  519.                     <xsl:call-template name="ispisShemeSustava">
  520.                         <xsl:with-param name="lang">
  521.                             <xsl:value-of select="$lang"/>
  522.                         </xsl:with-param>
  523.                     </xsl:call-template>
  524.                 </fo:flow>
  525.             </fo:page-sequence>
  526.         </xsl:if>
  527.     </xsl:template>
  528.  
  529.     <!-- procedura za ispis zaglavlja -->
  530.     <xsl:template name="ispisZaglavlja">
  531.         <xsl:param name="lang"/>
  532.         <xsl:variable name="sifVU" select="ancestor-or-self::*[self::supplement][1]/@sifVU"/>
  533.         <xsl:variable name="sifUni" select="ancestor-or-self::*[self::supplement][1]/@sifUni"/>
  534.         <!-- slika glavnog naslova (crveni tekst) -->
  535.         <xsl:variable name="glavniNaslov" select="concat($imagesBaseUrl, '/titleSupp_', $lang, '.svg')"/>
  536.         <!-- slika grba RH -->
  537.         <xsl:variable name="rhLogo" select="concat($imagesBaseUrl, '/rhLogo_', $lang, '.svg')"/>
  538.         <!-- slika grba visokog učilišta
  539.      <xsl:variable name="vuLogo"
  540.            select="concat($imagesBaseUrl, '/vuLogo_', $lang, '_', $sifVU, '.svg')" />-->
  541.         <xsl:variable name="vuLogo">
  542.             <xsl:choose>
  543.                 <xsl:when test="$lang='hr'">
  544.                     <xsl:value-of select="concat('url(', $vuLogoUrlHr, ')')"/>
  545.                 </xsl:when>
  546.                 <xsl:otherwise>
  547.                     <xsl:value-of select="concat('url(', $vuLogoUrlEn, ')')"/>
  548.                 </xsl:otherwise>
  549.             </xsl:choose>
  550.         </xsl:variable>
  551.         <!-- slika grba sveučilišta
  552.      <xsl:variable name="uniLogo"
  553.            select="concat($imagesBaseUrl, '/uniLogo_', $lang, '_', $sifUni, '.svg')" />-->
  554.         <xsl:variable name="uniLogo">
  555.             <xsl:choose>
  556.                 <xsl:when test="$lang='hr'">
  557.                     <xsl:value-of select="concat('url(', $uniLogoUrlHr, ')')"/>
  558.                 </xsl:when>
  559.                 <xsl:otherwise>
  560.                     <xsl:value-of select="concat('url(', $uniLogoUrlEn, ')')"/>
  561.                 </xsl:otherwise>
  562.             </xsl:choose>
  563.         </xsl:variable>
  564.  
  565.         <!-- lijevi stupac zaglavlja  -->
  566.         <fo:block-container xsl:use-attribute-sets="attset-lijevoZaglavljeBlokContainer">
  567.             <fo:block xsl:use-attribute-sets="attset-grbovi">
  568.                 <fo:external-graphic>
  569.                     <xsl:attribute name="src">
  570.                         <xsl:value-of select="$rhLogo"/>
  571.                     </xsl:attribute>
  572.                 </fo:external-graphic>
  573.             </fo:block>
  574.         </fo:block-container>
  575.  
  576.         <!-- sredisnji dio zaglavlja  -->
  577.         <fo:block-container xsl:use-attribute-sets="attset-zaglavljeBlokContainer">
  578.             <xsl:if test="$lang = 'en'">
  579.                 <xsl:attribute name="height">196pt</xsl:attribute>
  580.             </xsl:if>
  581.             <fo:block xsl:use-attribute-sets="attset-zaglavljeBlok" padding-top="2mm">
  582.                 <xsl:value-of select="lower-case(document(concat('file:///', $konTekstSupplement))                        /konTekst/jezik[lang($lang)]/republikaHrvatska)"/>
  583.             </fo:block>
  584.             <fo:block xsl:use-attribute-sets="attset-zaglavljeBlok">
  585.                 <xsl:value-of select="lower-case(institucijaZaNaslov/nazSveuciliste)"/>
  586.             </fo:block>
  587.             <fo:block xsl:use-attribute-sets="attset-zaglavljeBlok">
  588.                 <xsl:value-of select="lower-case(institucijaZaNaslov/nazVU)"/>
  589.             </fo:block>
  590.  
  591.             <fo:block xsl:use-attribute-sets="attset-naslovBlok">
  592.                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title0"/>
  593.             </fo:block>
  594.             <!--
  595.         <fo:block xsl:use-attribute-sets="attset-fillerBlokCenter">
  596.            <fo:external-graphic>
  597.               <xsl:attribute name="src" select="$glavniNaslov" />
  598.            </fo:external-graphic>
  599.         </fo:block>
  600.          -->
  601.             <fo:block xsl:use-attribute-sets="attset-subtitle0Tekst">
  602.                 <xsl:apply-templates select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/subtitle0"/>
  603.             </fo:block>
  604.         </fo:block-container>
  605.  
  606.  
  607.         <!-- desni stupac zaglavlja -->
  608.         <fo:block-container xsl:use-attribute-sets="attset-desnoZaglavljeBlokContainer">
  609.             <fo:block xsl:use-attribute-sets="attset-grbovi">
  610.                 <fo:external-graphic xsl:use-attribute-sets="attset-uniLogo">
  611.                     <xsl:attribute name="src" select="$uniLogo"/>
  612.                 </fo:external-graphic>
  613.             </fo:block>
  614.             <fo:block padding-top="{$razmakMedjuGrbovimaNaDesnojStrani}"/>
  615.             <fo:block xsl:use-attribute-sets="attset-grbovi">
  616.                 <fo:external-graphic xsl:use-attribute-sets="attset-vuLogo">
  617.                     <xsl:attribute name="src" select="$vuLogo"/>
  618.                 </fo:external-graphic>
  619.             </fo:block>
  620.         </fo:block-container>
  621.     </xsl:template>
  622.  
  623.     <!-- procedura za ispis općih podataka na naslovnici -->
  624.     <xsl:template name="ispisNaslovnica">
  625.         <xsl:param name="lang"/>
  626.         <!-- slika grba RH -->
  627.         <xsl:variable name="rhLogo" select="concat($imagesBaseUrl, '/rhLogo_', $lang, '.svg')"/>
  628.  
  629.         <fo:block-container xsl:use-attribute-sets="attset-zaglavljeBlokContainer">
  630.             <fo:block xsl:use-attribute-sets="attset-grbovi">
  631.                 <fo:external-graphic>
  632.                     <xsl:attribute name="src">
  633.                         <xsl:value-of select="$rhLogo"/>
  634.                     </xsl:attribute>
  635.                 </fo:external-graphic>
  636.             </fo:block>
  637.  
  638.             <fo:block xsl:use-attribute-sets="attset-zaglavljeBlok">
  639.                 <xsl:value-of select="lower-case(institucijaZaNaslov/nazSveuciliste)"/>
  640.             </fo:block>
  641.             <fo:block xsl:use-attribute-sets="attset-zaglavljeBlok">
  642.                 <xsl:text>Podru&#382;nica</xsl:text>
  643.             </fo:block>
  644.             <fo:block xsl:use-attribute-sets="attset-zaglavljeBlok">
  645.                 <xsl:value-of select="lower-case(institucijaZaNaslov/nazVU)"/>
  646.             </fo:block>
  647.         </fo:block-container>
  648.     </xsl:template>
  649.  
  650.     <xsl:template name="ispisPodatakaStudentNaslovnica">
  651.         <xsl:param name="lang"/>
  652.  
  653.         <!-- glavni naslov -->
  654.         <fo:block xsl:use-attribute-sets="attset-naslovBlok">
  655.             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title0"/>
  656.         </fo:block>
  657.  
  658.         <fo:block xsl:use-attribute-sets="attset-subtitle0Tekst">
  659.             <xsl:value-of select="concat(student/imeStud, ' ', student/prezStud)" />
  660.         </fo:block>
  661.  
  662.         <xsl:call-template name="emptyLine"/>
  663.  
  664.         <fo:block xsl:use-attribute-sets="attset-subtitle1Tekst">
  665.             <xsl:text>ro&#x111;en</xsl:text>
  666.             <xsl:if test="student/spol = '&#x17D;'">
  667.                 <xsl:text>a</xsl:text>
  668.             </xsl:if>
  669.             <xsl:value-of select="concat(' ', student/datRodStud, ', ', student/mjestoRodStud, ',')" />
  670.         </fo:block>
  671.  
  672.         <fo:block xsl:use-attribute-sets="attset-subtitle1Tekst">
  673.             <xsl:value-of select="student/drzavaRodStud" />
  674.         </fo:block>
  675.  
  676.         <xsl:call-template name="emptyLine"/>
  677.  
  678.         <fo:block xsl:use-attribute-sets="attset-subtitle1Tekst">
  679.             <xsl:text>Mati&#x10D;ni broj: </xsl:text>
  680.             <xsl:value-of select="student/JMBAG" />
  681.         </fo:block>
  682.  
  683.  
  684.     </xsl:template>
  685.  
  686.     <!-- procedura za ispis općih podataka o studentu -->
  687.     <xsl:template name="ispisPodatakaStudent">
  688.         <xsl:param name="lang"/>
  689.  
  690.         <!-- prazan red -->
  691.         <xsl:call-template name="emptyLine"/>
  692.         <xsl:call-template name="firstLevel">
  693.             <xsl:with-param name="number" select="'1'"/>
  694.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title1"/>
  695.         </xsl:call-template>
  696.  
  697.         <xsl:call-template name="secondLevelStudent">
  698.             <xsl:with-param name="number" select="'1.1'"/>
  699.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title1.1"/>
  700.             <xsl:with-param name="value" select="upper-case(student/prezStud)"/>
  701.         </xsl:call-template>
  702.  
  703.         <xsl:call-template name="secondLevelStudent">
  704.             <xsl:with-param name="number" select="'1.2'"/>
  705.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title1.2"/>
  706.             <xsl:with-param name="value" select="upper-case(student/imeStud)"/>
  707.         </xsl:call-template>
  708.  
  709.         <xsl:call-template name="secondLevelStudent">
  710.             <xsl:with-param name="number" select="'1.3'"/>
  711.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title1.3"/>
  712.             <xsl:with-param name="value" select="concat(student/datRodStud                              , ', '                              , student/mjestoRodStud                              , ', '                              , student/drzavaRodStud)"/>
  713.         </xsl:call-template>
  714.  
  715.         <xsl:call-template name="secondLevelStudent">
  716.             <xsl:with-param name="number" select="'1.4'"/>
  717.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title1.4"/>
  718.             <xsl:with-param name="value" select="student/JMBAG"/>
  719.         </xsl:call-template>
  720.     </xsl:template>
  721.  
  722.     <!-- procedura za ispis općih podataka o kvalifikaciji -->
  723.     <xsl:template name="ispisPodatakaKvalifikacija">
  724.         <xsl:param name="lang"/>
  725.         <xsl:param name="brojStudija"/>
  726.         <!-- prazan red -->
  727.         <xsl:call-template name="emptyLine"/>
  728.         <xsl:call-template name="firstLevel">
  729.             <xsl:with-param name="number" select="'2'"/>
  730.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title2"/>
  731.         </xsl:call-template>
  732.  
  733.         <xsl:call-template name="secondLevelStudent">
  734.             <xsl:with-param name="number" select="'2.1'"/>
  735.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title2.1"/>
  736.             <xsl:with-param name="value">
  737.                 <xsl:variable name="kvalifikacijePoStudijima" select="kvalifikacija/kvalifikacijePoStudijima"/>
  738.                 <xsl:for-each select="for $i in 1 to $brojStudija return $i">
  739.                     <xsl:variable name="rbrProlaz" select="."/>
  740.                     <xsl:if test="$rbrProlaz &gt; 1">
  741.                         <xsl:text> / </xsl:text>
  742.                     </xsl:if>
  743.                     <xsl:variable name="kvalifikacijaStudij" select="$kvalifikacijePoStudijima/kvalifikacijaStudij[@rbrStudij=$rbrProlaz]"/>
  744.                     <xsl:choose>
  745.                         <xsl:when test="string-length($kvalifikacijaStudij/nazivKvalifikacije) &gt; 0">
  746.                             <xsl:value-of select="$kvalifikacijaStudij/nazivKvalifikacije"/>
  747.                         </xsl:when>
  748.                         <xsl:otherwise>
  749.                             <xsl:call-template name="emDash"/>
  750.                         </xsl:otherwise>
  751.                     </xsl:choose>
  752.                     <xsl:if test="string-length($kvalifikacijaStudij/nazivTitule) &gt; 0">
  753.                         <xsl:text>; </xsl:text>
  754.                         <xsl:value-of select="$kvalifikacijaStudij/nazivTitule"/>
  755.                     </xsl:if>
  756.                 </xsl:for-each>
  757.             </xsl:with-param>
  758.         </xsl:call-template>
  759.  
  760.         <!-- U starijoj verziji se ispisivao samo sadržaj elementa nazivStudijskogPrograma.
  761.           U novijoj verziji komponiramo taj naziv iz kompleksnog elementa smjerovi.
  762.           Pomoću ove varijable podržavam obje verzije, dok stara verzija ne odumre. -->
  763.         <xsl:variable name="komponiraniNazivStudijskogPrograma">
  764.             <xsl:choose>
  765.                 <xsl:when test="kvalifikacija/nazivStudijskogPrograma">
  766.                     <xsl:value-of select="kvalifikacija/nazivStudijskogPrograma"/>
  767.                 </xsl:when>
  768.                 <xsl:otherwise>
  769.                     <xsl:call-template name="komponiranjeNazivaStudijskogPrograma"/>
  770.                 </xsl:otherwise>
  771.             </xsl:choose>
  772.         </xsl:variable>
  773.         <xsl:call-template name="secondLevel">
  774.             <xsl:with-param name="number" select="'2.2'"/>
  775.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title2.2"/>
  776.             <xsl:with-param name="value" select="$komponiraniNazivStudijskogPrograma"/>
  777.         </xsl:call-template>
  778.     </xsl:template>
  779.  
  780.     <!-- procedura za komponiranje naziva studijskog programa -->
  781.     <xsl:template name="komponiranjeNazivaStudijskogPrograma">
  782.         <xsl:for-each select="kvalifikacija/studijskiProgram/smjerovi/smjer">
  783.             <xsl:if test="rbrIspis != '1'">
  784.                 <xsl:text>, </xsl:text>
  785.                 <xsl:value-of select="nazTipSmjer"/>
  786.                 <xsl:text> </xsl:text>
  787.             </xsl:if>
  788.             <xsl:if test="rbrIspis = '1' and position() != 1">
  789.                 <xsl:text> / </xsl:text>
  790.             </xsl:if>
  791.             <xsl:value-of select="nazSmjer"/>
  792.         </xsl:for-each>
  793.     </xsl:template>
  794.  
  795.     <!-- procedura za ispis općih podataka o ustanovi -->
  796.     <xsl:template name="ispisPodatakaUstanova">
  797.         <xsl:param name="lang"/>
  798.         <xsl:param name="brojStudija"/>
  799.         <xsl:call-template name="secondLevel">
  800.             <xsl:with-param name="number" select="'2.3'"/>
  801.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title2.3"/>
  802.             <xsl:with-param name="value">
  803.                 <xsl:value-of select="kvalifikacija/izdajeInstitucija/naziv"/>
  804.                 <xsl:text>&#xA;</xsl:text>
  805.                 <xsl:if test="string-length(kvalifikacija/izdajeInstitucija/pravniStatusInstitucija) != 0">
  806.                     <xsl:text> </xsl:text>
  807.                     <xsl:value-of select="kvalifikacija/izdajeInstitucija/pravniStatusInstitucija"/>
  808.                 </xsl:if>
  809.                 <xsl:for-each select="kvalifikacija/izdajeInstitucija/pravniStatusPoStudiju/pravniStatusStudij">
  810.                     <xsl:sort select="@rbrStudij"/>
  811.                     <xsl:text> </xsl:text>
  812.                     <xsl:value-of select="."/>
  813.                 </xsl:for-each>
  814.             </xsl:with-param>
  815.         </xsl:call-template>
  816.  
  817.         <xsl:call-template name="secondLevel">
  818.             <xsl:with-param name="number" select="'2.4'"/>
  819.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title2.4"/>
  820.             <xsl:with-param name="value">
  821.                 <xsl:choose>
  822.                     <xsl:when test="kvalifikacija/izvodiInstitucija/naziv != '-'">
  823.                         <xsl:value-of select="kvalifikacija/izvodiInstitucija/naziv"/>
  824.                         <xsl:text>.</xsl:text>
  825.                         <xsl:if test="string-length(kvalifikacija/izvodiInstitucija/pravniStatusInstitucija) != 0">
  826.                             <xsl:text> </xsl:text>
  827.                             <xsl:value-of select="kvalifikacija/izvodiInstitucija/pravniStatusInstitucija"/>
  828.                         </xsl:if>
  829.                         <xsl:for-each select="kvalifikacija/izvodiInstitucija/pravniStatusPoStudiju/pravniStatusStudij">
  830.                             <xsl:sort select="@rbrStudij"/>
  831.                             <xsl:text> </xsl:text>
  832.                             <xsl:value-of select="."/>
  833.                         </xsl:for-each>
  834.                     </xsl:when>
  835.                     <xsl:otherwise>
  836.                         <xsl:call-template name="textNotApplicable"/>
  837.                     </xsl:otherwise>
  838.                 </xsl:choose>
  839.             </xsl:with-param>
  840.         </xsl:call-template>
  841.  
  842.         <xsl:call-template name="secondLevel">
  843.             <xsl:with-param name="number" select="'2.5'"/>
  844.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title2.5"/>
  845.             <xsl:with-param name="value">
  846.                 <xsl:variable name="jeziciPoStudijima" select="kvalifikacija/jeziciPoStudijima"/>
  847.                 <xsl:for-each select="for $i in 1 to $brojStudija return $i">
  848.                     <xsl:variable name="rbrProlaz" select="."/>
  849.                     <xsl:if test="$rbrProlaz &gt; 1">
  850.                         <xsl:text> / </xsl:text>
  851.                     </xsl:if>
  852.                     <xsl:choose>
  853.                         <xsl:when test="string-length($jeziciPoStudijima/jeziciStudija[@rbrStudij=$rbrProlaz]/jezici) &gt; 0">
  854.                             <xsl:value-of select="$jeziciPoStudijima/jeziciStudija[@rbrStudij=$rbrProlaz]/jezici"/>
  855.                         </xsl:when>
  856.                         <xsl:otherwise>
  857.                             <xsl:call-template name="emDash"/>
  858.                         </xsl:otherwise>
  859.                     </xsl:choose>
  860.                 </xsl:for-each>
  861.             </xsl:with-param>
  862.         </xsl:call-template>
  863.     </xsl:template>
  864.  
  865.     <!-- procedura za ispis podataka o kvalifikaciji -->
  866.     <xsl:template name="ispisPodatakaRazinaKvalifikacije">
  867.         <xsl:param name="lang"/>
  868.         <xsl:param name="brojStudija"/>
  869.         <!-- prazan red -->
  870.         <xsl:call-template name="emptyLine"/>
  871.         <xsl:call-template name="firstLevel">
  872.             <xsl:with-param name="number" select="'3'"/>
  873.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title3"/>
  874.         </xsl:call-template>
  875.  
  876.         <xsl:call-template name="secondLevel">
  877.             <xsl:with-param name="number" select="'3.1'"/>
  878.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title3.1"/>
  879.             <xsl:with-param name="value" select="kvalifikacija/razinaKvalifikacije"/>
  880.         </xsl:call-template>
  881.  
  882.         <xsl:call-template name="secondLevel">
  883.             <xsl:with-param name="number" select="'3.2'"/>
  884.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title3.2"/>
  885.             <xsl:with-param name="value">
  886.                 <!-- zato jer na FF-u mogu biti dva -->
  887.                 <xsl:variable name="predvidjenoTrajanjePoStudiju" select="kvalifikacija/predvidjenoTrajanjePoStudiju"/>
  888.                 <xsl:for-each select="for $i in 1 to $brojStudija return $i">
  889.                     <xsl:variable name="rbrProlaz" select="."/>
  890.                     <xsl:if test="$rbrProlaz &gt; 1">
  891.                         <xsl:text> / </xsl:text>
  892.                     </xsl:if>
  893.                     <xsl:choose>
  894.                         <xsl:when test="string-length($predvidjenoTrajanjePoStudiju/predvidjenoTrajanjeStudija[@rbrStudij=$rbrProlaz]/predvidjenoTrajanje) &gt; 0">
  895.                             <xsl:value-of select="$predvidjenoTrajanjePoStudiju/predvidjenoTrajanjeStudija[@rbrStudij=$rbrProlaz]/predvidjenoTrajanje"/>
  896.                         </xsl:when>
  897.                         <xsl:otherwise>
  898.                             <xsl:call-template name="emDash"/>
  899.                         </xsl:otherwise>
  900.                     </xsl:choose>
  901.                 </xsl:for-each>
  902.             </xsl:with-param>
  903.         </xsl:call-template>
  904.  
  905.         <xsl:call-template name="secondLevel">
  906.             <xsl:with-param name="number" select="'3.3'"/>
  907.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title3.3"/>
  908.             <xsl:with-param name="value" select="kvalifikacija/potrebnaObrazovnaRazina"/>
  909.         </xsl:call-template>
  910.     </xsl:template>
  911.  
  912.     <xsl:template name="ispisPodatakaProgram-stecenaZnanja">
  913.         <xsl:param name="lang"/>
  914.         <xsl:param name="fontSize"/>
  915.         <xsl:param name="lineHeight"/>
  916.         <!-- prazan red -->
  917.         <xsl:call-template name="emptyLine"/>
  918.         <xsl:call-template name="firstLevel">
  919.             <xsl:with-param name="number" select="'4'"/>
  920.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title4"/>
  921.         </xsl:call-template>
  922.  
  923.         <xsl:call-template name="secondLevel">
  924.             <xsl:with-param name="number" select="'4.1'"/>
  925.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title4.1"/>
  926.             <xsl:with-param name="value" select="kvalifikacija/nacinIzvodjenjaStudija"/>
  927.         </xsl:call-template>
  928.  
  929.         <xsl:call-template name="secondLevelNoData">
  930.             <xsl:with-param name="number" select="'4.2'"/>
  931.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title4.2"/>
  932.         </xsl:call-template>
  933.  
  934.         <xsl:for-each select="zahtjeviRezultatiStudijaPoStudiju/zahtjeviRezultatiStudija">
  935.  
  936.             <fo:block xsl:use-attribute-sets="attset-normalTekst" line-height="{$lineHeight}">
  937.                 <xsl:call-template name="attributes-hyphenated">
  938.                     <xsl:with-param name="lang" select="$lang"/>
  939.                 </xsl:call-template>
  940.                 <xsl:variable name="brojStecenihZnanja" select="count(stecenaZnanja/grupaZnanja)"/>
  941.                 <xsl:for-each select="para[position() &lt; last() or $brojStecenihZnanja = 0]">
  942.                     <fo:block>
  943.                         <xsl:value-of select="."/>
  944.                         <xsl:if test="position() != last()">
  945.                             <xsl:text> </xsl:text>
  946.                         </xsl:if>
  947.                     </fo:block>
  948.                 </xsl:for-each>
  949.             </fo:block>
  950.  
  951.             <xsl:apply-templates select="stecenaZnanja">
  952.                 <xsl:with-param name="fontSize" select="$fontSize"/>
  953.                 <xsl:with-param name="lineHeight" select="$lineHeight"/>
  954.                 <xsl:with-param name="lang" select="$lang"/>
  955.             </xsl:apply-templates>
  956.         </xsl:for-each>
  957.     </xsl:template>
  958.  
  959.     <xsl:template match="stecenaZnanja">
  960.         <xsl:param name="fontSize"/>
  961.         <xsl:param name="lineHeight"/>
  962.         <xsl:param name="lang"/>
  963.         <xsl:variable name="lastParaZahtjevRezultatZaStudij" select="../para[position()=last()]"/>
  964.  
  965.         <xsl:for-each select="grupaZnanja">
  966.             <fo:table table-layout="fixed" width="100%">
  967.                 <fo:table-body>
  968.                     <fo:table-row>
  969.                         <fo:table-cell>
  970.                             <xsl:if test="position()=1">
  971.                                 <fo:block xsl:use-attribute-sets="attset-normalTekst" font-size="{$fontSize}" line-height="{$lineHeight}">
  972.                                     <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
  973.                                     <!-- i zadnji paragraf zahtjeva-rezultata studija se ipak
  974.                             treba ispisivati justified -->
  975.                                     <xsl:call-template name="attributes-hyphenated">
  976.                                         <xsl:with-param name="lang" select="$lang"/>
  977.                                     </xsl:call-template>
  978.                                     <!-- <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> -->
  979.                                     <xsl:value-of select="$lastParaZahtjevRezultatZaStudij"/>
  980.                                 </fo:block>
  981.                             </xsl:if>
  982.                             <fo:block xsl:use-attribute-sets="attset-naslovGrupeZnanja" font-size="{$fontSize}" line-height="{$lineHeight}">
  983.                                 <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
  984.                                 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
  985.                                 <xsl:value-of select="lower-case(nazivGrupeZnanja)"/>
  986.                             </fo:block>
  987.                             <!-- start nested list -->
  988.                             <fo:list-block provisional-distance-between-starts="8pt" provisional-label-separation="0pt" xsl:use-attribute-sets="attset-normalTekst" font-size="{$fontSize}" line-height="{$lineHeight}" keep-together.within-page="auto">
  989.                                 <xsl:for-each select="znanje">
  990.  
  991.                                     <fo:list-item start-indent="0pt" keep-together.within-page="auto">
  992.                                         <!-- mislim da ovo ipak ne treba jer izgleda da sam vodi racuna o widow-orphan
  993.                              <xsl:if test = "position()=1">
  994.                                 <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
  995.                                 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
  996.                              </xsl:if>
  997.                              -->
  998.                                         <xsl:if test="position()=last()">
  999.                                             <xsl:attribute name="keep-with-previous.within-page">always</xsl:attribute>
  1000.                                             <!--<xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>-->
  1001.                                         </xsl:if>
  1002.                                         <fo:list-item-label end-indent="label-end()">
  1003.                                             <fo:block line-stacking-strategy="font-height">
  1004.                                                 <fo:inline>
  1005.                                                     <xsl:call-template name="emDash"/>
  1006.                                                 </fo:inline>
  1007.                                             </fo:block>
  1008.                                         </fo:list-item-label>
  1009.                                         <fo:list-item-body start-indent="body-start()">
  1010.                                             <fo:block>
  1011.                                                 <xsl:value-of select="."/>
  1012.                                             </fo:block>
  1013.                                         </fo:list-item-body>
  1014.                                     </fo:list-item>
  1015.                                 </xsl:for-each>
  1016.                             </fo:list-block>
  1017.                         </fo:table-cell>
  1018.                     </fo:table-row>
  1019.                 </fo:table-body>
  1020.             </fo:table>
  1021.         </xsl:for-each>
  1022.     </xsl:template>
  1023.  
  1024.     <!-- procedura za ispis podataka o programu, ocjene i ECTS bodovi -->
  1025.     <xsl:template name="ispisPodatakaPrijepisOcjena">
  1026.         <xsl:param name="lang"/>
  1027.  
  1028.  
  1029.  
  1030.         <!-- zato jer u prelazu 2-cols na 1-cols ne radi dobro discard (to je mislim fop pljuga) -->
  1031.         <!-- ideja je da veryThinLine prebaci u 1col mod, i pri tome ostane na 1. stranici ako
  1032.           je na 1. stranici bilo 0.01pt mjesta, pa ce discard od softEmptyLineKeepWithNext
  1033.           propustiti dodati space-before (tako i treba)
  1034.           Ako mjesta nije bilo za tako tanku linijicu, onda se je osim linijice sigurno i neki tekst
  1035.           s 1. stranice prelio na drugu, pa ce softEmptyLineKeepWithNext dodati space-before (tako i treba)
  1036.      -->
  1037.         <xsl:call-template name="veryThinEmptyLine"/>
  1038.  
  1039.         <!--
  1040.           Ovaj soft-page-break ne mogu iskoristiti jer tada idući discard ne funkcionira.
  1041.           Ne funkcionira jer se dotični container i blok uvijek nađu na drugoj stranici, pa discard misli
  1042.           da ipak treba dodati softEmptyLine
  1043.            <fo:block-container width="100%" height="6cm">
  1044.               <fo:block/>
  1045.            </fo:block-container>
  1046.            <fo:block space-before="-6cm"/>
  1047.      -->
  1048.  
  1049.         <!-- prazan red -->
  1050.         <xsl:call-template name="softEmptyLineKeepWithNext"/>
  1051.  
  1052.         <xsl:call-template name="secondLevelNoData">
  1053.             <xsl:with-param name="number" select="'4.3'"/>
  1054.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title4.3"/>
  1055.             <xsl:with-param name="alwaysKeepWithNext" select="'D'"/>
  1056.         </xsl:call-template>
  1057.  
  1058.         <!-- prazan red -->
  1059.         <xsl:call-template name="emptyLineKeepWithNext"/>
  1060.  
  1061.         <xsl:apply-templates select="prijepisOcjena">
  1062.             <xsl:with-param name="lang" select="$lang"/>
  1063.         </xsl:apply-templates>
  1064.     </xsl:template>
  1065.  
  1066.  
  1067.     <!-- procedura za ispis podataka o zavrsetku studija -->
  1068.     <xsl:template name="ispisZavrsetkaStudija">
  1069.         <xsl:param name="lang"/>
  1070.         <xsl:param name="brojStudija"/>
  1071.         <xsl:param name="brojZavrsnihRadova"/>
  1072.         <!-- prazan red -->
  1073.         <xsl:call-template name="emptyLine"/>
  1074.         <xsl:if test="$brojZavrsnihRadova &lt; 2">
  1075.             <!-- još jedan prazan red -->
  1076.             <xsl:call-template name="emptyLine"/>
  1077.         </xsl:if>
  1078.  
  1079.         <xsl:call-template name="secondLevelFooterSecondPage">
  1080.             <xsl:with-param name="number"/>
  1081.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textTotalEctsCredits"/>
  1082.             <xsl:with-param name="lang" select="$lang"/>
  1083.             <xsl:with-param name="value" select="ukupnoEcts"/>
  1084.         </xsl:call-template>
  1085.  
  1086.         <xsl:call-template name="secondLevelFooterSecondPage">
  1087.             <xsl:with-param name="number"/>
  1088.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textStudyContinuance"/>
  1089.             <xsl:with-param name="lang" select="$lang"/>
  1090.             <xsl:with-param name="value">
  1091.                 <xsl:value-of select="zavrsetakStudija/datumPocetkaStudija"/>
  1092.                 <xsl:call-template name="enDash"/>
  1093.                 <xsl:value-of select="zavrsetakStudija/datumDovrsetkaStudija"/>
  1094.             </xsl:with-param>
  1095.         </xsl:call-template>
  1096.  
  1097.         <xsl:call-template name="secondLevelFooterSecondPage">
  1098.             <xsl:with-param name="number"/>
  1099.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textOfficialDocumentId"/>
  1100.             <xsl:with-param name="lang" select="$lang"/>
  1101.             <xsl:with-param name="value">
  1102.                 <xsl:value-of select="zavrsetakStudija/brojIspraveZavrsetkaStudija"/>
  1103.             </xsl:with-param>
  1104.         </xsl:call-template>
  1105.  
  1106.  
  1107.         <xsl:if test="count(zavrsetakStudija/zavrsniRadovi/zavrsniRad) &gt; 0">
  1108.             <xsl:call-template name="secondLevelFooterSecondPage">
  1109.                 <xsl:with-param name="number"/>
  1110.  
  1111.                 <xsl:with-param name="label">
  1112.                     <xsl:variable name="postojiDiplZavIspit" select="kvalifikacija/studijskiProgram/postojiDiplZavIspit"/>
  1113.                     <xsl:if test="$postojiDiplZavIspit = 'Z'">
  1114.                         <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textThesisZ"/>
  1115.                     </xsl:if>
  1116.                     <xsl:if test="$postojiDiplZavIspit = 'D'">
  1117.                         <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textThesisD"/>
  1118.                     </xsl:if>
  1119.                 </xsl:with-param>
  1120.  
  1121.                 <xsl:with-param name="lang" select="$lang"/>
  1122.                 <xsl:with-param name="value">
  1123.                     <xsl:variable name="zavrsniRadovi" select="zavrsetakStudija/zavrsniRadovi"/>
  1124.                     <xsl:for-each select="for $i in 1 to $brojStudija return $i">
  1125.                         <xsl:variable name="rbrProlaz" select="."/>
  1126.                         <xsl:if test="$rbrProlaz &gt; 1">
  1127.                             <xsl:text> / </xsl:text>
  1128.                         </xsl:if>
  1129.                         <xsl:variable name="zavrsniRad" select="$zavrsniRadovi/zavrsniRad[@rbrStudij=$rbrProlaz]"/>
  1130.                         <xsl:choose>
  1131.                             <xsl:when test="string-length($zavrsniRad/naslov) &gt; 0">
  1132.                                 <xsl:value-of select="$zavrsniRad/naslov"/>
  1133.                                 <xsl:text>; </xsl:text>
  1134.                                 <xsl:value-of select="$zavrsniRad/mentor"/>
  1135.                                 <xsl:if test="$zavrsniRad/mentor2 != ''">
  1136.                                     <xsl:text>, </xsl:text>
  1137.                                     <xsl:value-of select="$zavrsniRad/mentor2"/>
  1138.                                 </xsl:if>
  1139.                                 <xsl:text>; </xsl:text>
  1140.                                 <xsl:value-of select="$zavrsniRad/datumObrane"/>
  1141.                             </xsl:when>
  1142.                             <xsl:otherwise>
  1143.                                 <xsl:call-template name="emDash"/>
  1144.                             </xsl:otherwise>
  1145.                         </xsl:choose>
  1146.                     </xsl:for-each>
  1147.                 </xsl:with-param>
  1148.             </xsl:call-template>
  1149.         </xsl:if>
  1150.     </xsl:template>
  1151.  
  1152.     <!-- kraj ispisa podataka o zavrstku studija -->
  1153.  
  1154.  
  1155.     <!-- procedure za ispis sheme ocjenjivanja -->
  1156.     <xsl:template name="ispisShemeOcjenjivanja">
  1157.         <xsl:param name="lang"/>
  1158.         <xsl:call-template name="secondLevel">
  1159.             <xsl:with-param name="number" select="'4.4'"/>
  1160.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title4.4"/>
  1161.             <xsl:with-param name="value">
  1162.                 <xsl:for-each select="sustavOcjenjivanja/para">
  1163.                     <xsl:apply-templates select="."/>
  1164.                     <xsl:if test="position() != last()">
  1165.                         <xsl:text> </xsl:text>
  1166.                     </xsl:if>
  1167.                 </xsl:for-each>
  1168.             </xsl:with-param>
  1169.             <xsl:with-param name="hyphenated" select="$lang"/>
  1170.         </xsl:call-template>
  1171.     </xsl:template>
  1172.  
  1173.     <!-- procedure za ispis ukupne klasifikacije kvalifikacije -->
  1174.     <xsl:template name="ispisUkupneKlasifikacijeKvalifikacije">
  1175.         <xsl:param name="lang"/>
  1176.         <xsl:call-template name="secondLevel">
  1177.             <xsl:with-param name="number" select="'4.5'"/>
  1178.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title4.5"/>
  1179.             <xsl:with-param name="value">
  1180.                 <xsl:value-of select="prosjOcj/nazProsjOcj"/>
  1181.                 <xsl:text>: </xsl:text>
  1182.                 <fo:inline font-weight="normal">
  1183.                     <xsl:value-of select="prosjOcj/prosjOcj"/>
  1184.                 </fo:inline>
  1185.             </xsl:with-param>
  1186.             <!-- ako bi cum laude trebao biti u istom redu s ocjenom
  1187.         <xsl:with-param name="smallcapsAppendedText">
  1188.            <xsl:if test="string-length(zavrsetakStudija/latNazCumLaude) != 0">
  1189.               <xsl:value-of select="lower-case(zavrsetakStudija/latNazCumLaude)" />
  1190.               <xsl:text> (</xsl:text>
  1191.               <xsl:value-of select="lower-case(zavrsetakStudija/nazCumLaude)" />
  1192.               <xsl:text>)</xsl:text>
  1193.            </xsl:if>
  1194.         </xsl:with-param>
  1195.         -->
  1196.         </xsl:call-template>
  1197.         <xsl:if test="string-length(zavrsetakStudija/latNazCumLaude) != 0">
  1198.             <xsl:call-template name="secondLevel">
  1199.                 <xsl:with-param name="number" select="''"/>
  1200.                 <xsl:with-param name="label" select="''"/>
  1201.                 <xsl:with-param name="value" select="''"/>
  1202.                 <xsl:with-param name="smallcapsAppendedText">
  1203.                     <xsl:value-of select="lower-case(zavrsetakStudija/latNazCumLaude)"/>
  1204.                     <xsl:text> (</xsl:text>
  1205.                     <xsl:value-of select="lower-case(zavrsetakStudija/nazCumLaude)"/>
  1206.                     <xsl:text>)</xsl:text>
  1207.                 </xsl:with-param>
  1208.             </xsl:call-template>
  1209.         </xsl:if>
  1210.     </xsl:template>
  1211.     <!-- kraj procedure za ispis ukupne klasifikacije kvalifikacije -->
  1212.  
  1213.     <!-- procedura za ispis funkcije kvalifikacije -->
  1214.     <xsl:template name="ispisFunkcijeKvalifikacije">
  1215.         <xsl:param name="lang"/>
  1216.         <!-- prazan red -->
  1217.         <xsl:call-template name="emptyLine"/>
  1218.         <xsl:call-template name="firstLevel">
  1219.             <xsl:with-param name="number" select="'5'"/>
  1220.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title5"/>
  1221.         </xsl:call-template>
  1222.         <xsl:call-template name="secondLevel">
  1223.             <xsl:with-param name="number" select="'5.1'"/>
  1224.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title5.1"/>
  1225.             <xsl:with-param name="value">
  1226.                 <xsl:for-each select="pristupDaljnjemStudijuPoStudiju/pristupDaljnjemStudiju/para">
  1227.                     <xsl:apply-templates select="."/>
  1228.                     <xsl:if test="position() != last()">
  1229.                         <xsl:text> </xsl:text>
  1230.                     </xsl:if>
  1231.                 </xsl:for-each>
  1232.             </xsl:with-param>
  1233.             <xsl:with-param name="hyphenated" select="$lang"/>
  1234.         </xsl:call-template>
  1235.         <xsl:call-template name="secondLevel">
  1236.             <xsl:with-param name="number" select="'5.2'"/>
  1237.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title5.2"/>
  1238.             <xsl:with-param name="value">
  1239.                 <xsl:for-each select="profesionalniStatusPoStudiju/profesionalniStatus/para">
  1240.                     <xsl:apply-templates select="."/>
  1241.                     <xsl:if test="position() != last()">
  1242.                         <xsl:text> </xsl:text>
  1243.                     </xsl:if>
  1244.                 </xsl:for-each>
  1245.             </xsl:with-param>
  1246.             <xsl:with-param name="hyphenated" select="$lang"/>
  1247.         </xsl:call-template>
  1248.     </xsl:template>
  1249.     <!-- kraj procedure za ispis funkcije kvalifikacije -->
  1250.  
  1251.  
  1252.     <!-- procedura za ispis dodatne informacije -->
  1253.     <xsl:template name="ispisDodatneInformacije">
  1254.         <xsl:param name="lang"/>
  1255.  
  1256.         <xsl:variable name="dodInfoNagrade">
  1257.             <xsl:for-each select="nagrade/nagrada">
  1258.                 <dodInfoNagrada>
  1259.                     <xsl:value-of select="godina"/>
  1260.                     <xsl:text>, </xsl:text>
  1261.                     <xsl:value-of select="nazVrNagrada"/>
  1262.                     <xsl:if test="string-length(naslovRada) &gt; 0">
  1263.                         <xsl:text>, </xsl:text>
  1264.                         <xsl:value-of select="naslovRada"/>
  1265.                     </xsl:if>
  1266.                 </dodInfoNagrada>
  1267.             </xsl:for-each>
  1268.  
  1269.             <xsl:for-each select="dodatneInformacije/dodInfo">
  1270.                 <dodInfoNagrada>
  1271.                     <xsl:value-of select="dodinf"/>
  1272.                 </dodInfoNagrada>
  1273.             </xsl:for-each>
  1274.         </xsl:variable>
  1275.  
  1276.         <xsl:variable name="brojDodInfoNagrade" select="count($dodInfoNagrade/dodInfoNagrada)"/>
  1277.         <!-- prazan red -->
  1278.         <xsl:call-template name="emptyLine"/>
  1279.         <xsl:call-template name="firstLevel">
  1280.             <xsl:with-param name="number" select="'6'"/>
  1281.             <xsl:with-param name="label">
  1282.                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title6"/>
  1283.             </xsl:with-param>
  1284.         </xsl:call-template>
  1285.         <xsl:call-template name="secondLevel">
  1286.             <xsl:with-param name="number" select="'6.1'"/>
  1287.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title6.1"/>
  1288.             <xsl:with-param name="value">
  1289.                 <xsl:choose>
  1290.                     <xsl:when test="$brojDodInfoNagrade = 0">
  1291.                         <xsl:call-template name="textNotApplicable"/>
  1292.                     </xsl:when>
  1293.                     <xsl:otherwise>
  1294.                         <xsl:apply-templates select="$dodInfoNagrade/dodInfoNagrada[position() = 1]"/>
  1295.                     </xsl:otherwise>
  1296.                 </xsl:choose>
  1297.             </xsl:with-param>
  1298.             <xsl:with-param name="hyphenated" select="$lang"/>
  1299.         </xsl:call-template>
  1300.         <xsl:for-each select="$dodInfoNagrade/dodInfoNagrada[position() &gt; 1]">
  1301.             <xsl:call-template name="secondLevel">
  1302.                 <xsl:with-param name="number"/>
  1303.                 <xsl:with-param name="label"/>
  1304.                 <xsl:with-param name="value">
  1305.                     <xsl:apply-templates select="."/>
  1306.                 </xsl:with-param>
  1307.                 <xsl:with-param name="hyphenated">
  1308.                     <xsl:value-of select="$lang"/>
  1309.                 </xsl:with-param>
  1310.             </xsl:call-template>
  1311.         </xsl:for-each>
  1312.  
  1313.         <xsl:call-template name="secondLevel">
  1314.             <xsl:with-param name="number" select="'6.2'"/>
  1315.             <xsl:with-param name="label" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title6.2"/>
  1316.             <xsl:with-param name="value">
  1317.                 <xsl:for-each select="ostaliIzvori/izvor">
  1318.                     <xsl:sort select="@rbr"/>
  1319.                     <xsl:value-of select="."/>
  1320.                     <xsl:if test="position() != last()">
  1321.                         <xsl:text>; </xsl:text>
  1322.                     </xsl:if>
  1323.                 </xsl:for-each>
  1324.             </xsl:with-param>
  1325.         </xsl:call-template>
  1326.     </xsl:template>
  1327.  
  1328.     <xsl:template match="nagrada">
  1329.         <xsl:value-of select="godina"/>
  1330.         <xsl:text>, </xsl:text>
  1331.         <xsl:value-of select="nazVrNagrada"/>
  1332.         <xsl:if test="string-length(naslovRada) &gt; 0">
  1333.             <xsl:text>, </xsl:text>
  1334.             <xsl:value-of select="naslovRada"/>
  1335.         </xsl:if>
  1336.     </xsl:template>
  1337.  
  1338.     <!-- kraj procedure za ispis dodatne informacije -->
  1339.     <!-- procedura za certificiranje dokumenta -->
  1340.     <xsl:template name="ispisCertifikata">
  1341.         <xsl:param name="lang"/>
  1342.         <xsl:call-template name="firstLevelFooterThirdPage">
  1343.             <xsl:with-param name="number" select="'7'"/>
  1344.             <xsl:with-param name="label">
  1345.                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title7"/>
  1346.             </xsl:with-param>
  1347.         </xsl:call-template>
  1348.  
  1349.         <!-- prazan red -->
  1350.         <xsl:call-template name="emptyLine"/>
  1351.  
  1352.         <fo:table table-layout="fixed" width="100%">
  1353.             <fo:table-column column-width="45pt"/>
  1354.             <fo:table-column column-width="14pt"/>
  1355.             <fo:table-column column-width="105pt"/>
  1356.             <fo:table-column column-width="7.2pt"/>
  1357.             <fo:table-column column-width="6.8pt"/>
  1358.             <fo:table-column column-width="105pt"/>
  1359.             <fo:table-column column-width="7.2pt"/>
  1360.             <fo:table-column column-width="6.8pt"/>
  1361.             <fo:table-column column-width="105pt"/>
  1362.             <fo:table-column column-width="7.2pt"/>
  1363.             <fo:table-column column-width="6.8pt"/>
  1364.             <fo:table-column column-width="105pt"/>
  1365.             <fo:table-body>
  1366.                 <fo:table-row keep-together="always">
  1367.                     <fo:table-cell>
  1368.                         <fo:block/>
  1369.                     </fo:table-cell>
  1370.                     <fo:table-cell>
  1371.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine1">
  1372.                             <xsl:text>7.1</xsl:text>
  1373.                         </fo:block>
  1374.                     </fo:table-cell>
  1375.                     <fo:table-cell>
  1376.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1377.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title7.1"/>
  1378.                         </fo:block>
  1379.                     </fo:table-cell>
  1380.                     <fo:table-cell>
  1381.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine1">
  1382.                             <xsl:text>7.2</xsl:text>
  1383.                         </fo:block>
  1384.                     </fo:table-cell>
  1385.                     <fo:table-cell>
  1386.                         <fo:block/>
  1387.                     </fo:table-cell>
  1388.                     <fo:table-cell>
  1389.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1390.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title7.2"/>
  1391.                         </fo:block>
  1392.                     </fo:table-cell>
  1393.                     <fo:table-cell>
  1394.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine1">
  1395.                             <xsl:text>7.3</xsl:text>
  1396.                         </fo:block>
  1397.                     </fo:table-cell>
  1398.                     <fo:table-cell>
  1399.                         <fo:block/>
  1400.                     </fo:table-cell>
  1401.                     <fo:table-cell>
  1402.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1403.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title7.3"/>
  1404.                         </fo:block>
  1405.                     </fo:table-cell>
  1406.                     <fo:table-cell>
  1407.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine1">
  1408.                             <xsl:text>7.4</xsl:text>
  1409.                         </fo:block>
  1410.                     </fo:table-cell>
  1411.                     <fo:table-cell>
  1412.                         <fo:block/>
  1413.                     </fo:table-cell>
  1414.                     <fo:table-cell>
  1415.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1416.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title7.4"/>
  1417.                         </fo:block>
  1418.                     </fo:table-cell>
  1419.                 </fo:table-row>
  1420.                 <fo:table-row keep-together.within-column="always">
  1421.                     <fo:table-cell number-columns-spanned="2">
  1422.                         <fo:block/>
  1423.                     </fo:table-cell>
  1424.                     <fo:table-cell number-columns-spanned="3">
  1425.                         <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1426.                             <xsl:value-of select="ovjeraIsprave/mjestoIzdavanja"/>
  1427.                             <xsl:text>, </xsl:text>
  1428.                             <xsl:value-of select="ovjeraIsprave/datumIzdavanja"/>
  1429.                         </fo:block>
  1430.                     </fo:table-cell>
  1431.                     <fo:table-cell number-columns-spanned="3">
  1432.                         <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1433.                             <xsl:value-of select="ovjeraIsprave/imePotpisnika"/>
  1434.                         </fo:block>
  1435.                         <fo:block padding-top="35pt" margin-right="25pt" border-after-width="{$signatureLineThicknes}" border-after-style="solid">
  1436.                         </fo:block>
  1437.                     </fo:table-cell>
  1438.                     <fo:table-cell number-columns-spanned="3">
  1439.                         <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1440.                             <xsl:value-of select="ovjeraIsprave/funkcijaPotpisnika"/>
  1441.                         </fo:block>
  1442.                     </fo:table-cell>
  1443.                     <fo:table-cell>
  1444.                         <fo:block/>
  1445.                     </fo:table-cell>
  1446.                 </fo:table-row>
  1447.             </fo:table-body>
  1448.         </fo:table>
  1449.     </xsl:template>
  1450.     <!-- kraj procedure za certificiranje dokumenta -->
  1451.  
  1452.     <xsl:template name="textNotApplicable">
  1453.         <xsl:call-template name="emDash"/>
  1454.     </xsl:template>
  1455.  
  1456.     <xsl:template name="enDash">
  1457.         <xsl:text>&#x2013;</xsl:text>
  1458.     </xsl:template>
  1459.  
  1460.     <xsl:template name="emDash">
  1461.         <xsl:text>&#x2014;</xsl:text>
  1462.     </xsl:template>
  1463.  
  1464.  
  1465.     <xsl:template name="emptyLine">
  1466.         <fo:block span="all" padding-top="{$lineHeightForLeading13}"/>
  1467.         <!--  <xsl:attribute name="background-color">yellow</xsl:attribute> -->
  1468.     </xsl:template>
  1469.  
  1470.  
  1471.  
  1472.     <xsl:template name="firstLevel">
  1473.         <xsl:param name="number"/>
  1474.         <xsl:param name="label"/>
  1475.         <!--<fo:block span="all">
  1476.             <fo:table table-layout="fixed" width="100%">
  1477.                 <fo:table-column column-width="14pt"/>
  1478.                 <fo:table-column column-width="455pt"/>
  1479.                 <fo:table-body>
  1480.                     <fo:table-row>
  1481.                         <fo:table-cell>
  1482.                             <fo:block start-indent="-14pt" xsl:use-attribute-sets="attset-labeleRazine1">
  1483.                                 <xsl:value-of select="$number"/>
  1484.                             </fo:block>
  1485.                         </fo:table-cell>
  1486.                         <fo:table-cell>
  1487.                             <fo:block text-align="center" xsl:use-attribute-sets="attset-labeleRazine1">
  1488.                                 <xsl:value-of select="$label"/>
  1489.                             </fo:block>
  1490.                         </fo:table-cell>
  1491.                     </fo:table-row>
  1492.                 </fo:table-body>
  1493.             </fo:table>
  1494.         </fo:block>-->
  1495.         <fo:block xsl:use-attribute-sets="attset-labeleRazine1">
  1496.             <xsl:value-of select="$number" />
  1497.             <xsl:text>. </xsl:text>
  1498.             <xsl:value-of select="upper-case($label)" />
  1499.         </fo:block>
  1500.     </xsl:template>
  1501.  
  1502.     <xsl:template name="firstLevelFooterThirdPage">
  1503.         <xsl:param name="number"/>
  1504.         <xsl:param name="label"/>
  1505.         <fo:block span="all">
  1506.             <fo:table table-layout="fixed" width="100%">
  1507.                 <fo:table-column column-width="59pt"/>
  1508.                 <fo:table-column column-width="14pt"/>
  1509.                 <fo:table-column column-width="455pt"/>
  1510.                 <fo:table-body>
  1511.                     <fo:table-row>
  1512.                         <fo:table-cell>
  1513.                             <fo:block/>
  1514.                         </fo:table-cell>
  1515.                         <fo:table-cell>
  1516.                             <fo:block start-indent="-14pt" xsl:use-attribute-sets="attset-labeleRazine1">
  1517.                                 <xsl:value-of select="$number"/>
  1518.                             </fo:block>
  1519.                         </fo:table-cell>
  1520.                         <fo:table-cell>
  1521.                             <fo:block text-align="center" xsl:use-attribute-sets="attset-labeleRazine1">
  1522.                                 <xsl:value-of select="$label"/>
  1523.                             </fo:block>
  1524.                         </fo:table-cell>
  1525.                     </fo:table-row>
  1526.                 </fo:table-body>
  1527.             </fo:table>
  1528.         </fo:block>
  1529.     </xsl:template>
  1530.  
  1531.     <xsl:template name="secondLevel">
  1532.         <xsl:param name="number" select="''"/>
  1533.         <xsl:param name="label" select="''"/>
  1534.         <xsl:param name="value"/>
  1535.         <xsl:param name="hyphenated" select="''"/>
  1536.         <xsl:param name="smallcapsAppendedText" select="''"/>
  1537.  
  1538.         <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1539.             <xsl:value-of select="$number"/>
  1540.             <xsl:text>. </xsl:text>
  1541.             <xsl:call-template name="annotateSpecECTSlabela">
  1542.                 <xsl:with-param name="ectsNaslovLabele" select="$label"/>
  1543.             </xsl:call-template>
  1544.             <xsl:text>:</xsl:text>
  1545.         </fo:block>
  1546.  
  1547.         <fo:block xsl:use-attribute-sets="attset-podaciRazine2" linefeed-treatment="preserve">
  1548.             <xsl:value-of select="$value"/>
  1549.             <xsl:if test="string-length($smallcapsAppendedText) != 0">
  1550.                 <xsl:text> </xsl:text>
  1551.                 <fo:inline xsl:use-attribute-sets="attset-cumLaude">
  1552.                     <xsl:value-of select="$smallcapsAppendedText"/>
  1553.                 </fo:inline>
  1554.             </xsl:if>
  1555.         </fo:block>
  1556.  
  1557.         <!--<fo:block span="all">
  1558.             <fo:table table-layout="fixed" width="100%">
  1559.                 <fo:table-column column-width="18pt"/>
  1560.                 <fo:table-column column-width="217pt"/>
  1561.                 <fo:table-column column-width="7pt"/>
  1562.                 <fo:table-column column-width="223pt"/>
  1563.                 <fo:table-body>
  1564.                     <fo:table-row>
  1565.                         <fo:table-cell>
  1566.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1567.                                 <xsl:value-of select="$number"/>
  1568.                                 <xsl:text>.</xsl:text>
  1569.                             </fo:block>
  1570.                         </fo:table-cell>
  1571.                         <fo:table-cell>
  1572.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2" text-align="left">
  1573.                                 <xsl:call-template name="annotateSpecECTSlabela">
  1574.                                     <xsl:with-param name="ectsNaslovLabele" select="$label"/>
  1575.                                 </xsl:call-template>
  1576.                                 <xsl:text>:</xsl:text>
  1577.                             </fo:block>
  1578.                         </fo:table-cell>
  1579.                         <fo:table-cell>
  1580.                             <fo:block/>
  1581.                         </fo:table-cell>
  1582.                         <fo:table-cell display-align="after">
  1583.                             <xsl:choose>
  1584.                                 <xsl:when test="string-length($hyphenated) != 0">
  1585.                                     <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1586.                                         <xsl:call-template name="attributes-hyphenated">
  1587.                                             <xsl:with-param name="lang" select="$hyphenated"/>
  1588.                                         </xsl:call-template>
  1589.                                         <xsl:value-of select="$value"/>
  1590.                                     </fo:block>
  1591.                                 </xsl:when>
  1592.                                 <xsl:otherwise>
  1593.                                     <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1594.                                         <xsl:value-of select="$value"/>
  1595.                                         <xsl:if test="string-length($smallcapsAppendedText) != 0">
  1596.                                             <xsl:text> </xsl:text>
  1597.                                             <fo:inline xsl:use-attribute-sets="attset-cumLaude">
  1598.                                                 <xsl:value-of select="$smallcapsAppendedText"/>
  1599.                                             </fo:inline>
  1600.                                         </xsl:if>
  1601.                                     </fo:block>
  1602.                                 </xsl:otherwise>
  1603.                             </xsl:choose>
  1604.                         </fo:table-cell>
  1605.                     </fo:table-row>
  1606.                 </fo:table-body>
  1607.             </fo:table>
  1608.         </fo:block>-->
  1609.     </xsl:template>
  1610.  
  1611.     <xsl:template name="secondLevelStudent">
  1612.         <xsl:param name="number" select="''"/>
  1613.         <xsl:param name="label" select="''"/>
  1614.         <xsl:param name="value"/>
  1615.         <xsl:param name="hyphenated" select="''"/>
  1616.         <xsl:param name="smallcapsAppendedText" select="''"/>
  1617.  
  1618.  
  1619.         <fo:block span="all">
  1620.             <fo:table table-layout="fixed" width="100%">
  1621.                 <fo:table-column column-width="18pt"/>
  1622.                 <fo:table-column column-width="217pt"/>
  1623.                 <fo:table-column column-width="7pt"/>
  1624.                 <fo:table-column column-width="223pt"/>
  1625.                 <fo:table-body>
  1626.                     <fo:table-row>
  1627.                         <fo:table-cell>
  1628.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1629.                                 <xsl:value-of select="$number"/>
  1630.                                 <xsl:text>.</xsl:text>
  1631.                             </fo:block>
  1632.                         </fo:table-cell>
  1633.                         <fo:table-cell>
  1634.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2" text-align="left">
  1635.                                 <xsl:call-template name="annotateSpecECTSlabela">
  1636.                                     <xsl:with-param name="ectsNaslovLabele" select="$label"/>
  1637.                                 </xsl:call-template>
  1638.                                 <xsl:text>:</xsl:text>
  1639.                             </fo:block>
  1640.                         </fo:table-cell>
  1641.                         <fo:table-cell>
  1642.                             <fo:block/>
  1643.                         </fo:table-cell>
  1644.                         <fo:table-cell display-align="after">
  1645.                             <xsl:choose>
  1646.                                 <xsl:when test="string-length($hyphenated) != 0">
  1647.                                     <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1648.                                         <xsl:call-template name="attributes-hyphenated">
  1649.                                             <xsl:with-param name="lang" select="$hyphenated"/>
  1650.                                         </xsl:call-template>
  1651.                                         <xsl:value-of select="$value"/>
  1652.                                     </fo:block>
  1653.                                 </xsl:when>
  1654.                                 <xsl:otherwise>
  1655.                                     <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1656.                                         <xsl:value-of select="$value"/>
  1657.                                         <xsl:if test="string-length($smallcapsAppendedText) != 0">
  1658.                                             <xsl:text> </xsl:text>
  1659.                                             <fo:inline xsl:use-attribute-sets="attset-cumLaude">
  1660.                                                 <xsl:value-of select="$smallcapsAppendedText"/>
  1661.                                             </fo:inline>
  1662.                                         </xsl:if>
  1663.                                     </fo:block>
  1664.                                 </xsl:otherwise>
  1665.                             </xsl:choose>
  1666.                         </fo:table-cell>
  1667.                     </fo:table-row>
  1668.                 </fo:table-body>
  1669.             </fo:table>
  1670.         </fo:block>
  1671.     </xsl:template>
  1672.  
  1673.     <xsl:template name="secondLevelFooterSecondPage">
  1674.         <xsl:param name="number" select="''"/>
  1675.         <xsl:param name="label" select="''"/>
  1676.         <xsl:param name="lang"/>
  1677.         <xsl:param name="value"/>
  1678.  
  1679.         <fo:block span="all">
  1680.             <fo:table table-layout="fixed" width="100%">
  1681.                 <fo:table-column column-width="53pt"/>
  1682.                 <fo:table-column column-width="14pt"/>
  1683.                 <fo:table-column column-width="231pt"/>
  1684.                 <fo:table-column column-width="7pt"/>
  1685.                 <fo:table-column column-width="231pt"/>
  1686.                 <fo:table-body>
  1687.                     <fo:table-row>
  1688.                         <fo:table-cell>
  1689.                             <fo:block/>
  1690.                         </fo:table-cell>
  1691.                         <fo:table-cell>
  1692.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine1">
  1693.                                 <xsl:value-of select="$number"/>
  1694.                             </fo:block>
  1695.                         </fo:table-cell>
  1696.                         <fo:table-cell>
  1697.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2" text-align="right">
  1698.                                 <xsl:call-template name="annotateSpecECTSlabela">
  1699.                                     <xsl:with-param name="ectsNaslovLabele">
  1700.                                         <xsl:value-of select="$label"/>
  1701.                                     </xsl:with-param>
  1702.                                 </xsl:call-template>
  1703.                             </fo:block>
  1704.                         </fo:table-cell>
  1705.                         <fo:table-cell>
  1706.                             <fo:block/>
  1707.                         </fo:table-cell>
  1708.                         <fo:table-cell display-align="after">
  1709.                             <fo:block xsl:use-attribute-sets="attset-podaciRazine2">
  1710.                                 <xsl:value-of select="$value"/>
  1711.                             </fo:block>
  1712.                         </fo:table-cell>
  1713.                     </fo:table-row>
  1714.                 </fo:table-body>
  1715.             </fo:table>
  1716.         </fo:block>
  1717.     </xsl:template>
  1718.  
  1719.     <xsl:template name="secondLevelNoData">
  1720.         <xsl:param name="number"/>
  1721.         <xsl:param name="label"/>
  1722.         <xsl:param name="alwaysKeepWithNext">N</xsl:param>
  1723.         <fo:block span="all">
  1724.             <xsl:if test="$alwaysKeepWithNext = 'D'">
  1725.                 <xsl:attribute name="keep-with-next.within-page" select="'always'"/>
  1726.             </xsl:if>
  1727.             <fo:table table-layout="fixed" width="100%">
  1728.                 <fo:table-column column-width="18pt"/>
  1729.                 <fo:table-column column-width="451pt"/>
  1730.                 <fo:table-body>
  1731.                     <fo:table-row>
  1732.                         <fo:table-cell>
  1733.                             <!--<fo:block start-indent="-14pt" xsl:use-attribute-sets="attset-labeleRazine1">-->
  1734.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2">
  1735.                                 <xsl:value-of select="$number"/>
  1736.                                 <xsl:text>.</xsl:text>
  1737.                             </fo:block>
  1738.                         </fo:table-cell>
  1739.                         <fo:table-cell>
  1740.                             <fo:block xsl:use-attribute-sets="attset-labeleRazine2" text-align="left">
  1741.                                 <xsl:call-template name="annotateSpecECTSlabela">
  1742.                                     <xsl:with-param name="ectsNaslovLabele">
  1743.                                         <xsl:value-of select="$label"/>
  1744.                                     </xsl:with-param>
  1745.                                 </xsl:call-template>
  1746.                             </fo:block>
  1747.                         </fo:table-cell>
  1748.                     </fo:table-row>
  1749.                 </fo:table-body>
  1750.             </fo:table>
  1751.         </fo:block>
  1752.     </xsl:template>
  1753.  
  1754.  
  1755.     <xsl:template match="prijepisOcjena">
  1756.         <xsl:param name="lang"/>
  1757.  
  1758.         <!-- ORIGINAL: <fo:table table-layout="fixed" width="100%" keep-together="auto">-->
  1759.         <!--<fo:table table-layout="fixed" width="100%" keep-together.within-column="1">-->
  1760.         <fo:table table-layout="fixed" width="100%">
  1761.             <fo:table-column column-width="9pt"/>
  1762.             <fo:table-column column-width="30pt"/>
  1763.             <fo:table-column column-width="150pt"/>
  1764.             <fo:table-column column-width="40pt"/>
  1765.             <fo:table-column column-width="20pt"/>
  1766.             <fo:table-column column-width="50pt"/>
  1767.             <fo:table-column column-width="20pt"/>
  1768.             <fo:table-header xsl:use-attribute-sets="attset-zaglavljeTabliceOcjena">
  1769.                 <fo:table-row>
  1770.                     <fo:table-cell>
  1771.                         <fo:block/>
  1772.                     </fo:table-cell>
  1773.                     <fo:table-cell display-align="after">
  1774.                         <fo:block text-align="center">
  1775.                             <!--<xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textTotalHours"/>-->
  1776.                             <xsl:text>Sifra predmeta</xsl:text>
  1777.                         </fo:block>
  1778.                     </fo:table-cell>
  1779.                     <fo:table-cell display-align="after">
  1780.                         <fo:block text-align="left">
  1781.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textSubject"/>
  1782.                         </fo:block>
  1783.                     </fo:table-cell>
  1784.                     <fo:table-cell display-align="after">
  1785.                         <fo:block text-align="center">
  1786.                             <!-- <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textDateOfExamination"/> -->
  1787.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textTotalHours"/>
  1788.                         </fo:block>
  1789.                     </fo:table-cell>
  1790.                     <fo:table-cell display-align="after">
  1791.                         <fo:block text-align="center">
  1792.                             <!--<xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textGrade"/>-->
  1793.                             <xsl:text>Status predmeta</xsl:text>
  1794.                         </fo:block>
  1795.                     </fo:table-cell>
  1796.                     <fo:table-cell>
  1797.                         <fo:block text-align="center">
  1798.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textGrade"/>
  1799.                         </fo:block>
  1800.                     </fo:table-cell>
  1801.                     <fo:table-cell display-align="after">
  1802.                         <!--<fo:block text-align="left">
  1803.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textSubject"/>
  1804.                         </fo:block>-->
  1805.                         <fo:block text-align="center">
  1806.                             <xsl:call-template name="annotateSpecECTStablica">
  1807.                                 <xsl:with-param name="ectsNaslovTablice" select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textEctsCredits"/>
  1808.                             </xsl:call-template>
  1809.                         </fo:block>
  1810.                     </fo:table-cell>
  1811.                 </fo:table-row>
  1812.             </fo:table-header>
  1813.             <fo:table-body xsl:use-attribute-sets="attset-podaciRazine2">
  1814.                 <!-- naslov poglavlja koji se prikazuje ili ne -->
  1815.                 <xsl:if test="count(../prijepisOcjenaNeUlazeUStjecanjeNaziva/ocjena) &gt; 0">
  1816.                     <fo:table-row keep-with-previous.within-column="always" keep-with-next.within-column="always">
  1817.                         <fo:table-cell number-columns-spanned="11">
  1818.                             <fo:block xsl:use-attribute-sets="attset-zaglavljeTabliceOcjena" text-align="left">
  1819.                                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textGradeInQualification"/>
  1820.                             </fo:block>
  1821.                         </fo:table-cell>
  1822.                     </fo:table-row>
  1823.                 </xsl:if>
  1824.                 <!-- kad se run svede, mose ostati samo ocjene/ocjena, onaj ostatak je radi stare verzije -->
  1825.                 <xsl:apply-templates select="ocjene/ocjena|ocjena"/>
  1826.                 <!--<xsl:if test="count(../prijepisOcjenaNeUlazeUStjecanjeNaziva/ocjena) &gt; 0">
  1827.                     <xsl:call-template name="ispisOcjenaNeUlaziUStjecanjeNaziva">
  1828.                         <xsl:with-param name="lang" select="$lang"/>
  1829.                     </xsl:call-template>
  1830.                 </xsl:if>
  1831.                 <xsl:call-template name="ispisDodEctsBodova">
  1832.                     <xsl:with-param name="lang" select="$lang"/>
  1833.                 </xsl:call-template>
  1834.                 <xsl:if test="count(../boravci/boravak) &gt; 0">
  1835.                     <xsl:call-template name="ispisStudijskihBoravaka">
  1836.                         <xsl:with-param name="lang" select="$lang"/>
  1837.                     </xsl:call-template>
  1838.                 </xsl:if>-->
  1839.             </fo:table-body>
  1840.         </fo:table>
  1841.     </xsl:template>
  1842.  
  1843.  
  1844.     <xsl:template match="ocjena">
  1845.         <fo:table-row keep-together="auto">
  1846.             <xsl:if test="position() = last()">
  1847.                 <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
  1848.             </xsl:if>
  1849.             <xsl:apply-templates select="rbrOcjena"/>
  1850.             <xsl:apply-templates select="sifPred"/>
  1851.             <xsl:apply-templates select="nazPred"/>
  1852.             <xsl:apply-templates select="satiUkupno"/>
  1853.             <xsl:apply-templates select="satiUkupno"/>
  1854.             <xsl:apply-templates select="kratOcjena"/>
  1855.             <xsl:apply-templates select="ectsBod"/>
  1856.             <!--<xsl:apply-templates select="datumIspit"/>-->
  1857.         </fo:table-row>
  1858.     </xsl:template>
  1859.  
  1860.     <xsl:template match="sifPred">
  1861.         <fo:table-cell>
  1862.             <fo:block text-align="center" xsl:use-attribute-sets="attset-podaciTabliceOcjena">
  1863.                 <xsl:value-of select="."/>
  1864.             </fo:block>
  1865.         </fo:table-cell>
  1866.     </xsl:template>
  1867.  
  1868.     <xsl:template match="kratOcjena">
  1869.         <fo:table-cell>
  1870.             <fo:block text-align="center" xsl:use-attribute-sets="attset-podaciTabliceOcjena">
  1871.                 <xsl:choose>
  1872.                     <xsl:when test=". = '-'">
  1873.                         <fo:block>
  1874.                             <xsl:call-template name="textNotApplicable"/>
  1875.                         </fo:block>
  1876.                     </xsl:when>
  1877.                     <xsl:otherwise>
  1878.                         <xsl:value-of select="."/>
  1879.                     </xsl:otherwise>
  1880.                 </xsl:choose>
  1881.             </fo:block>
  1882.         </fo:table-cell>
  1883.     </xsl:template>
  1884.  
  1885.     <xsl:template match="datumIspit">
  1886.         <fo:table-cell>
  1887.             <fo:block text-align="center" line-height="{$lineHeightTablicaOcjena}">
  1888.                 <fo:inline xsl:use-attribute-sets="attset-inline-datumIspit">
  1889.                     <xsl:value-of select="."/>
  1890.                 </fo:inline>
  1891.             </fo:block>
  1892.         </fo:table-cell>
  1893.     </xsl:template>
  1894.  
  1895.     <xsl:template match="rbrOcjena|rbrEcts">
  1896.         <fo:table-cell>
  1897.             <fo:block text-align="left" line-height="{$lineHeightTablicaOcjena}">
  1898.                 <fo:inline xsl:use-attribute-sets="attset-inline-rbrOcjena">
  1899.                     <xsl:value-of select="."/>
  1900.                 </fo:inline>
  1901.                 <xsl:text>.</xsl:text>
  1902.             </fo:block>
  1903.         </fo:table-cell>
  1904.     </xsl:template>
  1905.  
  1906.     <xsl:template match="rbrOrgJedIzv">
  1907.         <xsl:param name="maxBrojZvjezdica" select="0"/>
  1908.         <fo:table-cell>
  1909.             <fo:block text-align="left" line-height="{$lineHeightTablicaOcjena}">
  1910.                 <fo:inline>
  1911.                     <xsl:call-template name="atributiZaZvjezdiceStudijskihBoravaka">
  1912.                         <xsl:with-param name="maxBrojZvjezdica" select="$maxBrojZvjezdica"/>
  1913.                     </xsl:call-template>
  1914.                     <xsl:call-template name="formirajZvjezdice">
  1915.                         <xsl:with-param name="brojZvjezdica" select="."/>
  1916.                     </xsl:call-template>
  1917.                 </fo:inline>
  1918.             </fo:block>
  1919.         </fo:table-cell>
  1920.     </xsl:template>
  1921.  
  1922.     <xsl:template name="atributiZaZvjezdiceStudijskihBoravaka">
  1923.         <xsl:param name="maxBrojZvjezdica"/>
  1924.         <xsl:attribute name="font-family">Supplement_Normal</xsl:attribute>
  1925.         <xsl:attribute name="font-weight">normal</xsl:attribute>
  1926.         <xsl:attribute name="line-height" select="$lineHeightTablicaOcjena"/>
  1927.         <xsl:choose>
  1928.             <xsl:when test="$maxBrojZvjezdica &lt; 3">
  1929.                 <xsl:attribute name="font-size">7pt</xsl:attribute>
  1930.                 <xsl:attribute name="baseline-shift">1pt</xsl:attribute>
  1931.             </xsl:when>
  1932.             <xsl:when test="$maxBrojZvjezdica = 3">
  1933.                 <xsl:attribute name="font-size">6.3pt</xsl:attribute>
  1934.                 <xsl:attribute name="baseline-shift">1.3pt</xsl:attribute>
  1935.             </xsl:when>
  1936.             <xsl:when test="$maxBrojZvjezdica &gt;= 4">
  1937.                 <xsl:attribute name="font-size">5.25pt</xsl:attribute>
  1938.                 <xsl:attribute name="baseline-shift">1.9pt</xsl:attribute>
  1939.             </xsl:when>
  1940.         </xsl:choose>
  1941.     </xsl:template>
  1942.  
  1943.     <xsl:template match="satiUkupno|ectsBod">
  1944.         <fo:table-cell>
  1945.             <fo:block text-align="center" xsl:use-attribute-sets="attset-podaciTabliceOcjena">
  1946.                 <xsl:choose>
  1947.                     <xsl:when test=". = '-'">
  1948.                         <fo:block>
  1949.                             <xsl:call-template name="textNotApplicable"/>
  1950.                         </fo:block>
  1951.                     </xsl:when>
  1952.                     <xsl:otherwise>
  1953.                         <xsl:value-of select="."/>
  1954.                     </xsl:otherwise>
  1955.                 </xsl:choose>
  1956.             </fo:block>
  1957.         </fo:table-cell>
  1958.     </xsl:template>
  1959.  
  1960.     <xsl:template match="naziv">
  1961.         <fo:table-cell>
  1962.             <fo:block xsl:use-attribute-sets="attset-blockNazDodEctsBod">
  1963.                 <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
  1964.                 <xsl:value-of select="."/>
  1965.                 <xsl:variable name="brojZvjezdica" select="../rbrOrgJedIzv"/>
  1966.                 <xsl:if test="$brojZvjezdica &gt; 0">
  1967.                     <!-- ispisati onoliko zvjezdica koliko piše u $brojfusnota -->
  1968.                     <fo:inline xsl:use-attribute-sets="attset-inlineSuperscriptNazDodEctsBod">
  1969.                         <xsl:call-template name="formirajZvjezdice">
  1970.                             <xsl:with-param name="brojZvjezdica" select="$brojZvjezdica"/>
  1971.                         </xsl:call-template>
  1972.                     </fo:inline>
  1973.                 </xsl:if>
  1974.             </fo:block>
  1975.         </fo:table-cell>
  1976.     </xsl:template>
  1977.  
  1978.  
  1979.     <xsl:template match="nazPred">
  1980.         <fo:table-cell>
  1981.             <fo:block xsl:use-attribute-sets="attset-podaciTabliceOcjena">
  1982.                 <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
  1983.                 <xsl:value-of select="supplement:sprijeciLomKratkogKrajaTeksta(.)"/>
  1984.                 <xsl:variable name="brojZvjezdica" select="../rbrOrgJedIzv"/>
  1985.                 <xsl:if test="$brojZvjezdica &gt; 0">
  1986.                     <!-- ispisati onoliko zvjezdica koliko piše u $brojfusnota -->
  1987.                     <fo:inline xsl:use-attribute-sets="attset-inlineSuperscriptNazPred">
  1988.                         <xsl:call-template name="formirajZvjezdice">
  1989.                             <xsl:with-param name="brojZvjezdica" select="$brojZvjezdica"/>
  1990.                         </xsl:call-template>
  1991.                     </fo:inline>
  1992.                 </xsl:if>
  1993.             </fo:block>
  1994.  
  1995.             <xsl:if test="string-length(../komentarPred) != 0">
  1996.                 <fo:block xsl:use-attribute-sets="attset-podaciTabliceStranoVuPredmeta">
  1997.                     <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
  1998.                     <xsl:value-of select="../komentarPred"/>
  1999.                 </fo:block>
  2000.             </xsl:if>
  2001.         </fo:table-cell>
  2002.     </xsl:template>
  2003.  
  2004.     <xsl:template name="ispisOcjenaNeUlaziUStjecanjeNaziva">
  2005.         <xsl:param name="lang"/>
  2006.         <fo:table-row number-rows-spanned="2" keep-with-previous.within-column="always">
  2007.             <fo:table-cell number-columns-spanned="11">
  2008.                 <fo:block>
  2009.                     <xsl:text>&#xA0;</xsl:text>
  2010.                 </fo:block>
  2011.             </fo:table-cell>
  2012.         </fo:table-row>
  2013.         <fo:table-row keep-with-previous.within-column="always" keep-with-next.within-column="always">
  2014.             <fo:table-cell number-columns-spanned="11">
  2015.                 <fo:block xsl:use-attribute-sets="attset-zaglavljeTabliceOcjena" text-align="left">
  2016.                     <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textGradeNotInQualification"/>
  2017.                 </fo:block>
  2018.             </fo:table-cell>
  2019.         </fo:table-row>
  2020.         <xsl:apply-templates select="../prijepisOcjenaNeUlazeUStjecanjeNaziva/ocjena"/>
  2021.     </xsl:template>
  2022.  
  2023.     <xsl:template match="prijepisOcjenaNeUlazeUStjecanjeNaziva/ocjena">
  2024.         <fo:table-row keep-together="always">
  2025.             <xsl:if test="position() = last()">
  2026.                 <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
  2027.             </xsl:if>
  2028.             <xsl:apply-templates select="rbrOcjena"/>
  2029.             <fo:table-cell>
  2030.                 <fo:block/>
  2031.             </fo:table-cell>
  2032.             <xsl:apply-templates select="satiUkupno"/>
  2033.             <fo:table-cell>
  2034.                 <fo:block/>
  2035.             </fo:table-cell>
  2036.             <xsl:apply-templates select="ectsBod"/>
  2037.             <fo:table-cell>
  2038.                 <fo:block/>
  2039.             </fo:table-cell>
  2040.             <xsl:apply-templates select="datumIspit"/>
  2041.             <fo:table-cell>
  2042.                 <fo:block/>
  2043.             </fo:table-cell>
  2044.             <xsl:apply-templates select="kratOcjena"/>
  2045.             <fo:table-cell>
  2046.                 <fo:block/>
  2047.             </fo:table-cell>
  2048.             <xsl:apply-templates select="nazPred"/>
  2049.         </fo:table-row>
  2050.     </xsl:template>
  2051.  
  2052.     <xsl:template name="ispisDodEctsBodova">
  2053.         <xsl:param name="lang"/>
  2054.         <fo:table-row number-rows-spanned="2" keep-with-previous.within-column="always">
  2055.             <fo:table-cell number-columns-spanned="11">
  2056.                 <fo:block>
  2057.                     <xsl:text>&#xA0;</xsl:text>
  2058.                 </fo:block>
  2059.             </fo:table-cell>
  2060.         </fo:table-row>
  2061.         <fo:table-row keep-with-previous.within-column="always" keep-with-next.within-column="always">
  2062.             <fo:table-cell number-columns-spanned="7">
  2063.                 <fo:block xsl:use-attribute-sets="attset-zaglavljeTabliceOcjena" text-align="center">
  2064.                     <xsl:call-template name="annotateSpecECTStablica">
  2065.                         <xsl:with-param name="ectsNaslovTablice">
  2066.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textAdditionalEctsCredits"/>
  2067.                         </xsl:with-param>
  2068.                     </xsl:call-template>
  2069.                 </fo:block>
  2070.             </fo:table-cell>
  2071.             <fo:table-cell number-columns-spanned="4">
  2072.                 <fo:block/>
  2073.             </fo:table-cell>
  2074.         </fo:table-row>
  2075.         <xsl:choose>
  2076.             <xsl:when test="count(../prijepisDodEctsBodova/dodBod) &gt; 0">
  2077.                 <xsl:for-each select="../prijepisDodEctsBodova/dodBod">
  2078.                     <fo:table-row>
  2079.                         <xsl:if test="position() = last()">
  2080.                             <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
  2081.                         </xsl:if>
  2082.                         <xsl:apply-templates select="rbrEcts"/>
  2083.                         <fo:table-cell number-columns-spanned="3">
  2084.                             <fo:block/>
  2085.                         </fo:table-cell>
  2086.                         <xsl:apply-templates select="ectsBod"/>
  2087.                         <fo:table-cell number-columns-spanned="5">
  2088.                             <fo:block/>
  2089.                         </fo:table-cell>
  2090.                         <xsl:apply-templates select="naziv"/>
  2091.                     </fo:table-row>
  2092.                 </xsl:for-each>
  2093.             </xsl:when>
  2094.             <xsl:otherwise>
  2095.                 <fo:table-row>
  2096.                     <fo:table-cell number-columns-spanned="7">
  2097.                         <fo:block xsl:use-attribute-sets="attset-podaciTabliceOcjena" text-align="center">
  2098.                             <xsl:call-template name="textNotApplicable"/>
  2099.                         </fo:block>
  2100.                     </fo:table-cell>
  2101.                     <fo:table-cell number-columns-spanned="4">
  2102.                         <fo:block/>
  2103.                     </fo:table-cell>
  2104.                 </fo:table-row>
  2105.             </xsl:otherwise>
  2106.         </xsl:choose>
  2107.     </xsl:template>
  2108.  
  2109.  
  2110.     <xsl:template name="ispisStudijskihBoravaka">
  2111.         <xsl:param name="lang"/>
  2112.         <fo:table-row number-rows-spanned="2" keep-with-previous.within-column="always">
  2113.             <fo:table-cell number-columns-spanned="11">
  2114.                 <fo:block>
  2115.                     <xsl:text>&#xA0;</xsl:text>
  2116.                 </fo:block>
  2117.             </fo:table-cell>
  2118.         </fo:table-row>
  2119.         <fo:table-row keep-with-previous.within-column="always" keep-with-next.within-column="always">
  2120.             <fo:table-cell number-columns-spanned="1">
  2121.                 <fo:block/>
  2122.             </fo:table-cell>
  2123.             <fo:table-cell number-columns-spanned="10">
  2124.                 <fo:block xsl:use-attribute-sets="attset-zaglavljeTabliceOcjena" text-align="left">
  2125.                     <xsl:call-template name="annotateSpecECTStablica">
  2126.                         <xsl:with-param name="ectsNaslovTablice">
  2127.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/textStudentExchangeTitle"/>
  2128.                         </xsl:with-param>
  2129.                     </xsl:call-template>
  2130.                 </fo:block>
  2131.             </fo:table-cell>
  2132.         </fo:table-row>
  2133.         <xsl:variable name="maxBrojZvjezdica" select="max(../boravci/boravak/rbrOrgJedIzv)"/>
  2134.         <xsl:for-each select="../boravci/boravak">
  2135.             <xsl:variable name="tekstZaIspis">
  2136.                 <xsl:value-of select="nazOrgJedIzv"/>
  2137.                 <xsl:if test="string-length(nazMjesto) != 0">
  2138.                     <xsl:text>, </xsl:text>
  2139.                     <xsl:value-of select="nazMjesto"/>
  2140.                 </xsl:if>
  2141.                 <xsl:if test="string-length(nazDrzava) != 0">
  2142.                     <xsl:text>, </xsl:text>
  2143.                     <xsl:value-of select="nazDrzava"/>
  2144.                 </xsl:if>
  2145.  
  2146.                 <xsl:text>, </xsl:text>
  2147.  
  2148.                 <xsl:choose>
  2149.                     <xsl:when test="count(periodi/period) = 2 and                                 count(periodi/period[izvanSemestra='N']) = 2 and                                 count(distinct-values(periodi/period/akGodina)) = 1">
  2150.                         <!-- ako su dva perioda koja su izvan semestra i oba su unutar iste akademske godine -->
  2151.  
  2152.                         <xsl:variable name="semestri" select="periodi/period/rbrElUstNast"/>
  2153.                         <xsl:value-of select="supplement:nazivSemestra($semestri, $lang)"/>
  2154.                         <xsl:text> </xsl:text>
  2155.                         <xsl:value-of select="supplement:kompletAkGod((periodi/period/akGodina)[1])"/>
  2156.                     </xsl:when>
  2157.                     <xsl:otherwise>
  2158.                         <!-- u svim ostalim kombinacijama -->
  2159.                         <xsl:for-each select="periodi/period">
  2160.                             <xsl:sort select="izvanSemestra" order="descending"/>
  2161.                             <xsl:if test="position() &gt; 1">
  2162.                                 <!-- poveznica prema sljedećem periodu ili semestru -->
  2163.                                 <!-- ako se promijenila vrsta boravka (u semestru/izvan semestra) tada
  2164.                              treba staviti "te", a ako se nije promijenila, staviti zarez -->
  2165.                                 <xsl:choose>
  2166.                                     <!--
  2167.                            <xsl:when test="(preceding-sibling::period/izvanSemestra)[position()=last()] = izvanSemestra">
  2168.                                <xsl:text>, </xsl:text>
  2169.                            </xsl:when>
  2170.                             -->
  2171.                                     <xsl:when test="izvanSemestra='N'">
  2172.                                         <xsl:text>, </xsl:text>
  2173.                                     </xsl:when>
  2174.                                     <xsl:otherwise>
  2175.                                         <xsl:text> </xsl:text>
  2176.                                         <xsl:value-of select="document(concat('file:///', $konTekstSupplement))                                                           /konTekst/jezik[lang($lang)]/andAlso"/>
  2177.                                         <xsl:text> </xsl:text>
  2178.                                     </xsl:otherwise>
  2179.                                 </xsl:choose>
  2180.                             </xsl:if>
  2181.  
  2182.                             <xsl:choose>
  2183.                                 <xsl:when test="izvanSemestra = 'N'">
  2184.                                     <xsl:value-of select="supplement:nazivSemestra(rbrElUstNast, $lang)"/>
  2185.                                     <xsl:text> </xsl:text>
  2186.                                     <xsl:value-of select="supplement:kompletAkGod(akGodina)"/>
  2187.                                 </xsl:when>
  2188.                                 <xsl:otherwise>
  2189.                                     <xsl:value-of select="datumOd"/>
  2190.                                     <xsl:text>-</xsl:text>
  2191.                                     <xsl:value-of select="datumDo"/>
  2192.                                 </xsl:otherwise>
  2193.                             </xsl:choose>
  2194.                         </xsl:for-each>
  2195.                     </xsl:otherwise>
  2196.                 </xsl:choose>
  2197.                 <xsl:text>, </xsl:text>
  2198.                 <xsl:value-of select="nazProgramLL"/>
  2199.             </xsl:variable>
  2200.             <fo:table-row>
  2201.                 <xsl:if test="position() = last()">
  2202.                     <xsl:attribute name="keep-with-previous.within-column">always</xsl:attribute>
  2203.                 </xsl:if>
  2204.                 <xsl:apply-templates select="rbrOrgJedIzv">
  2205.                     <xsl:with-param name="maxBrojZvjezdica" select="$maxBrojZvjezdica"/>
  2206.                 </xsl:apply-templates>
  2207.                 <fo:table-cell number-columns-spanned="1">
  2208.                     <fo:block/>
  2209.                 </fo:table-cell>
  2210.                 <fo:table-cell number-columns-spanned="9">
  2211.                     <fo:block>
  2212.                         <xsl:value-of select="$tekstZaIspis"/>
  2213.                     </fo:block>
  2214.                 </fo:table-cell>
  2215.             </fo:table-row>
  2216.         </xsl:for-each>
  2217.     </xsl:template>
  2218.  
  2219.     <!-- tablica za ispis zadnje stranice -->
  2220.     <xsl:template name="ispisShemeSustava">
  2221.         <xsl:param name="lang"/>
  2222.         <fo:table table-layout="fixed" width="100%">
  2223.             <fo:table-column column-width="14pt"/>
  2224.             <fo:table-column column-width="231pt"/>
  2225.             <fo:table-column column-width="7pt"/>
  2226.             <fo:table-column column-width="231pt"/>
  2227.             <fo:table-column column-width="14pt"/>
  2228.             <fo:table-body>
  2229.                 <fo:table-row>
  2230.                     <fo:table-cell>
  2231.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine1">8</fo:block>
  2232.                     </fo:table-cell>
  2233.                     <fo:table-cell number-columns-spanned="3">
  2234.                         <fo:block xsl:use-attribute-sets="attset-labeleRazine1" text-align="center">
  2235.                             <xsl:value-of select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/title8"/>
  2236.                         </fo:block>
  2237.                     </fo:table-cell>
  2238.                 </fo:table-row>
  2239.                 <fo:table-row>
  2240.                     <fo:table-cell number-columns-spanned="2">
  2241.                         <fo:block>
  2242.                             <fo:table table-layout="fixed" width="100%">
  2243.                                 <fo:table-column column-width="14pt"/>
  2244.                                 <fo:table-column column-width="231pt"/>
  2245.                                 <fo:table-body>
  2246.                                     <xsl:call-template name="lijevaStranaOpisaShemeSustava">
  2247.                                         <xsl:with-param name="lang" select="$lang"/>
  2248.                                     </xsl:call-template>
  2249.                                 </fo:table-body>
  2250.                             </fo:table>
  2251.                         </fo:block>
  2252.                     </fo:table-cell>
  2253.                     <fo:table-cell>
  2254.                         <fo:block/>
  2255.                     </fo:table-cell>
  2256.                     <fo:table-cell number-columns-spanned="2">
  2257.                         <fo:block>
  2258.                             <fo:table table-layout="fixed" width="100%">
  2259.                                 <fo:table-column column-width="231pt"/>
  2260.                                 <fo:table-column column-width="14pt"/>
  2261.                                 <fo:table-body>
  2262.                                     <xsl:call-template name="desnaStranaOpisaShemeSustava">
  2263.                                         <xsl:with-param name="lang" select="$lang"/>
  2264.                                     </xsl:call-template>
  2265.                                 </fo:table-body>
  2266.                             </fo:table>
  2267.                         </fo:block>
  2268.                     </fo:table-cell>
  2269.                 </fo:table-row>
  2270.             </fo:table-body>
  2271.         </fo:table>
  2272.     </xsl:template>
  2273.  
  2274.     <xsl:template name="lijevaStranaOpisaShemeSustava">
  2275.         <xsl:param name="lang"/>
  2276.         <xsl:apply-templates select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/opisShemeStudija/lijevaTablica"/>
  2277.     </xsl:template>
  2278.  
  2279.     <xsl:template name="desnaStranaOpisaShemeSustava">
  2280.         <xsl:param name="lang"/>
  2281.         <xsl:apply-templates select="document(concat('file:///', $konTekstSupplement))/konTekst/jezik[lang($lang)]/opisShemeStudija/desnaTablica"/>
  2282.     </xsl:template>
  2283.  
  2284.     <xsl:template match="lijevaTablica/poglavlje">
  2285.         <xsl:call-template name="naslovLijeveStraneSheme">
  2286.             <xsl:with-param name="number" select="@number"/>
  2287.             <xsl:with-param name="label" select="@label"/>
  2288.         </xsl:call-template>
  2289.         <!-- ovdje choose ako je prazan,onda prazan red -->
  2290.         <xsl:apply-templates select="para"/>
  2291.     </xsl:template>
  2292.  
  2293.     <xsl:template match="lijevaTablica/poglavlje/para">
  2294.         <fo:table-row>
  2295.             <fo:table-cell>
  2296.                 <fo:block/>
  2297.             </fo:table-cell>
  2298.             <fo:table-cell>
  2299.                 <fo:block xsl:use-attribute-sets="attset-normalTekst">
  2300.                     <xsl:call-template name="attributes-hyphenated">
  2301.                         <xsl:with-param name="lang">
  2302.                             <xsl:value-of select="ancestor::jezik[@xml:lang][1]/@xml:lang"/>
  2303.                         </xsl:with-param>
  2304.                     </xsl:call-template>
  2305.                     <xsl:apply-templates/>
  2306.                 </fo:block>
  2307.             </fo:table-cell>
  2308.         </fo:table-row>
  2309.     </xsl:template>
  2310.  
  2311.     <xsl:template match="shemaStudijaSC">
  2312.         <fo:inline xsl:use-attribute-sets="attset-shemaStudijaSC">
  2313.             <xsl:value-of select="."/>
  2314.         </fo:inline>
  2315.     </xsl:template>
  2316.  
  2317.     <xsl:template match="shemaStudijaItalic">
  2318.         <fo:inline xsl:use-attribute-sets="attset-shemaStudijaItalic">
  2319.             <xsl:value-of select="."/>
  2320.         </fo:inline>
  2321.     </xsl:template>
  2322.  
  2323.     <xsl:template match="desnaTablica/poglavlje/para">
  2324.         <fo:table-row>
  2325.             <fo:table-cell>
  2326.                 <fo:block xsl:use-attribute-sets="attset-normalTekst">
  2327.                     <xsl:call-template name="attributes-hyphenated">
  2328.                         <xsl:with-param name="lang">
  2329.                             <xsl:value-of select="ancestor::jezik[@xml:lang][1]/@xml:lang"/>
  2330.                         </xsl:with-param>
  2331.                     </xsl:call-template>
  2332.                     <xsl:apply-templates/>
  2333.                 </fo:block>
  2334.             </fo:table-cell>
  2335.             <fo:table-cell>
  2336.                 <fo:block/>
  2337.             </fo:table-cell>
  2338.         </fo:table-row>
  2339.     </xsl:template>
  2340.  
  2341.     <xsl:template match="desnaTablica/poglavlje">
  2342.         <xsl:call-template name="naslovDesneStraneSheme">
  2343.             <xsl:with-param name="number" select="@number"/>
  2344.             <xsl:with-param name="label" select="@label"/>
  2345.         </xsl:call-template>
  2346.         <xsl:apply-templates select="para"/>
  2347.     </xsl:template>
  2348.  
  2349.     <xsl:template name="naslovLijeveStraneSheme">
  2350.         <xsl:param name="number"/>
  2351.         <xsl:param name="label"/>
  2352.         <fo:table-row>
  2353.             <fo:table-cell>
  2354.                 <fo:block xsl:use-attribute-sets="attset-brojeviShemeStudiranja">
  2355.                     <xsl:choose>
  2356.                         <xsl:when test="string-length($number) = 0">
  2357.                             <xsl:text>&#xA0;</xsl:text>
  2358.                         </xsl:when>
  2359.                         <xsl:otherwise>
  2360.                             <xsl:value-of select="$number"/>
  2361.                         </xsl:otherwise>
  2362.                     </xsl:choose>
  2363.                 </fo:block>
  2364.             </fo:table-cell>
  2365.             <fo:table-cell>
  2366.                 <fo:block xsl:use-attribute-sets="attset-labeleShemeStudiranja">
  2367.                     <xsl:choose>
  2368.                         <xsl:when test="string-length($label) = 0">
  2369.                             <xsl:text>&#xA0;</xsl:text>
  2370.                         </xsl:when>
  2371.                         <xsl:otherwise>
  2372.                             <xsl:value-of select="$label"/>
  2373.                         </xsl:otherwise>
  2374.                     </xsl:choose>
  2375.                 </fo:block>
  2376.             </fo:table-cell>
  2377.         </fo:table-row>
  2378.     </xsl:template>
  2379.  
  2380.  
  2381.     <xsl:template name="naslovDesneStraneSheme">
  2382.         <xsl:param name="number"/>
  2383.         <xsl:param name="label"/>
  2384.         <fo:table-row>
  2385.             <fo:table-cell>
  2386.                 <fo:block xsl:use-attribute-sets="attset-labeleShemeStudiranja">
  2387.                     <xsl:choose>
  2388.                         <xsl:when test="string-length($label) = 0">
  2389.                             <xsl:text>&#xA0;</xsl:text>
  2390.                         </xsl:when>
  2391.                         <xsl:otherwise>
  2392.                             <xsl:value-of select="$label"/>
  2393.                         </xsl:otherwise>
  2394.                     </xsl:choose>
  2395.                 </fo:block>
  2396.             </fo:table-cell>
  2397.  
  2398.             <fo:table-cell>
  2399.                 <fo:block xsl:use-attribute-sets="attset-brojeviShemeStudiranja" text-align="right">
  2400.                     <xsl:choose>
  2401.                         <xsl:when test="string-length($number) = 0">
  2402.                             <xsl:text>&#xA0;</xsl:text>
  2403.                         </xsl:when>
  2404.                         <xsl:otherwise>
  2405.                             <xsl:value-of select="$number"/>
  2406.                         </xsl:otherwise>
  2407.                     </xsl:choose>
  2408.                 </fo:block>
  2409.             </fo:table-cell>
  2410.         </fo:table-row>
  2411.     </xsl:template>
  2412.  
  2413.     <xsl:template name="annotateSpecECTStablica">
  2414.         <xsl:param name="ectsNaslovTablice"/>
  2415.         <xsl:choose>
  2416.             <xsl:when test="contains($ectsNaslovTablice, 'ects')">
  2417.                 <xsl:value-of select="substring-before($ectsNaslovTablice,'ects')"/>
  2418.                 <fo:inline xsl:use-attribute-sets="attset-specEctsTablica">
  2419.                     <xsl:text>ects</xsl:text>
  2420.                 </fo:inline>
  2421.                 <xsl:value-of select="substring-after($ectsNaslovTablice,'ects')"/>
  2422.             </xsl:when>
  2423.             <xsl:otherwise>
  2424.                 <xsl:value-of select="$ectsNaslovTablice"/>
  2425.             </xsl:otherwise>
  2426.         </xsl:choose>
  2427.     </xsl:template>
  2428.  
  2429.     <xsl:template name="annotateSpecECTSlabela">
  2430.         <xsl:param name="ectsNaslovLabele"/>
  2431.         <xsl:choose>
  2432.             <xsl:when test="contains($ectsNaslovLabele, 'ects')">
  2433.                 <xsl:value-of select="substring-before($ectsNaslovLabele,'ects')"/>
  2434.                 <fo:inline xsl:use-attribute-sets="attset-specEctsLabela">
  2435.                     <xsl:text>ects</xsl:text>
  2436.                 </fo:inline>
  2437.                 <xsl:value-of select="substring-after($ectsNaslovLabele,'ects')"/>
  2438.             </xsl:when>
  2439.             <xsl:otherwise>
  2440.                 <xsl:value-of select="$ectsNaslovLabele"/>
  2441.             </xsl:otherwise>
  2442.         </xsl:choose>
  2443.     </xsl:template>
  2444.  
  2445.  
  2446.     <!-- procedura za crtanje sheme studija -->
  2447.     <xsl:template name="crtanjeShemeStudija">
  2448.         <xsl:param name="lang"/>
  2449.         <!-- slika dijagrama studiranja -->
  2450.         <xsl:variable name="dijagramStudiranja" select="concat($imagesBaseUrl, '/dijagramStudiranja_', $lang, '.svg')"/>
  2451.         <fo:table table-layout="fixed" width="100%">
  2452.             <!--  <fo:table-column column-width="44.5pt" />-->
  2453.             <fo:table-column column-width="67pt"/>
  2454.             <fo:table-column column-width="500pt"/>
  2455.             <fo:table-body>
  2456.                 <fo:table-row>
  2457.                     <fo:table-cell>
  2458.                         <fo:block/>
  2459.                     </fo:table-cell>
  2460.                     <fo:table-cell>
  2461.                         <fo:block>
  2462.                             <fo:external-graphic src="{$dijagramStudiranja}"/>
  2463.                         </fo:block>
  2464.                     </fo:table-cell>
  2465.                 </fo:table-row>
  2466.             </fo:table-body>
  2467.         </fo:table>
  2468.     </xsl:template>
  2469.  
  2470.  
  2471.     <xsl:template name="attributes-hyphenated">
  2472.         <xsl:param name="lang"/>
  2473.         <xsl:attribute name="text-align">justify</xsl:attribute>
  2474.         <xsl:attribute name="hyphenate">true</xsl:attribute>
  2475.         <xsl:attribute name="language">
  2476.             <xsl:choose>
  2477.                 <xsl:when test="$lang='hr'">
  2478.                     <xsl:value-of select="$replacementHyphenator"/>
  2479.                 </xsl:when>
  2480.                 <xsl:otherwise>
  2481.                     <xsl:value-of select="$lang"/>
  2482.                 </xsl:otherwise>
  2483.             </xsl:choose>
  2484.         </xsl:attribute>
  2485.     </xsl:template>
  2486.  
  2487.     <xsl:template name="formirajZvjezdice">
  2488.         <xsl:param name="brojZvjezdica"/>
  2489.         <xsl:variable name="zvjezdiceSequence" select="for $i in 1 to $brojZvjezdica return '*'"/>
  2490.         <xsl:value-of select="string-join($zvjezdiceSequence, '')"/>
  2491.     </xsl:template>
  2492.  
  2493.     <xsl:template name="veryThinEmptyLine">
  2494.         <fo:block span="all" padding-top="0.01pt" keep-with-previous.within-page="always">
  2495.             <!--  <xsl:attribute name="background-color">magenta</xsl:attribute>-->
  2496.         </fo:block>
  2497.     </xsl:template>
  2498.  
  2499.     <xsl:template name="softEmptyLineKeepWithNext">
  2500.         <fo:block span="all" space-before.conditionality="discard" keep-with-next.within-page="always">
  2501.             <xsl:attribute name="space-before">
  2502.                 <xsl:value-of select="$lineHeightForLeading13"/>
  2503.             </xsl:attribute>
  2504.         </fo:block>
  2505.     </xsl:template>
  2506.  
  2507.     <xsl:template name="emptyLineKeepWithNext">
  2508.         <fo:block span="all" keep-with-next.within-page="always">
  2509.             <xsl:attribute name="padding-top">
  2510.                 <xsl:value-of select="$lineHeightForLeading13"/>
  2511.             </xsl:attribute>
  2512.             <!--  <xsl:attribute name="background-color">blue</xsl:attribute> -->
  2513.         </fo:block>
  2514.     </xsl:template>
  2515.  
  2516.     <xsl:function name="supplement:nazivSemestra">
  2517.         <xsl:param name="semestri"/>
  2518.         <xsl:param name="lang"/>
  2519.         <xsl:choose>
  2520.             <!--
  2521.         <xsl:when test="contains($semestri, '1') and contains($semestri, '2')">
  2522.            <xsl:value-of select="document(concat('file:///', $konTekstSupplement))
  2523.                            /konTekst/jezik[lang($lang)]/textWinterAndSummer" />
  2524.         </xsl:when>
  2525.         <xsl:when test="contains($semestri, '1') ">
  2526.            <xsl:value-of select="document(concat('file:///', $konTekstSupplement))
  2527.                            /konTekst/jezik[lang($lang)]/textWinter" />
  2528.         </xsl:when>
  2529.         <xsl:when test="contains($semestri, '2') ">
  2530.            <xsl:value-of select="document(concat('file:///', $konTekstSupplement))
  2531.                            /konTekst/jezik[lang($lang)]/textSummer" />
  2532.         </xsl:when>
  2533.          -->
  2534.             <xsl:when test="$semestri = '1' and $semestri = '2'">
  2535.                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))                             /konTekst/jezik[lang($lang)]/textWinterAndSummer"/>
  2536.             </xsl:when>
  2537.             <xsl:when test="$semestri = '1'">
  2538.                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))                             /konTekst/jezik[lang($lang)]/textWinter"/>
  2539.             </xsl:when>
  2540.             <xsl:when test="$semestri = '2' ">
  2541.                 <xsl:value-of select="document(concat('file:///', $konTekstSupplement))                             /konTekst/jezik[lang($lang)]/textSummer"/>
  2542.             </xsl:when>
  2543.         </xsl:choose>
  2544.  
  2545.         <xsl:text> </xsl:text>
  2546.         <xsl:value-of select="document(concat('file:///', $konTekstSupplement))                             /konTekst/jezik[lang($lang)]/textSemester"/>
  2547.     </xsl:function>
  2548.  
  2549.     <xsl:function name="supplement:kompletAkGod">
  2550.         <xsl:param name="akGodina"/>
  2551.         <xsl:value-of select="$akGodina"/>
  2552.         <xsl:text>/</xsl:text>
  2553.         <xsl:value-of select="$akGodina + 1"/>
  2554.         <xsl:text>.</xsl:text>
  2555.     </xsl:function>
  2556.  
  2557.     <!--
  2558.   Ako se sljedeća funkcija ne koristi, dešavaju se nezgodni lomovi naziva predmeta, npr.
  2559.      Laboratory of Electrical Power Engineering 2
  2560.         se prelama ovako
  2561.      Laboratory of Electrical Power Engineering
  2562.      2
  2563.   -->
  2564.     <!--
  2565.   Funkcija u zadanom tekstu (nazivu predmeta) mijenja zadnji space znak u
  2566.   non-breaking space znak, ali samo onda kada se iza zadnjeg space znaka
  2567.   nalazi vrlo-vrlo kratki tekst.
  2568.   Za sada (a može se podesiti po potrebi) mijenja zadnji space znak u slučajevima
  2569.   kada tekst zadovoljava sljedeće uzorke:
  2570.        .*\s\S{1}$     na kraju niza, iza zadnjeg space-a ima jedan non-white-space znak
  2571.        .*\s\S{2}$     na kraju niza, iza zadnjeg space-a ima dva non-white-space znaka
  2572.        .*\sIII$       na kraju niza, iza zadnjeg space-a ima kombinacija III (rimski 3)
  2573.   To je korisno npr. u nazivima predmeta poput:
  2574.   Laboratory of Electrical Engineering Systems and Technology 2
  2575.   Osnove općenarodne obrane i društvene samozaštite I  :)
  2576.  
  2577.   Automata, Formal Languages, and Compiler Design II
  2578.   Electrical Machines IV
  2579.   Matematika 3E
  2580.   Metode predstavljanja znanja u inteligentnim IS
  2581.  
  2582.   Automatsko upravljanje sistemima III
  2583.   -->
  2584.     <xsl:function name="supplement:sprijeciLomKratkogKrajaTeksta">
  2585.         <xsl:param name="text"/>
  2586.         <xsl:analyze-string select="$text" regex="(.*)(\s)(\S{{1}}|\S{{2}}|I{{3}})$">
  2587.             <xsl:matching-substring>
  2588.                 <!--
  2589.            <xsl:message>POČETAK:<xsl:value-of select="regex-group(1)"/></xsl:message>
  2590.            <xsl:message>DOČETAK:<xsl:value-of select="regex-group(3)"/></xsl:message>
  2591.            -->
  2592.                 <xsl:value-of select="regex-group(1)"/>
  2593.                 <xsl:text>&#xA0;</xsl:text>
  2594.                 <xsl:value-of select="regex-group(3)"/>
  2595.             </xsl:matching-substring>
  2596.  
  2597.             <xsl:non-matching-substring>
  2598.                 <xsl:value-of select="$text"/>
  2599.             </xsl:non-matching-substring>
  2600.         </xsl:analyze-string>
  2601.     </xsl:function>
  2602.  
  2603.  
  2604.     <!-- simulacija need 130pt
  2605.   <xsl:template name="simulateNeed130">
  2606.      <fo:block-container keep-with-previous.within-page="always" width="100%" height="130pt">
  2607.         <fo:block/>
  2608.      </fo:block-container>
  2609.      <fo:block span="all" space-before="-130pt" keep-with-previous.within-page="always" space-after="13pt"
  2610.      padding-top="1pt" background-color="blue">
  2611.       </fo:block>
  2612.   </xsl:template>
  2613.   -->
  2614. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment