metanorma-ogc 1.2.15 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
+ <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
6
7
  <xsl:variable name="images" select="document($svg_images)"/>
7
8
 
8
9
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
@@ -101,7 +102,9 @@
101
102
 
102
103
  </fo:layout-master-set>
103
104
 
104
- <xsl:call-template name="addPDFUAmeta"/>
105
+ <fo:declarations>
106
+ <xsl:call-template name="addPDFUAmeta"/>
107
+ </fo:declarations>
105
108
 
106
109
  <xsl:call-template name="addBookmarks">
107
110
  <xsl:with-param name="contents" select="$contents"/>
@@ -1760,6 +1763,7 @@
1760
1763
 
1761
1764
 
1762
1765
 
1766
+
1763
1767
 
1764
1768
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1765
1769
 
@@ -2397,7 +2401,15 @@
2397
2401
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
2398
2402
  <xsl:value-of select="@target"/>
2399
2403
  </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
2400
- <xsl:variable name="math_text" select="normalize-space(.)"/>
2404
+ <xsl:variable name="mathml">
2405
+ <xsl:for-each select="*">
2406
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
2407
+ <xsl:copy-of select="."/>
2408
+ </xsl:if>
2409
+ </xsl:for-each>
2410
+ </xsl:variable>
2411
+
2412
+ <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2401
2413
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2402
2414
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2403
2415
  <xsl:param name="cols-count"/>
@@ -3382,6 +3394,10 @@
3382
3394
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3383
3395
  <xsl:apply-templates/>
3384
3396
  </fo:inline>
3397
+ </xsl:template><xsl:template match="*[local-name()='hi']">
3398
+ <fo:inline background-color="yellow">
3399
+ <xsl:apply-templates/>
3400
+ </fo:inline>
3385
3401
  </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
3386
3402
  <xsl:variable name="text" select="normalize-space(.)"/>
3387
3403
  <fo:inline font-size="75%">
@@ -3722,6 +3738,7 @@
3722
3738
  <xsl:apply-templates select="." mode="mathml"/>
3723
3739
  </xsl:variable>
3724
3740
  <fo:instream-foreign-object fox:alt-text="Math">
3741
+
3725
3742
  <!-- <xsl:copy-of select="."/> -->
3726
3743
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3727
3744
  </fo:instream-foreign-object>
@@ -3740,7 +3757,7 @@
3740
3757
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
3741
3758
  </xsl:copy>
3742
3759
  <mathml:mspace width="0.5ex"/>
3743
- </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3760
+ </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3744
3761
  <xsl:variable name="target">
3745
3762
  <xsl:choose>
3746
3763
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -3774,8 +3791,6 @@
3774
3791
  </xsl:otherwise>
3775
3792
  </xsl:choose>
3776
3793
  </fo:inline>
3777
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
3778
- <fo:inline id="{@id}"/>
3779
3794
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3780
3795
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3781
3796
  <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
@@ -3990,6 +4005,7 @@
3990
4005
  <fo:block id="{@id}">
3991
4006
  <xsl:apply-templates/>
3992
4007
  </fo:block>
4008
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3993
4009
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3994
4010
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3995
4011
  <xsl:apply-templates/>
@@ -4624,9 +4640,10 @@
4624
4640
  </xsl:choose>
4625
4641
 
4626
4642
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4627
-
4643
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
4628
4644
  <xsl:variable name="element">
4629
4645
 
4646
+
4630
4647
  inline
4631
4648
  </xsl:variable>
4632
4649
  <xsl:choose>
@@ -4730,30 +4747,48 @@
4730
4747
  <xsl:text>— </xsl:text>
4731
4748
  <xsl:apply-templates/>
4732
4749
  </xsl:template><xsl:template match="*[local-name() = 'eref']">
