metanorma-nist 1.2.12 → 1.2.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -2587,203 +2587,237 @@
2587
2587
  <xsl:call-template name="add-zero-spaces-java"/>
2588
2588
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2589
2589
 
2590
- <xsl:variable name="simple-table">
2591
- <xsl:call-template name="getSimpleTable"/>
2592
- </xsl:variable>
2590
+ <xsl:variable name="table">
2593
2591
 
2594
-
2595
-
2596
-
2597
-
2598
- <!-- <xsl:if test="$namespace = 'bipm'">
2599
- <fo:block>&#xA0;</fo:block>
2600
- </xsl:if> -->
2601
-
2602
- <!-- $namespace = 'iso' or -->
2603
-
2604
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2605
-
2606
-
2592
+ <xsl:variable name="simple-table">
2593
+ <xsl:call-template name="getSimpleTable"/>
2594
+ </xsl:variable>
2607
2595
 
2608
2596
 
2609
-
2610
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2611
-
2612
- <!-- <xsl:variable name="cols-count">
2613
- <xsl:choose>
2614
- <xsl:when test="*[local-name()='thead']">
2615
- <xsl:call-template name="calculate-columns-numbers">
2616
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2617
- </xsl:call-template>
2618
- </xsl:when>
2619
- <xsl:otherwise>
2620
- <xsl:call-template name="calculate-columns-numbers">
2621
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2622
- </xsl:call-template>
2623
- </xsl:otherwise>
2624
- </xsl:choose>
2625
- </xsl:variable> -->
2626
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2627
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2628
-
2629
-
2630
-
2631
- <xsl:variable name="colwidths">
2632
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2633
- <xsl:call-template name="calculate-column-widths">
2634
- <xsl:with-param name="cols-count" select="$cols-count"/>
2635
- <xsl:with-param name="table" select="$simple-table"/>
2636
- </xsl:call-template>
2637
- </xsl:if>
2638
- </xsl:variable>
2639
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2640
-
2641
- <!-- <xsl:variable name="colwidths2">
2642
- <xsl:call-template name="calculate-column-widths">
2643
- <xsl:with-param name="cols-count" select="$cols-count"/>
2644
- </xsl:call-template>
2645
- </xsl:variable> -->
2646
-
2647
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2648
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
2649
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2650
-
2651
- <xsl:variable name="margin-left">
2652
- <xsl:choose>
2653
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2654
- <xsl:otherwise>0</xsl:otherwise>
2655
- </xsl:choose>
2656
- </xsl:variable>
2657
-
2658
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2659
2597
 
2660
2598
 
2661
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2662
2599
 
2663
-
2664
-
2665
-
2600
+ <!-- <xsl:if test="$namespace = 'bipm'">
2601
+ <fo:block>&#xA0;</fo:block>
2602
+ </xsl:if> -->
2666
2603
 
2604
+ <!-- $namespace = 'iso' or -->
2667
2605
 
2668
- <xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
2669
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
2670
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2671
- </xsl:if>
2672
- <xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
2673
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
2674
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2675
- </xsl:if>
2676
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2606
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2677
2607
 
2678
-
2608
+
2679
2609
 
2610
+
2680
2611
 
2612
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
2681
2613
 
2614
+ <!-- <xsl:variable name="cols-count">
2615
+ <xsl:choose>
2616
+ <xsl:when test="*[local-name()='thead']">
2617
+ <xsl:call-template name="calculate-columns-numbers">
2618
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2619
+ </xsl:call-template>
2620
+ </xsl:when>
2621
+ <xsl:otherwise>
2622
+ <xsl:call-template name="calculate-columns-numbers">
2623
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2624
+ </xsl:call-template>
2625
+ </xsl:otherwise>
2626
+ </xsl:choose>
2627
+ </xsl:variable> -->
2628
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2629
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2682
2630
 
2683
2631
 
2684
2632
 
2633
+ <xsl:variable name="colwidths">
2634
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2635
+ <xsl:call-template name="calculate-column-widths">
2636
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2637
+ <xsl:with-param name="table" select="$simple-table"/>
2638
+ </xsl:call-template>
2639
+ </xsl:if>
2640
+ </xsl:variable>
2641
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2685
2642
 
