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.
@@ -802,43 +802,8 @@
802
802
  <fo:block id="{@id}" margin-bottom="12pt" start-indent="12mm" text-indent="-12mm" line-height="115%">
803
803
  <xsl:if test=".//ogc:fn">
804
804
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
805
- </xsl:if>
806
- <xsl:choose>
807
- <xsl:when test="ogc:formattedref">
808
- <xsl:apply-templates select="ogc:formattedref"/>
809
- </xsl:when>
810
- <xsl:otherwise>
811
- <xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
812
- <xsl:apply-templates/>
813
- <xsl:if test="position() != last()">, </xsl:if>
814
- <xsl:if test="position() = last()">: </xsl:if>
815
- </xsl:for-each>
816
- <!-- ogc:docidentifier -->
817
- <xsl:if test="ogc:docidentifier">
818
- <xsl:value-of select="ogc:docidentifier/@type"/><xsl:text> </xsl:text>
819
- <xsl:value-of select="ogc:docidentifier"/>
820
- </xsl:if>
821
- <xsl:apply-templates select="ogc:note"/>
822
- <xsl:if test="ogc:docidentifier">, </xsl:if>
823
- <fo:inline font-style="italic">
824
- <xsl:choose>
825
- <xsl:when test="ogc:title[@type = 'main' and @language = 'en']">
826
- <xsl:value-of select="ogc:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text>
827
- </xsl:when>
828
- <xsl:otherwise>
829
- <xsl:value-of select="ogc:title"/><xsl:text>. </xsl:text>
830
- </xsl:otherwise>
831
- </xsl:choose>
832
- </fo:inline>
833
- <xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
834
- <xsl:apply-templates/>
835
- <xsl:if test="position() != last()">, </xsl:if>
836
- </xsl:for-each>
837
- <xsl:if test="ogc:date[@type='published']/ogc:on">
838
- <xsl:text>(</xsl:text><xsl:value-of select="ogc:date[@type='published']/ogc:on"/><xsl:text>)</xsl:text>
839
- </xsl:if>
840
- </xsl:otherwise>
841
- </xsl:choose>
805
+ </xsl:if>
806
+ <xsl:call-template name="processBibitem"/>
842
807
  </fo:block>
843
808
  </xsl:template>
844
809
 
@@ -971,8 +936,7 @@
971
936
  </fo:block>
972
937
  </xsl:template>
973
938
 
974
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
975
- <!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem"> [position() &gt; 1] -->
939
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
976
940
  <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem">
977
941
  <fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="12mm">
978
942
  <fo:list-item>
@@ -985,80 +949,23 @@
985
949
  </fo:list-item-label>
986
950
  <fo:list-item-body start-indent="body-start()">
987
951
  <fo:block>