4733
- <fo:inline xsl:use-attribute-sets="eref-style">
4734
- <xsl:if test="@type = 'footnote'">
4735
-
4736
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4737
- <xsl:attribute name="font-size">80%</xsl:attribute>
4738
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4739
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4740
-
4741
-
4742
- </xsl:if>
4743
-
4744
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4745
-
4746
- <xsl:if test="@type = 'inline'">
4747
-
4748
-
4749
-
4750
-
4751
- </xsl:if>
4752
-
4753
-
4754
- <xsl:apply-templates/>
4755
- </fo:basic-link>
4756
- </fo:inline>
4750
+
4751
+ <xsl:variable name="bibitemid">
4752
+ <xsl:choose>
4753
+ <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
4754
+ <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
4755
+ <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
4756
+ </xsl:choose>
4757
+ </xsl:variable>
4758
+
4759
+ <xsl:choose>
4760
+ <xsl:when test="normalize-space($bibitemid) != ''">
4761
+ <fo:inline xsl:use-attribute-sets="eref-style">
4762
+ <xsl:if test="@type = 'footnote'">
4763
+
4764
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4765
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4766
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4767
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4768
+
4769
+
4770
+ </xsl:if>
4771
+
4772
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4773
+ <xsl:if test="normalize-space(@citeas) = ''">
4774
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4775
+ </xsl:if>
4776
+ <xsl:if test="@type = 'inline'">
4777
+
4778
+
4779
+
4780
+
4781
+ </xsl:if>
4782
+
4783
+ <xsl:apply-templates/>
4784
+ </fo:basic-link>
4785
+
4786
+ </fo:inline>
4787
+ </xsl:when>
4788
+ <xsl:otherwise>
4789
+ <fo:inline><xsl:apply-templates/></fo:inline>
4790
+ </xsl:otherwise>
4791
+ </xsl:choose>
4757
4792
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
4758
4793
  <!-- zero-space char -->
4759
4794
  <xsl:variable name="depth">
@@ -4936,6 +4971,153 @@
4936
4971
  </fo:block>
4937
4972
  </xsl:otherwise>
4938
4973
  </xsl:choose>