2686
- <xsl:variable name="table_attributes">
2687
- <attribute name="table-layout">fixed</attribute>
2688
- <attribute name="width">
2689
- <xsl:choose>
2690
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2691
- <xsl:otherwise>100%</xsl:otherwise>
2692
- </xsl:choose>
2693
- </attribute>
2694
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2695
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2643
+ <!-- <xsl:variable name="colwidths2">
2644
+ <xsl:call-template name="calculate-column-widths">
2645
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2646
+ </xsl:call-template>
2647
+ </xsl:variable> -->
2648
+
2649
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2650
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
2651
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2652
+
2653
+ <xsl:variable name="margin-left">
2654
+ <xsl:choose>
2655
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2656
+ <xsl:otherwise>0</xsl:otherwise>
2657
+ </xsl:choose>
2658
+ </xsl:variable>
2659
+
2660
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2696
2661
 
2697
2662
 
2663
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2698
2664
 
2665
+
2666
+
2667
+
2699
2668
 
2700
-
2701
-
2702
-
2703
2669
 
2704
-
2670
+ <xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
2671
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
2672
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2673
+ </xsl:if>
2674
+ <xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
2675
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
2676
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
2677
+ </xsl:if>
2678
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2705
2679
 
2706
- </xsl:variable>
2707
-
2708
-
2709
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2680
+
2710
2681
 
2711
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2712
- <xsl:attribute name="{@name}">
2713
- <xsl:value-of select="."/>
2714
- </xsl:attribute>
2715
- </xsl:for-each>
2716
2682
 
2717
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
2718
- <xsl:if test="$isNoteOrFnExist = 'true'">
2719
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2720
- </xsl:if>
2721
2683
 
2722
- <xsl:choose>
2723
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2724
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2725
- <fo:table-column column-width="{@width}"/>
2726
- </xsl:for-each>
2727
- </xsl:when>
2728
- <xsl:otherwise>
2729
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2730
- <xsl:choose>
2731
- <xsl:when test=". = 1 or . = 0">
2732
- <fo:table-column column-width="proportional-column-width(2)"/>
2733
- </xsl:when>
2734
- <xsl:otherwise>
2735
- <fo:table-column column-width="proportional-column-width({.})"/>
2736
- </xsl:otherwise>
2737
- </xsl:choose>
2738
- </xsl:for-each>
2739
- </xsl:otherwise>
2740
- </xsl:choose>
2741
2684
 
2742
- <xsl:choose>
2743
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2744
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2745
- </xsl:when>
2746
- <xsl:otherwise>
2747
- <xsl:apply-templates/>
2748
- </xsl:otherwise>
2749
- </xsl:choose>
2750
2685
 
2751
- </fo:table>
2752
-
2753
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2754
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2755
- <xsl:call-template name="insertTableFooterInSeparateTable">
2756
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
2757
- <xsl:with-param name="colwidths" select="$colwidths"/>
2758
- <xsl:with-param name="colgroup" select="$colgroup"/>
2759
- </xsl:call-template>
2760
- </xsl:for-each>
2761
-
2762
- <!-- insert footer as table -->
2763
- <!-- <fo:table>
2764
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2765
- <xsl:attribute name="{@name}">
2766
- <xsl:value-of select="."/>
2767
- </xsl:attribute>
2768
- </xsl:for-each>
2769
2686
 
2770
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2687
+ <xsl:variable name="table_width">
2688
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2689
+ 100%
2690
+
2691
+
2692
+ </xsl:variable>
2693
+
2694
+ <xsl:variable name="table_attributes">
2695
+ <attribute name="table-layout">fixed</attribute>
2696
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
2697
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2698
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2699
+
2700
+
2701
+
2702
+
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+
2709
+ </xsl:variable>
2710
+
2711
+
2712
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
2713
+
2714
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2715
+ <xsl:attribute name="{@name}">
2716
+ <xsl:value-of select="."/>
2717
+ </xsl:attribute>
2718
+ </xsl:for-each>
2719
+
2720
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
2721
+ <xsl:if test="$isNoteOrFnExist = 'true'">
2722
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2723
+ </xsl:if>
2724
+
2725
+ <xsl:choose>
2726
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2727
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2728
+ <fo:table-column column-width="{@width}"/>
2729
+ </xsl:for-each>
2730
+ </xsl:when>
2731
+ <xsl:otherwise>
2732
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2733
+ <xsl:choose>
2734
+ <xsl:when test=". = 1 or . = 0">
2735
+ <fo:table-column column-width="proportional-column-width(2)"/>
2736
+ </xsl:when>
2737
+ <xsl:otherwise>
2738
+ <fo:table-column column-width="proportional-column-width({.})"/>
2739
+ </xsl:otherwise>
2740
+ </xsl:choose>
2741
+ </xsl:for-each>
2742
+ </xsl:otherwise>
2743
+ </xsl:choose>
2744
+
2771
2745
  <xsl:choose>