988
-
989
- <xsl:if test="not(ogc:formattedref)">
990
- <xsl:choose>
991
- <xsl:when test="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:abbreviation">
992
- <xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:abbreviation">
993
- <xsl:value-of select="."/>
994
- <xsl:if test="position() != last()">/</xsl:if>
995
- </xsl:for-each>
996
- <xsl:text>: </xsl:text>
997
- </xsl:when>
998
- <xsl:when test="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
999
- <xsl:value-of select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name"/>
1000
- <xsl:text>: </xsl:text>
1001
- </xsl:when>
1002
- </xsl:choose>
1003
-
1004
- </xsl:if>
1005
-
1006
- <xsl:if test="ogc:docidentifier">
1007
- <xsl:choose>
1008
- <xsl:when test="ogc:docidentifier/@type = 'ISO' and ogc:formattedref"/>
1009
- <xsl:when test="ogc:docidentifier/@type = 'OGC' and ogc:formattedref"/>
1010
- <xsl:otherwise><fo:inline>
1011
- <xsl:if test="ogc:docidentifier/@type = 'OGC'">OGC </xsl:if>
1012
- <xsl:value-of select="ogc:docidentifier"/><xsl:apply-templates select="ogc:note"/>, </fo:inline></xsl:otherwise>
1013
- </xsl:choose>
1014
- </xsl:if>
1015
-
1016
-
1017
-
1018
- <xsl:choose>
1019
- <xsl:when test="ogc:title[@type = 'main' and @language = 'en']">
1020
- <xsl:apply-templates select="ogc:title[@type = 'main' and @language = 'en']"/>
1021
- </xsl:when>
1022
- <xsl:otherwise>
1023
- <xsl:apply-templates select="ogc:title"/>
1024
- </xsl:otherwise>
1025
- </xsl:choose>
1026
- <xsl:if test="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
1027
- <xsl:text>, </xsl:text>
1028
- <xsl:for-each select="ogc:contributor[ogc:role/@type='publisher']/ogc:organization/ogc:name">
1029
- <xsl:if test="position() != last()">and </xsl:if>
1030
- <xsl:value-of select="."/>
1031
- </xsl:for-each>
1032
-
1033
- </xsl:if>
1034
- <xsl:if test="ogc:place">
1035
- <xsl:text>, </xsl:text>
1036
- <xsl:value-of select="ogc:place"/>
1037
- </xsl:if>
1038
- <xsl:if test="ogc:date[@type='published']/ogc:on">
1039
- <xsl:text> (</xsl:text><xsl:value-of select="ogc:date[@type='published']/ogc:on"/><xsl:text>).</xsl:text>
1040
- </xsl:if>
1041
- <xsl:apply-templates select="ogc:formattedref"/>
952
+ <xsl:call-template name="processBibitem"/>
1042
953
  </fo:block>
1043
954
  </fo:list-item-body>
1044
955
  </fo:list-item>
1045
956
  </fo:list-block>
1046
957
  </xsl:template>
1047
958
 
1048
- <!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem" mode="contents"/> [position() &gt; 1] -->
959
+
1049
960
  <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
1050
961
 
1051
- <!-- <xsl:template match="ogc:references[@id = '_bibliography']/ogc:bibitem/ogc:title"> [position() &gt; 1]-->
1052
- <xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem/ogc:title">
962
+ <xsl:template match="ogc:bibitem/ogc:title">
1053
963
  <fo:inline font-style="italic">
1054
964
  <xsl:apply-templates/>
1055
965
  </fo:inline>
1056
966
  </xsl:template>
1057
967
 
1058
968
 
1059
-
1060
-
1061
-
1062
969
  <xsl:template match="ogc:admonition">
1063
970
  <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
1064
971
  <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
@@ -2541,14 +2448,36 @@
2541
2448
  <fo:table-cell>
2542
2449
  <fo:block>
2543
2450
 
2544
-
2451
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2452
+ <xsl:if test="local-name(*[1]) != 'stem'">
2453
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2454
+ </xsl:if>
2455
+ </xsl:if> -->
2545
2456
 
2546
2457
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2547
2458
 
2548
2459
  </fo:block>
2549
2460
  </fo:table-cell>
2550
2461
  </fo:table-row>
2551
-
2462
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2463
+ <xsl:if test="local-name(*[1]) = 'stem'">
2464
+ <fo:table-row>
2465
+ <fo:table-cell>
2466
+ <fo:block margin-top="6pt">
2467
+ <xsl:if test="normalize-space($key_iso) = 'true'">
2468
+ <xsl:attribute name="margin-top">0</xsl:attribute>
2469
+ </xsl:if>
2470
+ <xsl:text>&#xA0;</xsl:text>
2471
+ </fo:block>
2472
+ </fo:table-cell>
2473
+ <fo:table-cell>
2474
+ <fo:block>
2475
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2476
+ </fo:block>
2477
+ </fo:table-cell>
2478
+ </fo:table-row>
2479
+ </xsl:if>
2480
+ </xsl:if> -->
2552
2481
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2553
2482
  <xsl:apply-templates/>
2554
2483
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3310,22 +3239,30 @@
3310
3239
  </fo:block>
3311
3240
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3312
3241
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3242
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3243
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3244
+ </xsl:if>
3313
3245
  <fo:block-container margin-left="0mm" margin-right="0mm">