4974
+ </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
4975
+ <xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
4976
+ <bookmark><xsl:value-of select="@id"/></bookmark>
4977
+ </xsl:for-each>
4978
+ </xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
4979
+ <xsl:copy>
4980
+ <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
4981
+ </xsl:copy>
4982
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
4983
+ <xsl:variable name="id">
4984
+ <xsl:call-template name="generateIndexXrefId"/>
4985
+ </xsl:variable>
4986
+ <xsl:copy> <!-- add id to xref -->
4987
+ <xsl:apply-templates select="@*" mode="index_add_id"/>
4988
+ <xsl:attribute name="id">
4989
+ <xsl:value-of select="$id"/>
4990
+ </xsl:attribute>
4991
+ <xsl:apply-templates mode="index_add_id"/>
4992
+ </xsl:copy>
4993
+ <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
4994
+ <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
4995
+ <xsl:if test="@to">
4996
+ <xsl:value-of select="$dash"/>
4997
+ <xsl:copy>
4998
+ <xsl:copy-of select="@*"/>
4999
+ <xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
5000
+ <xsl:attribute name="id">
5001
+ <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
5002
+ </xsl:attribute>
5003
+ <xsl:apply-templates mode="index_add_id"/>
5004
+ </xsl:copy>
5005
+ </xsl:if>
5006
+ </xsl:template><xsl:template match="@*|node()" mode="index_update">
5007
+ <xsl:copy>
5008
+ <xsl:apply-templates select="@*|node()" mode="index_update"/>
5009
+ </xsl:copy>
5010
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
5011
+ <xsl:copy>
5012
+ <xsl:apply-templates select="@*" mode="index_update"/>
5013
+ <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
5014
+ </xsl:copy>
5015
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
5016
+ <xsl:param name="element"/>
5017
+ <xsl:param name="remove" select="'false'"/>
5018
+ <xsl:param name="target"/>
5019
+ <!-- <node></node> -->
5020
+ <xsl:choose>
5021
+ <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
5022
+ <!-- skip text (i.e. remove it) and process next element -->
5023
+ <!-- [removed_<xsl:value-of select="."/>] -->
5024
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5025
+ <xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
5026
+ </xsl:apply-templates>
5027
+ </xsl:when>
5028
+ <xsl:when test="self::text()">
5029
+ <xsl:value-of select="."/>
5030
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5031
+ </xsl:when>
5032
+ <xsl:when test="self::* and local-name(.) = 'xref'">
5033
+ <xsl:variable name="id" select="@id"/>
5034
+ <xsl:variable name="page" select="$index//item[@id = $id]"/>
5035
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
5036
+ <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
5037
+
5038
+ <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
5039
+ <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
5040
+
5041
+ <xsl:choose>
5042
+ <!-- 2nd pass -->
5043
+ <!-- if page is equal to page for next and page is not the end of range -->
5044
+ <xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
5045
+ <!-- skip element (i.e. remove it) and remove next text ',' -->
5046
+ <!-- [removed_xref] -->
5047
+
5048
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5049
+ <xsl:with-param name="remove">true</xsl:with-param>
5050
+ <xsl:with-param name="target">
5051
+ <xsl:choose>
5052
+ <xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
5053
+ <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
5054
+ </xsl:choose>
5055
+ </xsl:with-param>
5056
+ </xsl:apply-templates>
5057
+ </xsl:when>
5058
+
5059
+ <xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
5060
+ <!-- remove xref -->
5061
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5062
+ <xsl:with-param name="remove">true</xsl:with-param>
5063
+ </xsl:apply-templates>
5064
+ </xsl:when>
5065
+
5066
+ <xsl:otherwise>
5067
+ <xsl:apply-templates select="." mode="xref_copy">
5068
+ <xsl:with-param name="target" select="$target"/>
5069
+ </xsl:apply-templates>
5070
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5071
+ </xsl:otherwise>
5072
+ </xsl:choose>
5073
+ </xsl:when>
5074
+ <xsl:when test="self::* and local-name(.) = 'ul'">
5075
+ <!-- ul -->
5076
+ <xsl:apply-templates select="." mode="index_update"/>
5077
+ </xsl:when>
5078
+ <xsl:otherwise>
5079
+ <xsl:apply-templates select="." mode="xref_copy">
5080
+ <xsl:with-param name="target" select="$target"/>
5081
+ </xsl:apply-templates>
5082
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5083
+ </xsl:otherwise>
5084
+ </xsl:choose>
5085
+ </xsl:template><xsl:template match="@*|node()" mode="xref_copy">
5086
+ <xsl:param name="target"/>
5087
+ <xsl:copy>
5088
+ <xsl:apply-templates select="@*" mode="xref_copy"/>
5089
+ <xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
5090
+ <xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
5091
+ </xsl:if>
5092
+ <xsl:apply-templates select="node()" mode="xref_copy"/>
5093
+ </xsl:copy>
5094
+ </xsl:template><xsl:template name="generateIndexXrefId">
5095
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
5096
+
5097
+ <xsl:variable name="docid">
5098
+ <xsl:call-template name="getDocumentId"/>
5099
+ </xsl:variable>
5100
+ <xsl:variable name="item_number">
5101
+ <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
5102
+ </xsl:variable>
5103
+ <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
5104
+ <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
5105
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
5106
+ <xsl:apply-templates/>
5107
+ <fo:block>
5108
+ <xsl:if test="following-sibling::*[local-name() = 'clause']">
5109
+ <fo:block> </fo:block>
5110
+ </xsl:if>
5111
+ </fo:block>
5112
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
5113
+ <xsl:apply-templates/>
5114
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
5115
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
5116
+ <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
5117
+ <xsl:apply-templates/>
5118
+ </fo:block>
5119
+ </xsl:template><xsl:template match="*[local-name() = 'bookmark']">
5120
+ <fo:inline id="{@id}"/>
4939
5121
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4940
5122
  <!-- <row>
4941
5123
  <date>05-07-2013</date>
@@ -5294,70 +5476,68 @@
5294
5476
  <xsl:variable name="lang">
5295
5477
  <xsl:call-template name="getLang"/>
5296
5478
  </xsl:variable>