2772
- <xsl:when test=". = 1 or . = 0">
2773
- <fo:table-column column-width="proportional-column-width(2)"/>
2746
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2747
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2774
2748
  </xsl:when>
2775
2749
  <xsl:otherwise>
2776
- <fo:table-column column-width="proportional-column-width({.})"/>
2750
+ <xsl:apply-templates/>
2777
2751
  </xsl:otherwise>
2778
2752
  </xsl:choose>
2753
+
2754
+ </fo:table>
2755
+
2756
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
2757
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
2758
+ <xsl:call-template name="insertTableFooterInSeparateTable">
2759
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
2760
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2761
+ <xsl:with-param name="colgroup" select="$colgroup"/>
2762
+ </xsl:call-template>
2779
2763
  </xsl:for-each>
2780
- </fo:table>-->
2781
-
2782
-
2783
-
2784
-
2785
-
2786
- </fo:block-container>
2764
+
2765
+ <!-- insert footer as table -->
2766
+ <!-- <fo:table>
2767
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2768
+ <xsl:attribute name="{@name}">
2769
+ <xsl:value-of select="."/>
2770
+ </xsl:attribute>
2771
+ </xsl:for-each>
2772
+
2773
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2774
+ <xsl:choose>
2775
+ <xsl:when test=". = 1 or . = 0">
2776
+ <fo:table-column column-width="proportional-column-width(2)"/>
2777
+ </xsl:when>
2778
+ <xsl:otherwise>
2779
+ <fo:table-column column-width="proportional-column-width({.})"/>
2780
+ </xsl:otherwise>
2781
+ </xsl:choose>
2782
+ </xsl:for-each>
2783
+ </fo:table>-->
2784
+
2785
+
2786
+
2787
+
2788
+
2789
+ </fo:block-container>
2790
+ </xsl:variable>
2791
+
2792
+
2793
+
2794
+ <xsl:choose>
2795
+ <xsl:when test="@width">
2796
+
2797
+ <!-- centered table when table name is centered (see table-name-style) -->
2798
+
2799
+ <fo:table table-layout="fixed" width="100%">
2800
+ <fo:table-column column-width="proportional-column-width(1)"/>
2801
+ <fo:table-column column-width="{@width}"/>
2802
+ <fo:table-column column-width="proportional-column-width(1)"/>
2803
+ <fo:table-body>
2804
+ <fo:table-row>
2805
+ <fo:table-cell column-number="2">
2806
+ <fo:block><xsl:copy-of select="$table"/></fo:block>
2807
+ </fo:table-cell>
2808
+ </fo:table-row>
2809
+ </fo:table-body>
2810
+ </fo:table>
2811
+
2812
+
2813
+
2814
+
2815
+ </xsl:when>
2816
+ <xsl:otherwise>
2817
+ <xsl:copy-of select="$table"/>
2818
+ </xsl:otherwise>
2819
+ </xsl:choose>
2820
+
2787
2821
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2788
2822
  <xsl:if test="normalize-space() != ''">
2789
2823
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -3624,7 +3658,7 @@
3624
3658
  <xsl:with-param name="table" select="$html-table"/>
3625
3659
  </xsl:call-template>
3626
3660
  </xsl:variable>
3627
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
3661
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3628
3662
  <xsl:variable name="maxlength_dt">
3629
3663
  <xsl:call-template name="getMaxLength_dt"/>
3630
3664
  </xsl:variable>
@@ -3653,13 +3687,22 @@
3653
3687
  </xsl:when>
3654
3688
  <xsl:otherwise>
3655
3689
  <xsl:choose>
3690
+ <!-- to set width check most wide chars like `W` -->
3656
3691
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
3657
- <fo:table-column column-width="5%"/>
3658
- <fo:table-column column-width="95%"/>
3692
+ <fo:table-column column-width="7%"/>
3693
+ <fo:table-column column-width="93%"/>
3659
3694
  </xsl:when>
3660
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
3661
- <fo:table-column column-width="10%"/>
3662
- <fo:table-column column-width="90%"/>
3695
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
3696
+ <fo:table-column column-width="15%"/>
3697
+ <fo:table-column column-width="85%"/>
3698
+ </xsl:when>
3699
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
3700
+ <fo:table-column column-width="20%"/>
3701
+ <fo:table-column column-width="80%"/>
3702
+ </xsl:when>
3703
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
3704
+ <fo:table-column column-width="25%"/>
3705
+ <fo:table-column column-width="75%"/>
3663
3706
  </xsl:when>
3664
3707
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
3665
3708
  <fo:table-column column-width="60%"/>
@@ -3982,6 +4025,10 @@
3982
4025
  <xsl:param name="text" select="."/>