3314
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3246
+ <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3247
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3248
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3249
+ </xsl:if>
3315
3250
  <xsl:variable name="simple-table">
3316
3251
  <xsl:call-template name="getSimpleTable"/>
3317
3252
  </xsl:variable>
3318
3253
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3319
3254
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3320
- <fo:table-column column-width="35mm"/>
3321
- <fo:table-column column-width="115mm"/>
3255
+ <!-- <fo:table-column column-width="35mm"/>
3256
+ <fo:table-column column-width="115mm"/> -->
3257
+ <fo:table-column column-width="25%"/>
3258
+ <fo:table-column column-width="75%"/>
3322
3259
  </xsl:if>
3323
3260
  <xsl:apply-templates mode="requirement"/>
3324
3261
  </fo:table>
3325
3262
  <!-- fn processing -->
3326
3263
  <xsl:if test=".//*[local-name() = 'fn']">
3327
3264
  <xsl:for-each select="*[local-name() = 'tbody']">
3328
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3265
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3329
3266
  <xsl:call-template name="fn_display"/>
3330
3267
  </fo:block>
3331
3268
  </xsl:for-each>
@@ -3341,17 +3278,20 @@
3341
3278
  <xsl:apply-templates mode="requirement"/>
3342
3279
  </fo:table-body>
3343
3280
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3344
- <fo:table-row>
3281
+ <fo:table-row height="7mm">
3282
+ <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3283
+ <xsl:attribute name="border">1pt solid black</xsl:attribute>
3284
+ </xsl:if>
3345
3285
  <xsl:apply-templates mode="requirement"/>
3346
3286
  </fo:table-row>
3347
3287
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3348
- <fo:table-cell text-align="{@align}">
3288
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3349
3289
  <xsl:attribute name="text-align">
3350
3290
  <xsl:choose>
3351
3291
  <xsl:when test="@align">
3352
3292
  <xsl:value-of select="@align"/>
3353
3293
  </xsl:when>
3354
- <xsl:otherwise>center</xsl:otherwise>
3294
+ <xsl:otherwise>left</xsl:otherwise>
3355
3295
  </xsl:choose>
3356
3296
  </xsl:attribute>
3357
3297
  <xsl:if test="@colspan">
@@ -3365,21 +3305,25 @@
3365
3305
  </xsl:attribute>
3366
3306
  </xsl:if>
3367
3307
 
3368
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3308
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3369
3309
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3370
3310
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3371
3311
  </xsl:if>
3372
3312
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3373
3313
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3374
3314
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3375
- </xsl:if>
3315
+ </xsl:if> -->
3376
3316
 
3377
3317
  <fo:block>
3378
3318
  <xsl:apply-templates/>
3379
3319
  </fo:block>
3380
3320
  </fo:table-cell>
3381
3321
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3382
- <fo:table-cell text-align="{@align}">
3322
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3323
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3324
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3325
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3326
+ </xsl:if>
3383
3327
  <xsl:attribute name="text-align">
3384
3328
  <xsl:choose>
3385
3329
  <xsl:when test="@align">
@@ -3399,24 +3343,25 @@
3399
3343
  </xsl:attribute>
3400
3344
  </xsl:if>
3401
3345
 
3402
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3346
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3403
3347
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3404
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3405
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3348
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3349
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3406
3350
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3407
3351
  </xsl:if>
3408
- </xsl:if>
3352
+ </xsl:if> -->
3353
+ <!-- 2nd line and below -->
3409
3354
 
3410
3355
  <fo:block>
3411
3356
  <xsl:apply-templates/>
3412
3357
  </fo:block>
3413
3358
  </fo:table-cell>
3414
3359
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3415
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3360
+ <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3416
3361
  <xsl:apply-templates/>
3417
3362
  </fo:block>
3418
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3419
- <fo:block margin-bottom="10pt">
3363
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3364
+ <fo:block> <!-- margin-bottom="10pt" -->
3420
3365
  <xsl:apply-templates/>