5297
- <fo:declarations>
5298
- <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
5299
- <pdf:dictionary type="normal" key="ViewerPreferences">
5300
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
5301
- </pdf:dictionary>
5302
- </pdf:catalog>
5303
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
5304
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
5305
- <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
5306
- <!-- Dublin Core properties go here -->
5307
- <dc:title>
5308
- <xsl:variable name="title">
5309
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5310
-
5311
-
5312
-
5313
-
5314
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5315
-
5316
-
5317
-
5318
- </xsl:for-each>
5319
- </xsl:variable>
5320
- <xsl:choose>
5321
- <xsl:when test="normalize-space($title) != ''">
5322
- <xsl:value-of select="$title"/>
5323
- </xsl:when>
5324
- <xsl:otherwise>
5325
- <xsl:text> </xsl:text>
5326
- </xsl:otherwise>
5327
- </xsl:choose>
5328
- </dc:title>
5329
- <dc:creator>
5479
+ <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
5480
+ <pdf:dictionary type="normal" key="ViewerPreferences">
5481
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
5482
+ </pdf:dictionary>
5483
+ </pdf:catalog>
5484
+ <x:xmpmeta xmlns:x="adobe:ns:meta/">
5485
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
5486
+ <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
5487
+ <!-- Dublin Core properties go here -->
5488
+ <dc:title>
5489
+ <xsl:variable name="title">
5330
5490
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5331
5491
 
5332
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5333
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5334
- <xsl:if test="position() != last()">; </xsl:if>
5335
- </xsl:for-each>
5336
-
5337
5492
 
5338
5493
 
5339
- </xsl:for-each>
5340
- </dc:creator>
5341
- <dc:description>
5342
- <xsl:variable name="abstract">
5343
-
5344
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5494
+
5495
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5345
5496
 
5346
5497
 
5347
- </xsl:variable>
5348
- <xsl:value-of select="normalize-space($abstract)"/>
5349
- </dc:description>
5350
- <pdf:Keywords>
5351
- <xsl:call-template name="insertKeywords"/>
5352
- </pdf:Keywords>
5353
- </rdf:Description>
5354
- <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
5355
- <!-- XMP properties go here -->
5356
- <xmp:CreatorTool/>
5357
- </rdf:Description>
5358
- </rdf:RDF>
5359
- </x:xmpmeta>
5360
- </fo:declarations>
5498
+
5499
+ </xsl:for-each>
5500
+ </xsl:variable>
5501
+ <xsl:choose>
5502
+ <xsl:when test="normalize-space($title) != ''">
5503
+ <xsl:value-of select="$title"/>
5504
+ </xsl:when>
5505
+ <xsl:otherwise>
5506
+ <xsl:text> </xsl:text>
5507
+ </xsl:otherwise>
5508
+ </xsl:choose>
5509
+ </dc:title>
5510
+ <dc:creator>
5511
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5512
+
5513
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5514
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5515
+ <xsl:if test="position() != last()">; </xsl:if>
5516
+ </xsl:for-each>
5517
+
5518
+
5519
+
5520
+ </xsl:for-each>
5521
+ </dc:creator>
5522
+ <dc:description>
5523
+ <xsl:variable name="abstract">
5524
+
5525
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5526
+
5527
+
5528
+ </xsl:variable>
5529
+ <xsl:value-of select="normalize-space($abstract)"/>
5530
+ </dc:description>
5531
+ <pdf:Keywords>
5532
+ <xsl:call-template name="insertKeywords"/>
5533
+ </pdf:Keywords>
5534
+ </rdf:Description>
5535
+ <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
5536
+ <!-- XMP properties go here -->
5537
+ <xmp:CreatorTool/>
5538
+ </rdf:Description>
5539
+ </rdf:RDF>
5540
+ </x:xmpmeta>
5361
5541
  </xsl:template><xsl:template name="getId">
5362
5542
  <xsl:choose>
5363
5543
  <xsl:when test="../@id">
@@ -3,6 +3,7 @@
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
5
  <xsl:param name="svg_images"/>
6
+ <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
6
7
  <xsl:variable name="images" select="document($svg_images)"/>
