metanorma-ogc 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ogc/converter.rb +1 -1
- data/lib/asciidoctor/ogc/front.rb +1 -1
- data/lib/asciidoctor/ogc/isodoc.rng +4 -1
- data/lib/isodoc/ogc/base_convert.rb +31 -22
- data/lib/isodoc/ogc/html_convert.rb +1 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +252 -118
- data/lib/isodoc/ogc/ogc.best-practice.xsl +252 -118
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +252 -118
- data/lib/isodoc/ogc/ogc.community-practice.xsl +252 -118
- data/lib/isodoc/ogc/ogc.community-standard.xsl +252 -118
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +252 -118
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +252 -118
- data/lib/isodoc/ogc/ogc.other.xsl +252 -118
- data/lib/isodoc/ogc/ogc.policy.xsl +252 -118
- data/lib/isodoc/ogc/ogc.reference-model.xsl +252 -118
- data/lib/isodoc/ogc/ogc.release-notes.xsl +252 -118
- data/lib/isodoc/ogc/ogc.standard.xsl +252 -118
- data/lib/isodoc/ogc/ogc.test-suite.xsl +252 -118
- data/lib/isodoc/ogc/ogc.user-guide.xsl +252 -118
- data/lib/isodoc/ogc/ogc.white-paper.xsl +250 -116
- data/lib/isodoc/ogc/presentation_xml_convert.rb +8 -2
- data/lib/isodoc/ogc/reqt.rb +90 -101
- data/lib/isodoc/ogc/word_convert.rb +1 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -560,43 +560,8 @@
|
|
560
560
|
<fo:block id="{@id}" margin-bottom="12pt" start-indent="12mm" text-indent="-12mm" line-height="115%">
|
561
561
|
<xsl:if test=".//ogc:fn">
|
562
562
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
563
|
-
</xsl:if>
|
564
|
-
<xsl:
|
565
|
-
<xsl:when test="ogc:formattedref">
|
566
|
-
<xsl:apply-templates select="ogc:formattedref"/>
|
567
|
-
</xsl:when>
|
568
|
-
<xsl:otherwise>
|
569
|
-
<xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
|
570
|
-
<xsl:apply-templates/>
|
571
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
572
|
-
<xsl:if test="position() = last()">: </xsl:if>
|
573
|
-
</xsl:for-each>
|
574
|
-
<!-- ogc:docidentifier -->
|
575
|
-
<xsl:if test="ogc:docidentifier">
|
576
|
-
<xsl:value-of select="ogc:docidentifier/@type"/><xsl:text> </xsl:text>
|
577
|
-
<xsl:value-of select="ogc:docidentifier"/>
|
578
|
-
</xsl:if>
|
579
|
-
<xsl:apply-templates select="ogc:note"/>
|
580
|
-
<xsl:if test="ogc:docidentifier">, </xsl:if>
|
581
|
-
<fo:inline font-style="italic">
|
582
|
-
<xsl:choose>
|
583
|
-
<xsl:when test="ogc:title[@type = 'main' and @language = 'en']">
|
584
|
-
<xsl:value-of select="ogc:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text>
|
585
|
-
</xsl:when>
|
586
|
-
<xsl:otherwise>
|
587
|
-
<xsl:value-of select="ogc:title"/><xsl:text>. </xsl:text>
|
588
|
-
</xsl:otherwise>
|
589
|
-
</xsl:choose>
|
590
|
-
</fo:inline>
|
591
|
-
<xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
|
592
|
-
<xsl:apply-templates/>
|
593
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
594
|
-
</xsl:for-each>
|
595
|
-
<xsl:if test="ogc:date[@type='published']/ogc:on">
|
596
|
-
<xsl:text>(</xsl:text><xsl:value-of select="ogc:date[@type='published']/ogc:on"/><xsl:text>)</xsl:text>
|
597
|
-
</xsl:if>
|
598
|
-
</xsl:otherwise>
|
599
|
-
</xsl:choose>
|
563
|
+
</xsl:if>
|
564
|
+
<xsl:call-template name="processBibitem"/>
|
600
565
|
</fo:block>
|
601
566
|
</xsl:template>
|
602
567
|
|
@@ -716,8 +681,6 @@
|
|
716
681
|
|
717
682
|
|
718
683
|
|
719
|
-
|
720
|
-
|
721
684
|
<!-- [position() > 1] -->
|
722
685
|
<xsl:template match="ogc:references[not(@normative='true')]">
|
723
686
|
<fo:block break-after="page"/>
|
@@ -733,7 +696,6 @@
|
|
733
696
|
</xsl:template>
|
734
697
|
|
735
698
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
736
|
-
<!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem"> [position() > 1] -->
|
737
699
|
<xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem">
|
738
700
|
<fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
739
701
|
<fo:list-item>
|
@@ -746,71 +708,16 @@
|
|
746
708
|
</fo:list-item-label>
|
747
709
|
<fo:list-item-body start-indent="body-start()">
|
748
710
|
<fo:block>
|
749
|
-
|
750
|
-
<xsl:if test="not(ogc:formattedref)">
|
751
|
-
<xsl:choose>
|
752
|
-
<xsl:when test="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:abbreviation">
|
753
|
-
<xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:abbreviation">
|
754
|
-
<xsl:value-of select="."/>
|
755
|
-
<xsl:if test="position() != last()">/</xsl:if>
|
756
|
-
</xsl:for-each>
|
757
|
-
<xsl:text>: </xsl:text>
|
758
|
-
</xsl:when>
|
759
|
-
<xsl:when test="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
|
760
|
-
<xsl:value-of select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name"/>
|
761
|
-
<xsl:text>: </xsl:text>
|
762
|
-
</xsl:when>
|
763
|
-
</xsl:choose>
|
764
|
-
|
765
|
-
</xsl:if>
|
766
|
-
|
767
|
-
<xsl:if test="ogc:docidentifier">
|
768
|
-
<xsl:choose>
|
769
|
-
<xsl:when test="ogc:docidentifier/@type = 'ISO' and ogc:formattedref"/>
|
770
|
-
<xsl:when test="ogc:docidentifier/@type = 'OGC' and ogc:formattedref"/>
|
771
|
-
<xsl:otherwise><fo:inline>
|
772
|
-
<xsl:if test="ogc:docidentifier/@type = 'OGC'">OGC </xsl:if>
|
773
|
-
<xsl:value-of select="ogc:docidentifier"/><xsl:apply-templates select="ogc:note"/>, </fo:inline></xsl:otherwise>
|
774
|
-
</xsl:choose>
|
775
|
-
</xsl:if>
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
<xsl:choose>
|
780
|
-
<xsl:when test="ogc:title[@type = 'main' and @language = 'en']">
|
781
|
-
<xsl:apply-templates select="ogc:title[@type = 'main' and @language = 'en']"/>
|
782
|
-
</xsl:when>
|
783
|
-
<xsl:otherwise>
|
784
|
-
<xsl:apply-templates select="ogc:title"/>
|
785
|
-
</xsl:otherwise>
|
786
|
-
</xsl:choose>
|
787
|
-
<xsl:if test="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
|
788
|
-
<xsl:text>, </xsl:text>
|
789
|
-
<xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
|
790
|
-
<xsl:if test="position() != last()">and </xsl:if>
|
791
|
-
<xsl:value-of select="."/>
|
792
|
-
</xsl:for-each>
|
793
|
-
|
794
|
-
</xsl:if>
|
795
|
-
<xsl:if test="ogc:place">
|
796
|
-
<xsl:text>, </xsl:text>
|
797
|
-
<xsl:value-of select="ogc:place"/>
|
798
|
-
</xsl:if>
|
799
|
-
<xsl:if test="ogc:date[@type='published']/ogc:on">
|
800
|
-
<xsl:text> (</xsl:text><xsl:value-of select="ogc:date[@type='published']/ogc:on"/><xsl:text>).</xsl:text>
|
801
|
-
</xsl:if>
|
802
|
-
<xsl:apply-templates select="ogc:formattedref"/>
|
711
|
+
<xsl:call-template name="processBibitem"/>
|
803
712
|
</fo:block>
|
804
713
|
</fo:list-item-body>
|
805
714
|
</fo:list-item>
|
806
715
|
</fo:list-block>
|
807
716
|
</xsl:template>
|
808
717
|
|
809
|
-
<!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem" mode="contents"/> [position() > 1] -->
|
810
718
|
<xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
|
811
719
|
|
812
|
-
|
813
|
-
<xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem/ogc:title">
|
720
|
+
<xsl:template match="ogc:bibitem/ogc:title">
|
814
721
|
<fo:inline font-style="italic">
|
815
722
|
<xsl:apply-templates/>
|
816
723
|
</fo:inline>
|
@@ -2306,14 +2213,36 @@
|
|
2306
2213
|
<fo:table-cell>
|
2307
2214
|
<fo:block>
|
2308
2215
|
|
2309
|
-
|
2216
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2217
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2218
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2219
|
+
</xsl:if>
|
2220
|
+
</xsl:if> -->
|
2310
2221
|
|
2311
2222
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2312
2223
|
|
2313
2224
|
</fo:block>
|
2314
2225
|
</fo:table-cell>
|
2315
2226
|
</fo:table-row>
|
2316
|
-
|
2227
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2228
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2229
|
+
<fo:table-row>
|
2230
|
+
<fo:table-cell>
|
2231
|
+
<fo:block margin-top="6pt">
|
2232
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2233
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2234
|
+
</xsl:if>
|
2235
|
+
<xsl:text> </xsl:text>
|
2236
|
+
</fo:block>
|
2237
|
+
</fo:table-cell>
|
2238
|
+
<fo:table-cell>
|
2239
|
+
<fo:block>
|
2240
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2241
|
+
</fo:block>
|
2242
|
+
</fo:table-cell>
|
2243
|
+
</fo:table-row>
|
2244
|
+
</xsl:if>
|
2245
|
+
</xsl:if> -->
|
2317
2246
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2318
2247
|
<xsl:apply-templates/>
|
2319
2248
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -3075,22 +3004,30 @@
|
|
3075
3004
|
</fo:block>
|
3076
3005
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3077
3006
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3007
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3008
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3009
|
+
</xsl:if>
|
3078
3010
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3079
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3011
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
|
3012
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3013
|
+
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
3014
|
+
</xsl:if>
|
3080
3015
|
<xsl:variable name="simple-table">
|
3081
3016
|
<xsl:call-template name="getSimpleTable"/>
|
3082
3017
|
</xsl:variable>
|
3083
3018
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3084
3019
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3085
|
-
<fo:table-column column-width="35mm"/>
|
3086
|
-
<fo:table-column column-width="115mm"/>
|
3020
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3021
|
+
<fo:table-column column-width="115mm"/> -->
|
3022
|
+
<fo:table-column column-width="25%"/>
|
3023
|
+
<fo:table-column column-width="75%"/>
|
3087
3024
|
</xsl:if>
|
3088
3025
|
<xsl:apply-templates mode="requirement"/>
|
3089
3026
|
</fo:table>
|
3090
3027
|
<!-- fn processing -->
|
3091
3028
|
<xsl:if test=".//*[local-name() = 'fn']">
|
3092
3029
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
3093
|
-
<fo:block font-size="90%" border-bottom="
|
3030
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3094
3031
|
<xsl:call-template name="fn_display"/>
|
3095
3032
|
</fo:block>
|
3096
3033
|
</xsl:for-each>
|
@@ -3106,17 +3043,20 @@
|
|
3106
3043
|
<xsl:apply-templates mode="requirement"/>
|
3107
3044
|
</fo:table-body>
|
3108
3045
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3109
|
-
<fo:table-row>
|
3046
|
+
<fo:table-row height="7mm">
|
3047
|
+
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
|
3048
|
+
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3049
|
+
</xsl:if>
|
3110
3050
|
<xsl:apply-templates mode="requirement"/>
|
3111
3051
|
</fo:table-row>
|
3112
3052
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3113
|
-
<fo:table-cell text-align="{@align}">
|
3053
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
|
3114
3054
|
<xsl:attribute name="text-align">
|
3115
3055
|
<xsl:choose>
|
3116
3056
|
<xsl:when test="@align">
|
3117
3057
|
<xsl:value-of select="@align"/>
|
3118
3058
|
</xsl:when>
|
3119
|
-
<xsl:otherwise>
|
3059
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3120
3060
|
</xsl:choose>
|
3121
3061
|
</xsl:attribute>
|
3122
3062
|
<xsl:if test="@colspan">
|
@@ -3130,21 +3070,25 @@
|
|
3130
3070
|
</xsl:attribute>
|
3131
3071
|
</xsl:if>
|
3132
3072
|
|
3133
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3073
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3134
3074
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3135
3075
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3136
3076
|
</xsl:if>
|
3137
3077
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3138
3078
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3139
3079
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3140
|
-
</xsl:if>
|
3080
|
+
</xsl:if> -->
|
3141
3081
|
|
3142
3082
|
<fo:block>
|
3143
3083
|
<xsl:apply-templates/>
|
3144
3084
|
</fo:block>
|
3145
3085
|
</fo:table-cell>
|
3146
3086
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3147
|
-
<fo:table-cell text-align="{@align}">
|
3087
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
|
3088
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3089
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3090
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3091
|
+
</xsl:if>
|
3148
3092
|
<xsl:attribute name="text-align">
|
3149
3093
|
<xsl:choose>
|
3150
3094
|
<xsl:when test="@align">
|
@@ -3164,24 +3108,25 @@
|
|
3164
3108
|
</xsl:attribute>
|
3165
3109
|
</xsl:if>
|
3166
3110
|
|
3167
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3111
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3168
3112
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3169
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3170
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3113
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3114
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3171
3115
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3172
3116
|
</xsl:if>
|
3173
|
-
</xsl:if>
|
3117
|
+
</xsl:if> -->
|
3118
|
+
<!-- 2nd line and below -->
|
3174
3119
|
|
3175
3120
|
<fo:block>
|
3176
3121
|
<xsl:apply-templates/>
|
3177
3122
|
</fo:block>
|
3178
3123
|
</fo:table-cell>
|
3179
3124
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3180
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3125
|
+
<fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
|
3181
3126
|
<xsl:apply-templates/>
|
3182
3127
|
</fo:block>
|
3183
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3184
|
-
<fo:block margin-bottom="10pt"
|
3128
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3129
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3185
3130
|
<xsl:apply-templates/>
|
3186
3131
|
</fo:block>
|
3187
3132
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -3522,6 +3467,195 @@
|
|
3522
3467
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3523
3468
|
<fo:block><xsl:apply-templates/></fo:block>
|
3524
3469
|
</fo:table-cell>
|
3470
|
+
</xsl:template><xsl:template name="processBibitem">
|
3471
|
+
|
3472
|
+
<xsl:choose>
|
3473
|
+
<xsl:when test="*[local-name() = 'formattedref']">
|
3474
|
+
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
3475
|
+
</xsl:when>
|
3476
|
+
<xsl:otherwise>
|
3477
|
+
<xsl:variable name="personalAuthors">
|
3478
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
|
3479
|
+
<xsl:call-template name="processPersonalAuthor"/>
|
3480
|
+
</xsl:for-each>
|
3481
|
+
<xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
|
3482
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
|
3483
|
+
<xsl:call-template name="processPersonalAuthor"/>
|
3484
|
+
</xsl:for-each>
|
3485
|
+
</xsl:if>
|
3486
|
+
</xsl:variable>
|
3487
|
+
|
3488
|
+
<xsl:variable name="city" select="*[local-name() = 'place']"/>
|
3489
|
+
<xsl:variable name="year">
|
3490
|
+
<xsl:choose>
|
3491
|
+
<xsl:when test="*[local-name() = 'date'][@type = 'published']">
|
3492
|
+
<xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
|
3493
|
+
<xsl:call-template name="renderDate"/>
|
3494
|
+
</xsl:for-each>
|
3495
|
+
</xsl:when>
|
3496
|
+
<xsl:when test="*[local-name() = 'date'][@type = 'issued']">
|
3497
|
+
<xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
|
3498
|
+
<xsl:call-template name="renderDate"/>
|
3499
|
+
</xsl:for-each>
|
3500
|
+
</xsl:when>
|
3501
|
+
<xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
|
3502
|
+
<xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
|
3503
|
+
<xsl:call-template name="renderDate"/>
|
3504
|
+
</xsl:for-each>
|
3505
|
+
</xsl:when>
|
3506
|
+
<xsl:otherwise>
|
3507
|
+
<xsl:for-each select="*[local-name() = 'date']">
|
3508
|
+
<xsl:call-template name="renderDate"/>
|
3509
|
+
</xsl:for-each>
|
3510
|
+
</xsl:otherwise>
|
3511
|
+
</xsl:choose>
|
3512
|
+
</xsl:variable>
|
3513
|
+
|
3514
|
+
<xsl:variable name="uri" select="*[local-name() = 'uri']"/>
|
3515
|
+
|
3516
|
+
|
3517
|
+
<!-- citation structure:
|
3518
|
+
{personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
|
3519
|
+
-->
|
3520
|
+
|
3521
|
+
<!-- Author(s) -->
|
3522
|
+
<xsl:choose>
|
3523
|
+
<xsl:when test="xalan:nodeset($personalAuthors)//author">
|
3524
|
+
<xsl:for-each select="xalan:nodeset($personalAuthors)//author">
|
3525
|
+
<xsl:apply-templates/>
|
3526
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
3527
|
+
</xsl:for-each>
|
3528
|
+
<xsl:text>: </xsl:text>
|
3529
|
+
</xsl:when>
|
3530
|
+
<xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
|
3531
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
|
3532
|
+
<xsl:value-of select="."/>
|
3533
|
+
<xsl:if test="position() != last()">/</xsl:if>
|
3534
|
+
</xsl:for-each>
|
3535
|
+
<xsl:text>: </xsl:text>
|
3536
|
+
</xsl:when>
|
3537
|
+
<xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
|
3538
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
|
3539
|
+
<xsl:value-of select="."/>
|
3540
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
3541
|
+
</xsl:for-each>
|
3542
|
+
<xsl:text>: </xsl:text>
|
3543
|
+
</xsl:when>
|
3544
|
+
</xsl:choose>
|
3545
|
+
|
3546
|
+
|
3547
|
+
<xsl:variable name="document_identifier">
|
3548
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
3549
|
+
<xsl:choose>
|
3550
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
3551
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
3552
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
3553
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3554
|
+
</xsl:if>
|
3555
|
+
<xsl:value-of select="$_doc_ident"/>
|
3556
|
+
</xsl:when>
|
3557
|
+
<xsl:otherwise>
|
3558
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
3559
|
+
<xsl:if test="$type != ''">
|
3560
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3561
|
+
</xsl:if>
|
3562
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
3563
|
+
</xsl:otherwise>
|
3564
|
+
</xsl:choose>
|
3565
|
+
</xsl:variable>
|
3566
|
+
|
3567
|
+
<xsl:value-of select="$document_identifier"/>
|
3568
|
+
|
3569
|
+
<xsl:apply-templates select="*[local-name() = 'note']"/>
|
3570
|
+
|
3571
|
+
<xsl:variable name="isDraft">
|
3572
|
+
<xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
|
3573
|
+
<xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization'][*[local-name() = 'name']/text() = 'Open Geospatial Consortium'] and $stage != '' and $stage != 'published' and $stage != 'deprecated' and $stage != 'retired'">true</xsl:if>
|
3574
|
+
</xsl:variable>
|
3575
|
+
|
3576
|
+
<xsl:if test="$isDraft = 'true'">
|
3577
|
+
<xsl:text> (Draft)</xsl:text>
|
3578
|
+
</xsl:if>
|
3579
|
+
|
3580
|
+
<xsl:text>, </xsl:text>
|
3581
|
+
|
3582
|
+
<xsl:choose>
|
3583
|
+
<xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
|
3584
|
+
<xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
|
3585
|
+
</xsl:when>
|
3586
|
+
<xsl:otherwise>
|
3587
|
+
<xsl:apply-templates select="*[local-name() = 'title']"/>
|
3588
|
+
</xsl:otherwise>
|
3589
|
+
</xsl:choose>
|
3590
|
+
|
3591
|
+
<xsl:text>. </xsl:text>
|
3592
|
+
|
3593
|
+
<xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
|
3594
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
|
3595
|
+
<xsl:value-of select="."/>
|
3596
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
3597
|
+
</xsl:for-each>
|
3598
|
+
<xsl:if test="normalize-space($city) != ''">, </xsl:if>
|
3599
|
+
</xsl:if>
|
3600
|
+
|
3601
|
+
<xsl:value-of select="$city"/>
|
3602
|
+
|
3603
|
+
<xsl:if test="(*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name'] or normalize-space($city) != '') and normalize-space($year) != ''">
|
3604
|
+
<xsl:text> </xsl:text>
|
3605
|
+
</xsl:if>
|
3606
|
+
|
3607
|
+
<xsl:if test="normalize-space($year) != ''">
|
3608
|
+
<xsl:text>(</xsl:text>
|
3609
|
+
<xsl:value-of select="$year"/>
|
3610
|
+
<xsl:text>). </xsl:text>
|
3611
|
+
</xsl:if>
|
3612
|
+
|
3613
|
+
<xsl:if test="normalize-space($uri) != ''">
|
3614
|
+
<xsl:text> </xsl:text>
|
3615
|
+
<fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
|
3616
|
+
<xsl:value-of select="$uri"/>
|
3617
|
+
</fo:basic-link>
|
3618
|
+
</xsl:if>
|
3619
|
+
|
3620
|
+
</xsl:otherwise>
|
3621
|
+
</xsl:choose>
|
3622
|
+
|
3623
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
3624
|
+
<xsl:choose>
|
3625
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
3626
|
+
<author>
|
3627
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
3628
|
+
</author>
|
3629
|
+
</xsl:when>
|
3630
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
3631
|
+
<author>
|
3632
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3633
|
+
<xsl:text> </xsl:text>
|
3634
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
3635
|
+
</author>
|
3636
|
+
</xsl:when>
|
3637
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
3638
|
+
<author>
|
3639
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3640
|
+
<xsl:text> </xsl:text>
|
3641
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
3642
|
+
</author>
|
3643
|
+
</xsl:when>
|
3644
|
+
<xsl:otherwise>
|
3645
|
+
<xsl:apply-templates/>
|
3646
|
+
</xsl:otherwise>
|
3647
|
+
</xsl:choose>
|
3648
|
+
</xsl:template><xsl:template name="renderDate">
|
3649
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
3650
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
3651
|
+
</xsl:if>
|
3652
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
3653
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
3654
|
+
</xsl:if>
|
3655
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
3656
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
3657
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
3658
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3525
3659
|
</xsl:template><xsl:template name="convertDate">
|
3526
3660
|
<xsl:param name="date"/>
|
3527
3661
|
<xsl:param name="format" select="'short'"/>
|