3983
4026
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3984
4027
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
4028
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
4029
+ <xsl:param name="text" select="."/>
4030
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
4031
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
3985
4032
  </xsl:template><xsl:template name="add-zero-spaces">
3986
4033
  <xsl:param name="text" select="."/>
3987
4034
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -4242,6 +4289,11 @@
4242
4289
  <!-- replace start and end spaces to non-break space -->
4243
4290
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4244
4291
  </xsl:copy>
4292
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
4293
+ <xsl:copy>
4294
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
4295
+ </xsl:copy>
4296
+ <mathml:mspace width="0.5ex"/>
4245
4297
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4246
4298
  <xsl:variable name="target">
4247
4299
  <xsl:choose>
@@ -4263,7 +4315,10 @@
4263
4315
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
4264
4316
  <xsl:choose>
4265
4317
  <xsl:when test="normalize-space(.) = ''">
4266
- <xsl:value-of select="$target"/>
4318
+ <!-- <xsl:value-of select="$target"/> -->
4319
+ <xsl:call-template name="add-zero-spaces-link-java">
4320
+ <xsl:with-param name="text" select="$target"/>
4321
+ </xsl:call-template>
4267
4322
  </xsl:when>
4268
4323
  <xsl:otherwise>
4269
4324
  <xsl:apply-templates/>
@@ -4769,6 +4824,8 @@
4769
4824
  <xsl:copy>
4770
4825
  <xsl:apply-templates mode="contents_item"/>
4771
4826
  </xsl:copy>
4827
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
4828
+ <xsl:copy-of select="."/>
4772
4829
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4773
4830
  <xsl:text> </xsl:text>
4774
4831
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -5164,11 +5221,13 @@
5164
5221
  </xsl:if>
5165
5222
  </xsl:if>
5166
5223
 
5224
+
5167
5225
  <fo:block-container margin-left="0mm">
5168
5226
 
5169
5227
  <fo:block xsl:use-attribute-sets="quote-style">
5170
5228
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5171
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5229
+
5230
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5172
5231
  </fo:block>
5173
5232
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
5174
5233
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -5589,7 +5648,7 @@
5589
5648
  <xsl:param name="charDelim" select="', '"/>
5590
5649
  <xsl:choose>
5591
5650
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
5592
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5651
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5593
5652
  <xsl:sort data-type="text" order="ascending"/>
5594
5653
  <xsl:call-template name="insertKeyword">
5595
5654
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -5598,7 +5657,7 @@
5598
5657
  </xsl:for-each>
5599
5658
  </xsl:when>
5600
5659
  <xsl:otherwise>
5601
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5660
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
5602
5661
  <xsl:call-template name="insertKeyword">
5603
5662
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
5604
5663
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -5615,6 +5674,9 @@
5615
5674
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
5616
5675
  </xsl:choose>
5617
5676
  </xsl:template><xsl:template name="addPDFUAmeta">
5677
+ <xsl:variable name="lang">
5678
+ <xsl:call-template name="getLang"/>
5679
+ </xsl:variable>
5618
5680
  <fo:declarations>
5619
5681
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
5620
5682
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -5627,13 +5689,16 @@
5627
5689
  <!-- Dublin Core properties go here -->
5628
5690
  <dc:title>
5629
5691
  <xsl:variable name="title">
5630
-
5631
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
5632
-
5633
-
5634
-
5635
-
5636
-
5692
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5693
+
5694
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
5695
+
5696
+
5697
+
5698
+
5699
+
5700
+
5701
+ </xsl:for-each>
5637
5702
  </xsl:variable>
5638
5703
  <xsl:choose>
5639
5704
  <xsl:when test="normalize-space($title) != ''">
@@ -5645,22 +5710,21 @@
5645
5710
  </xsl:choose>
5646
5711
  </dc:title>
5647
5712
  <dc:creator>
5648
-
5649
-
5650
-
5651
- <xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5652
- <xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
5653
- <xsl:if test="position() != last()">; </xsl:if>
5654
- </xsl:for-each>
5655
-
5656
- </dc:creator>
5657
- <dc:description>
5658
- <xsl:variable name="abstract">
5713
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5714
+
5659
5715
 
5660
5716
 
5717
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5718
+ <xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
5719
+ <xsl:if test="position() != last()">; </xsl:if>
5720
+ </xsl:for-each>
5661
5721
 
5662
- <xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5722
+ </xsl:for-each>
5723
+ </dc:creator>
5724
+ <dc:description>
5725
+ <xsl:variable name="abstract">
5663
5726
 
5727
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5664
5728
 
5665
5729
 
5666
5730
  </xsl:variable>