7
8
 
8
9
  <xsl:variable name="pageWidth" select="'215.9mm'"/>
@@ -101,7 +102,9 @@
101
102
 
102
103
  </fo:layout-master-set>
103
104
 
104
- <xsl:call-template name="addPDFUAmeta"/>
105
+ <fo:declarations>
106
+ <xsl:call-template name="addPDFUAmeta"/>
107
+ </fo:declarations>
105
108
 
106
109
  <xsl:call-template name="addBookmarks">
107
110
  <xsl:with-param name="contents" select="$contents"/>
@@ -1760,6 +1763,7 @@
1760
1763
 
1761
1764
 
1762
1765
 
1766
+
1763
1767
 
1764
1768
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1765
1769
 
@@ -2397,7 +2401,15 @@
2397
2401
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
2398
2402
  <xsl:value-of select="@target"/>
2399
2403
  </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
2400
- <xsl:variable name="math_text" select="normalize-space(.)"/>
2404
+ <xsl:variable name="mathml">
2405
+ <xsl:for-each select="*">
2406
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
2407
+ <xsl:copy-of select="."/>
2408
+ </xsl:if>
2409
+ </xsl:for-each>
2410
+ </xsl:variable>
2411
+
2412
+ <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2401
2413
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2402
2414
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2403
2415
  <xsl:param name="cols-count"/>
@@ -3382,6 +3394,10 @@
3382
3394
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
3383
3395
  <xsl:apply-templates/>
3384
3396
  </fo:inline>
3397
+ </xsl:template><xsl:template match="*[local-name()='hi']">
3398
+ <fo:inline background-color="yellow">
3399
+ <xsl:apply-templates/>
3400
+ </fo:inline>
3385
3401
  </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
3386
3402
  <xsl:variable name="text" select="normalize-space(.)"/>
3387
3403
  <fo:inline font-size="75%">
@@ -3722,6 +3738,7 @@
3722
3738
  <xsl:apply-templates select="." mode="mathml"/>
3723
3739
  </xsl:variable>
3724
3740
  <fo:instream-foreign-object fox:alt-text="Math">
3741
+
3725
3742
  <!-- <xsl:copy-of select="."/> -->
3726
3743
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3727
3744
  </fo:instream-foreign-object>
@@ -3740,7 +3757,7 @@
3740
3757
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
3741
3758
  </xsl:copy>
3742
3759
  <mathml:mspace width="0.5ex"/>
3743
- </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3760
+ </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3744
3761
  <xsl:variable name="target">
3745
3762
  <xsl:choose>
3746
3763
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
@@ -3774,8 +3791,6 @@
3774
3791
  </xsl:otherwise>
3775
3792
  </xsl:choose>
3776
3793
  </fo:inline>
3777
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
3778
- <fo:inline id="{@id}"/>
3779
3794
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3780
3795
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3781
3796
  <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
@@ -3990,6 +4005,7 @@
3990
4005
  <fo:block id="{@id}">
3991
4006
  <xsl:apply-templates/>
3992
4007
  </fo:block>
4008
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3993
4009
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3994
4010
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3995
4011
  <xsl:apply-templates/>
@@ -4624,9 +4640,10 @@
4624
4640
  </xsl:choose>
4625
4641
 
4626
4642
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
4627
-
4643
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
4628
4644
  <xsl:variable name="element">
4629
4645
 
4646
+
4630
4647
  inline
4631
4648
  </xsl:variable>
4632
4649
  <xsl:choose>
@@ -4730,30 +4747,48 @@
4730
4747
  <xsl:text>— </xsl:text>
4731
4748
  <xsl:apply-templates/>
4732
4749
  </xsl:template><xsl:template match="*[local-name() = 'eref']">