3421
3366
  </fo:block>
3422
3367
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3757,6 +3702,195 @@
3757
3702
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3758
3703
  <fo:block><xsl:apply-templates/></fo:block>
3759
3704
  </fo:table-cell>
3705
+ </xsl:template><xsl:template name="processBibitem">
3706
+
3707
+ <xsl:choose>
3708
+ <xsl:when test="*[local-name() = 'formattedref']">
3709
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
3710
+ </xsl:when>
3711
+ <xsl:otherwise>
3712
+ <xsl:variable name="personalAuthors">
3713
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person']">
3714
+ <xsl:call-template name="processPersonalAuthor"/>
3715
+ </xsl:for-each>
3716
+ <xsl:if test="not(*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'person'])">
3717
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']/*[local-name() = 'person']">
3718
+ <xsl:call-template name="processPersonalAuthor"/>
3719
+ </xsl:for-each>
3720
+ </xsl:if>
3721
+ </xsl:variable>
3722
+
3723
+ <xsl:variable name="city" select="*[local-name() = 'place']"/>
3724
+ <xsl:variable name="year">
3725
+ <xsl:choose>
3726
+ <xsl:when test="*[local-name() = 'date'][@type = 'published']">
3727
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'published']">
3728
+ <xsl:call-template name="renderDate"/>
3729
+ </xsl:for-each>
3730
+ </xsl:when>
3731
+ <xsl:when test="*[local-name() = 'date'][@type = 'issued']">
3732
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'issued']">
3733
+ <xsl:call-template name="renderDate"/>
3734
+ </xsl:for-each>
3735
+ </xsl:when>
3736
+ <xsl:when test="*[local-name() = 'date'][@type = 'circulated']">
3737
+ <xsl:for-each select="*[local-name() = 'date'][@type = 'circulated']">
3738
+ <xsl:call-template name="renderDate"/>
3739
+ </xsl:for-each>
3740
+ </xsl:when>
3741
+ <xsl:otherwise>
3742
+ <xsl:for-each select="*[local-name() = 'date']">
3743
+ <xsl:call-template name="renderDate"/>
3744
+ </xsl:for-each>
3745
+ </xsl:otherwise>
3746
+ </xsl:choose>
3747
+ </xsl:variable>
3748
+
3749
+ <xsl:variable name="uri" select="*[local-name() = 'uri']"/>
3750
+
3751
+
3752
+ <!-- citation structure:
3753
+ {personal names | organisation}: {document identifier}, {title}. {publisher}, {city} ({year})
3754
+ -->
3755
+
3756
+ <!-- Author(s) -->
3757
+ <xsl:choose>
3758
+ <xsl:when test="xalan:nodeset($personalAuthors)//author">
3759
+ <xsl:for-each select="xalan:nodeset($personalAuthors)//author">
3760
+ <xsl:apply-templates/>
3761
+ <xsl:if test="position() != last()">, </xsl:if>
3762
+ </xsl:for-each>
3763
+ <xsl:text>: </xsl:text>
3764
+ </xsl:when>
3765
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
3766
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'abbreviation']">
3767
+ <xsl:value-of select="."/>
3768
+ <xsl:if test="position() != last()">/</xsl:if>
3769
+ </xsl:for-each>
3770
+ <xsl:text>: </xsl:text>
3771
+ </xsl:when>
3772
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
3773
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
3774
+ <xsl:value-of select="."/>
3775
+ <xsl:if test="position() != last()">, </xsl:if>
3776
+ </xsl:for-each>
3777
+ <xsl:text>: </xsl:text>
3778
+ </xsl:when>
3779
+ </xsl:choose>
3780
+
3781
+
3782
+ <xsl:variable name="document_identifier">
3783
+ <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')]"/>
3784
+ <xsl:choose>
3785
+ <xsl:when test="normalize-space($_doc_ident) != ''">
3786
+ <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"/>
3787
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
3788
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3789
+ </xsl:if>
3790
+ <xsl:value-of select="$_doc_ident"/>
3791
+ </xsl:when>
3792
+ <xsl:otherwise>
3793
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
3794
+ <xsl:if test="$type != ''">
3795
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3796
+ </xsl:if>
3797
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
3798
+ </xsl:otherwise>
3799
+ </xsl:choose>
3800
+ </xsl:variable>
3801
+
3802
+ <xsl:value-of select="$document_identifier"/>
3803
+
3804
+ <xsl:apply-templates select="*[local-name() = 'note']"/>
3805
+
3806
+ <xsl:variable name="isDraft">
3807
+ <xsl:variable name="stage" select="normalize-space(*[local-name() = 'status']/*[local-name() = 'stage'])"/>
3808
+ <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>
3809
+ </xsl:variable>
3810
+
3811
+ <xsl:if test="$isDraft = 'true'">
3812
+ <xsl:text> (Draft)</xsl:text>
3813
+ </xsl:if>
3814
+
3815
+ <xsl:text>, </xsl:text>
3816
+
3817
+ <xsl:choose>
3818
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
3819
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
3820
+ </xsl:when>
3821
+ <xsl:otherwise>
3822
+ <xsl:apply-templates select="*[local-name() = 'title']"/>
3823
+ </xsl:otherwise>
3824
+ </xsl:choose>
3825
+
3826
+ <xsl:text>. </xsl:text>
3827
+
3828
+ <xsl:if test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
3829
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type = 'publisher']/*[local-name() = 'organization']/*[local-name() = 'name']">
3830
+ <xsl:value-of select="."/>
3831
+ <xsl:if test="position() != last()">, </xsl:if>
3832
+ </xsl:for-each>
3833
+ <xsl:if test="normalize-space($city) != ''">, </xsl:if>
3834
+ </xsl:if>
3835
+
3836
+ <xsl:value-of select="$city"/>
3837
+
3838
+ <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) != ''">
3839
+ <xsl:text> </xsl:text>
3840
+ </xsl:if>
3841
+
3842
+ <xsl:if test="normalize-space($year) != ''">
3843
+ <xsl:text>(</xsl:text>
3844
+ <xsl:value-of select="$year"/>
3845
+ <xsl:text>). </xsl:text>
3846
+ </xsl:if>
3847
+
3848
+ <xsl:if test="normalize-space($uri) != ''">
3849
+ <xsl:text> </xsl:text>
3850
+ <fo:basic-link external-destination="{$uri}" fox:alt-text="{$uri}">
3851
+ <xsl:value-of select="$uri"/>
3852
+ </fo:basic-link>
3853
+ </xsl:if>
3854
+
3855
+ </xsl:otherwise>
3856
+ </xsl:choose>
3857
+
3858
+ </xsl:template><xsl:template name="processPersonalAuthor">
3859
+ <xsl:choose>
3860
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
3861
+ <author>
3862
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
3863
+ </author>
3864
+ </xsl:when>
3865
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
3866
+ <author>
3867
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3868
+ <xsl:text> </xsl:text>
3869
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
3870
+ </author>
3871
+ </xsl:when>
3872
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
3873
+ <author>
3874
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
3875
+ <xsl:text> </xsl:text>
3876
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
3877
+ </author>
3878
+ </xsl:when>
3879
+ <xsl:otherwise>
3880
+ <xsl:apply-templates/>
3881
+ </xsl:otherwise>
3882
+ </xsl:choose>
3883
+ </xsl:template><xsl:template name="renderDate">
3884
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
3885
+ <xsl:value-of select="*[local-name() = 'on']"/>
3886
+ </xsl:if>
3887
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
3888
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
3889
+ </xsl:if>
3890
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
3891
+ <xsl:value-of select="translate(.,'. ','')"/>
3892
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
3893
+ <xsl:value-of select="substring(.,1,1)"/>
3760
3894
  </xsl:template><xsl:template name="convertDate">
3761
3895
  <xsl:param name="date"/>
3762
3896
  <xsl:param name="format" select="'short'"/>