4733
- <fo:inline xsl:use-attribute-sets="eref-style">
4734
- <xsl:if test="@type = 'footnote'">
4735
-
4736
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4737
- <xsl:attribute name="font-size">80%</xsl:attribute>
4738
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4739
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4740
-
4741
-
4742
- </xsl:if>
4743
-
4744
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4745
-
4746
- <xsl:if test="@type = 'inline'">
4747
-
4748
-
4749
-
4750
-
4751
- </xsl:if>
4752
-
4753
-
4754
- <xsl:apply-templates/>
4755
- </fo:basic-link>
4756
- </fo:inline>
4750
+
4751
+ <xsl:variable name="bibitemid">
4752
+ <xsl:choose>
4753
+ <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
4754
+ <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
4755
+ <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
4756
+ </xsl:choose>
4757
+ </xsl:variable>
4758
+
4759
+ <xsl:choose>
4760
+ <xsl:when test="normalize-space($bibitemid) != ''">
4761
+ <fo:inline xsl:use-attribute-sets="eref-style">
4762
+ <xsl:if test="@type = 'footnote'">
4763
+
4764
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4765
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4766
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4767
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4768
+
4769
+
4770
+ </xsl:if>
4771
+
4772
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4773
+ <xsl:if test="normalize-space(@citeas) = ''">
4774
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4775
+ </xsl:if>
4776
+ <xsl:if test="@type = 'inline'">
4777
+
4778
+
4779
+
4780
+
4781
+ </xsl:if>
4782
+
4783
+ <xsl:apply-templates/>
4784
+ </fo:basic-link>
4785
+
4786
+ </fo:inline>
4787
+ </xsl:when>
4788
+ <xsl:otherwise>
4789
+ <fo:inline><xsl:apply-templates/></fo:inline>
4790
+ </xsl:otherwise>
4791
+ </xsl:choose>
4757
4792
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
4758
4793
  <!-- zero-space char -->
4759
4794
  <xsl:variable name="depth">
@@ -4936,6 +4971,153 @@
4936
4971
  </fo:block>
4937
4972
  </xsl:otherwise>
4938
4973
  </xsl:choose>
4974
+ </xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
4975
+ <xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
4976
+ <bookmark><xsl:value-of select="@id"/></bookmark>
4977
+ </xsl:for-each>
4978
+ </xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
4979
+ <xsl:copy>
4980
+ <xsl:apply-templates select="@*|node()" mode="index_add_id"/>
4981
+ </xsl:copy>
4982
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
4983
+ <xsl:variable name="id">
4984
+ <xsl:call-template name="generateIndexXrefId"/>
4985
+ </xsl:variable>
4986
+ <xsl:copy> <!-- add id to xref -->
4987
+ <xsl:apply-templates select="@*" mode="index_add_id"/>
4988
+ <xsl:attribute name="id">
4989
+ <xsl:value-of select="$id"/>
4990
+ </xsl:attribute>
4991
+ <xsl:apply-templates mode="index_add_id"/>
4992
+ </xsl:copy>
4993
+ <!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
4994
+ <xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
4995
+ <xsl:if test="@to">
4996
+ <xsl:value-of select="$dash"/>
4997
+ <xsl:copy>
4998
+ <xsl:copy-of select="@*"/>
4999
+ <xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
5000
+ <xsl:attribute name="id">
5001
+ <xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
5002
+ </xsl:attribute>
5003
+ <xsl:apply-templates mode="index_add_id"/>
5004
+ </xsl:copy>
5005
+ </xsl:if>
5006
+ </xsl:template><xsl:template match="@*|node()" mode="index_update">
5007
+ <xsl:copy>
5008
+ <xsl:apply-templates select="@*|node()" mode="index_update"/>
5009
+ </xsl:copy>
5010
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
5011
+ <xsl:copy>
5012
+ <xsl:apply-templates select="@*" mode="index_update"/>
5013
+ <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
5014
+ </xsl:copy>
5015
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
5016
+ <xsl:param name="element"/>
5017
+ <xsl:param name="remove" select="'false'"/>
5018
+ <xsl:param name="target"/>
5019
+ <!-- <node></node> -->
5020
+ <xsl:choose>
5021
+ <xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
5022
+ <!-- skip text (i.e. remove it) and process next element -->
5023
+ <!-- [removed_<xsl:value-of select="."/>] -->
5024
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5025
+ <xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
5026
+ </xsl:apply-templates>
5027
+ </xsl:when>
5028
+ <xsl:when test="self::text()">
5029
+ <xsl:value-of select="."/>
5030
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5031
+ </xsl:when>
5032
+ <xsl:when test="self::* and local-name(.) = 'xref'">
5033
+ <xsl:variable name="id" select="@id"/>
5034
+ <xsl:variable name="page" select="$index//item[@id = $id]"/>
5035
+ <xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
5036
+ <xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
5037
+
5038
+ <xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
5039
+ <xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
5040
+
5041
+ <xsl:choose>
5042
+ <!-- 2nd pass -->
5043
+ <!-- if page is equal to page for next and page is not the end of range -->
5044
+ <xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
5045
+ <!-- skip element (i.e. remove it) and remove next text ',' -->
5046
+ <!-- [removed_xref] -->
5047
+
5048
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5049
+ <xsl:with-param name="remove">true</xsl:with-param>
5050
+ <xsl:with-param name="target">
5051
+ <xsl:choose>
5052
+ <xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
5053
+ <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
5054
+ </xsl:choose>
5055
+ </xsl:with-param>
5056
+ </xsl:apply-templates>
5057
+ </xsl:when>
5058
+
5059
+ <xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
5060
+ <!-- remove xref -->
5061
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
5062
+ <xsl:with-param name="remove">true</xsl:with-param>
5063
+ </xsl:apply-templates>
5064
+ </xsl:when>
5065
+
5066
+ <xsl:otherwise>
5067
+ <xsl:apply-templates select="." mode="xref_copy">
5068
+ <xsl:with-param name="target" select="$target"/>
5069
+ </xsl:apply-templates>
5070
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5071
+ </xsl:otherwise>
5072
+ </xsl:choose>
5073
+ </xsl:when>
5074
+ <xsl:when test="self::* and local-name(.) = 'ul'">
5075
+ <!-- ul -->
5076
+ <xsl:apply-templates select="." mode="index_update"/>
5077
+ </xsl:when>
5078
+ <xsl:otherwise>
5079
+ <xsl:apply-templates select="." mode="xref_copy">
5080
+ <xsl:with-param name="target" select="$target"/>
5081
+ </xsl:apply-templates>
5082
+ <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
5083
+ </xsl:otherwise>
5084
+ </xsl:choose>
5085
+ </xsl:template><xsl:template match="@*|node()" mode="xref_copy">
5086
+ <xsl:param name="target"/>
5087
+ <xsl:copy>
5088
+ <xsl:apply-templates select="@*" mode="xref_copy"/>
5089
+ <xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
5090
+ <xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
5091
+ </xsl:if>
5092
+ <xsl:apply-templates select="node()" mode="xref_copy"/>
5093
+ </xsl:copy>
5094
+ </xsl:template><xsl:template name="generateIndexXrefId">
5095
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
5096
+
5097
+ <xsl:variable name="docid">
5098
+ <xsl:call-template name="getDocumentId"/>
5099
+ </xsl:variable>
5100
+ <xsl:variable name="item_number">
5101
+ <xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
5102
+ </xsl:variable>
5103
+ <xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
5104
+ <xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
5105
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
5106
+ <xsl:apply-templates/>
5107
+ <fo:block>
5108
+ <xsl:if test="following-sibling::*[local-name() = 'clause']">
5109
+ <fo:block> </fo:block>
5110
+ </xsl:if>
5111
+ </fo:block>
5112
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
5113
+ <xsl:apply-templates/>
5114
+ </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
5115
+ <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
5116
+ <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
5117
+ <xsl:apply-templates/>
5118
+ </fo:block>
5119
+ </xsl:template><xsl:template match="*[local-name() = 'bookmark']">
5120
+ <fo:inline id="{@id}"/>
4939
5121
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
4940
5122
  <!-- <row>
4941
5123
  <date>05-07-2013</date>
@@ -5294,70 +5476,68 @@
5294
5476
  <xsl:variable name="lang">
5295
5477
  <xsl:call-template name="getLang"/>
5296
5478
  </xsl:variable>
5297
- <fo:declarations>
5298
- <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
5299
- <pdf:dictionary type="normal" key="ViewerPreferences">
5300
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
5301
- </pdf:dictionary>
5302
- </pdf:catalog>
5303
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
5304
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
5305
- <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
5306
- <!-- Dublin Core properties go here -->
5307
- <dc:title>
5308
- <xsl:variable name="title">
5309
- <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5310
-
5311
-
5312
-
5313
-
5314
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5315
-
5316
-
5317
-
5318
- </xsl:for-each>
5319
- </xsl:variable>
5320
- <xsl:choose>
5321
- <xsl:when test="normalize-space($title) != ''">
5322
- <xsl:value-of select="$title"/>
5323
- </xsl:when>
5324
- <xsl:otherwise>
5325
- <xsl:text> </xsl:text>
5326
- </xsl:otherwise>
5327
- </xsl:choose>
5328
- </dc:title>
5329
- <dc:creator>
5479
+ <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
5480
+ <pdf:dictionary type="normal" key="ViewerPreferences">
5481
+ <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
5482
+ </pdf:dictionary>
5483
+ </pdf:catalog>
5484
+ <x:xmpmeta xmlns:x="adobe:ns:meta/">
5485
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
5486
+ <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
5487
+ <!-- Dublin Core properties go here -->
5488
+ <dc:title>
5489
+ <xsl:variable name="title">
5330
5490
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5331
5491
 
5332
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5333
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5334
- <xsl:if test="position() != last()">; </xsl:if>
5335
- </xsl:for-each>
5336
-
5337
5492
 
5338
5493
 
5339
- </xsl:for-each>
5340
- </dc:creator>
5341
- <dc:description>
5342
- <xsl:variable name="abstract">
5343
-
5344
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5494
+
5495
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
5345
5496
 
5346
5497
 
5347
- </xsl:variable>
5348
- <xsl:value-of select="normalize-space($abstract)"/>
5349
- </dc:description>
5350
- <pdf:Keywords>
5351
- <xsl:call-template name="insertKeywords"/>
5352
- </pdf:Keywords>
5353
- </rdf:Description>
5354
- <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
5355
- <!-- XMP properties go here -->
5356
- <xmp:CreatorTool/>
5357
- </rdf:Description>
5358
- </rdf:RDF>
5359
- </x:xmpmeta>
5360
- </fo:declarations>
5498
+
5499
+ </xsl:for-each>
5500
+ </xsl:variable>
5501
+ <xsl:choose>
5502
+ <xsl:when test="normalize-space($title) != ''">
5503
+ <xsl:value-of select="$title"/>
5504
+ </xsl:when>
5505
+ <xsl:otherwise>
5506
+ <xsl:text> </xsl:text>
5507
+ </xsl:otherwise>
5508
+ </xsl:choose>
5509
+ </dc:title>
5510
+ <dc:creator>
5511
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5512
+
5513
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5514
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5515
+ <xsl:if test="position() != last()">; </xsl:if>
5516
+ </xsl:for-each>
5517
+
5518
+
5519
+
5520
+ </xsl:for-each>
5521
+ </dc:creator>
5522
+ <dc:description>
5523
+ <xsl:variable name="abstract">
5524
+
5525
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5526
+
5527
+
5528
+ </xsl:variable>
5529
+ <xsl:value-of select="normalize-space($abstract)"/>
5530
+ </dc:description>
5531
+ <pdf:Keywords>
5532
+ <xsl:call-template name="insertKeywords"/>
5533
+ </pdf:Keywords>
5534
+ </rdf:Description>
5535
+ <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
5536
+ <!-- XMP properties go here -->
5537
+ <xmp:CreatorTool/>
5538
+ </rdf:Description>
5539
+ </rdf:RDF>
5540
+ </x:xmpmeta>
5361
5541
  </xsl:template><xsl:template name="getId">
5362
5542
  <xsl:choose>
5363
5543
  <xsl:when test="../@id">