metanorma-ieee 1.2.14 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ieee/html/htmlstyle.css +4 -1
- data/lib/isodoc/ieee/i18n-en.yaml +2 -1
- data/lib/isodoc/ieee/ieee.amendment.xsl +236 -37
- data/lib/isodoc/ieee/ieee.standard.xsl +236 -37
- data/lib/isodoc/ieee/init.rb +1 -1
- data/lib/isodoc/ieee/presentation_xml_convert.rb +1 -1
- data/lib/metanorma/ieee/basicdoc.rng +909 -464
- data/lib/metanorma/ieee/biblio-standoc.rng +87 -20
- data/lib/metanorma/ieee/biblio.rng +884 -325
- data/lib/metanorma/ieee/isodoc.rng +1031 -912
- data/lib/metanorma/ieee/reqt.rng +94 -72
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +4 -4
@@ -7077,6 +7077,7 @@
|
|
7077
7077
|
|
7078
7078
|
<fo:block role="SKIP">
|
7079
7079
|
<xsl:apply-templates/>
|
7080
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
7080
7081
|
</fo:block>
|
7081
7082
|
</fo:table-cell>
|
7082
7083
|
</xsl:template> <!-- cell in table header row - 'th' -->
|
@@ -7140,6 +7141,8 @@
|
|
7140
7141
|
|
7141
7142
|
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
7142
7143
|
|
7144
|
+
<xsl:if test="$isGenerateTableIF = 'false' and count(node()) = 0"> </xsl:if>
|
7145
|
+
|
7143
7146
|
</fo:block>
|
7144
7147
|
</fo:table-cell>
|
7145
7148
|
</xsl:template> <!-- td -->
|
@@ -9913,20 +9916,28 @@
|
|
9913
9916
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
9914
9917
|
<attachment filename="{@name}"/>
|
9915
9918
|
</xsl:for-each>
|
9919
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
9920
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
9921
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
9922
|
+
<attachment filename="{$attachment_path}"/>
|
9923
|
+
</xsl:for-each>
|
9924
|
+
</xsl:if>
|
9916
9925
|
</xsl:variable>
|
9917
9926
|
<xsl:variable xmlns:redirect="http://xml.apache.org/xalan/redirect" name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
9918
9927
|
|
9919
9928
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[local-name()='link']" name="link">
|
9920
9929
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
9921
9930
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
9931
|
+
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
9922
9932
|
<xsl:variable name="target">
|
9923
9933
|
<xsl:choose>
|
9924
9934
|
<xsl:when test="@updatetype = 'true'">
|
9925
9935
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
9926
9936
|
</xsl:when>
|
9927
9937
|
<!-- link to the PDF attachment -->
|
9928
|
-
<xsl:when test="$
|
9929
|
-
<xsl:
|
9938
|
+
<xsl:when test="$isLinkToEmbeddedFile = 'true'">
|
9939
|
+
<xsl:variable name="target_file" select="java:org.metanorma.fop.Util.getFilenameFromPath(@target)"/>
|
9940
|
+
<xsl:value-of select="concat('url(embedded-file:', $target_file, ')')"/>
|
9930
9941
|
</xsl:when>
|
9931
9942
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
9932
9943
|
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
|
@@ -9957,6 +9968,11 @@
|
|
9957
9968
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9958
9969
|
</xsl:if>
|
9959
9970
|
|
9971
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
9972
|
+
<xsl:attribute name="color">inherit</xsl:attribute>
|
9973
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
9974
|
+
</xsl:if>
|
9975
|
+
|
9960
9976
|
<xsl:call-template name="refine_link-style"/>
|
9961
9977
|
|
9962
9978
|
<xsl:choose>
|
@@ -9967,6 +9983,9 @@
|
|
9967
9983
|
<xsl:call-template name="insert_basic_link">
|
9968
9984
|
<xsl:with-param name="element">
|
9969
9985
|
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
9986
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
9987
|
+
<xsl:attribute name="role">Annot</xsl:attribute>
|
9988
|
+
</xsl:if>
|
9970
9989
|
<xsl:choose>
|
9971
9990
|
<xsl:when test="normalize-space(.) = ''">
|
9972
9991
|
<xsl:call-template name="add-zero-spaces-link-java">
|
@@ -9979,6 +9998,10 @@
|
|
9979
9998
|
</xsl:otherwise>
|
9980
9999
|
</xsl:choose>
|
9981
10000
|
</fo:basic-link>
|
10001
|
+
<xsl:if test="$isLinkToEmbeddedFile = 'true'">
|
10002
|
+
<!-- reserve space at right for PaperClip icon -->
|
10003
|
+
<fo:inline keep-with-previous.within-line="always"> </fo:inline>
|
10004
|
+
</xsl:if>
|
9982
10005
|
</xsl:with-param>
|
9983
10006
|
</xsl:call-template>
|
9984
10007
|
</xsl:otherwise>
|
@@ -10576,7 +10599,16 @@
|
|
10576
10599
|
</xsl:variable>
|
10577
10600
|
<xsl:variable name="img_src">
|
10578
10601
|
<xsl:choose>
|
10579
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
10602
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10603
|
+
<xsl:choose>
|
10604
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10605
|
+
<xsl:value-of select="@src"/>
|
10606
|
+
</xsl:when>
|
10607
|
+
<xsl:otherwise>
|
10608
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
10609
|
+
</xsl:otherwise>
|
10610
|
+
</xsl:choose>
|
10611
|
+
</xsl:when>
|
10580
10612
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
10581
10613
|
</xsl:choose>
|
10582
10614
|
</xsl:variable>
|
@@ -10589,7 +10621,7 @@
|
|
10589
10621
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
10590
10622
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
10591
10623
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
10592
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
10624
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
10593
10625
|
<xsl:value-of select="$scale"/>
|
10594
10626
|
</xsl:template>
|
10595
10627
|
|
@@ -10608,7 +10640,14 @@
|
|
10608
10640
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
10609
10641
|
</xsl:when>
|
10610
10642
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10611
|
-
<xsl:
|
10643
|
+
<xsl:choose>
|
10644
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10645
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
10646
|
+
</xsl:when>
|
10647
|
+
<xsl:otherwise>
|
10648
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
10649
|
+
</xsl:otherwise>
|
10650
|
+
</xsl:choose>
|
10612
10651
|
</xsl:when>
|
10613
10652
|
<xsl:otherwise>
|
10614
10653
|
<xsl:value-of select="@src"/>
|
@@ -10630,7 +10669,14 @@
|
|
10630
10669
|
</xsl:when>
|
10631
10670
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
10632
10671
|
<xsl:variable name="src">
|
10633
|
-
<xsl:
|
10672
|
+
<xsl:choose>
|
10673
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
10674
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
10675
|
+
</xsl:when>
|
10676
|
+
<xsl:otherwise>
|
10677
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
10678
|
+
</xsl:otherwise>
|
10679
|
+
</xsl:choose>
|
10634
10680
|
</xsl:variable>
|
10635
10681
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
10636
10682
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -15515,6 +15561,39 @@
|
|
15515
15561
|
</pdf:catalog>
|
15516
15562
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
15517
15563
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
15564
|
+
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" rdf:about="">
|
15565
|
+
<pdfaExtension:schemas>
|
15566
|
+
<rdf:Bag>
|
15567
|
+
<rdf:li rdf:parseType="Resource">
|
15568
|
+
<pdfaSchema:namespaceURI>http://www.aiim.org/pdfua/ns/id/</pdfaSchema:namespaceURI>
|
15569
|
+
<pdfaSchema:prefix>pdfuaid</pdfaSchema:prefix>
|
15570
|
+
<pdfaSchema:schema>PDF/UA identification schema</pdfaSchema:schema>
|
15571
|
+
<pdfaSchema:property>
|
15572
|
+
<rdf:Seq>
|
15573
|
+
<rdf:li rdf:parseType="Resource">
|
15574
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
15575
|
+
<pdfaProperty:description>PDF/UA version identifier</pdfaProperty:description>
|
15576
|
+
<pdfaProperty:name>part</pdfaProperty:name>
|
15577
|
+
<pdfaProperty:valueType>Integer</pdfaProperty:valueType>
|
15578
|
+
</rdf:li>
|
15579
|
+
<rdf:li rdf:parseType="Resource">
|
15580
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
15581
|
+
<pdfaProperty:description>PDF/UA amendment identifier</pdfaProperty:description>
|
15582
|
+
<pdfaProperty:name>amd</pdfaProperty:name>
|
15583
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
15584
|
+
</rdf:li>
|
15585
|
+
<rdf:li rdf:parseType="Resource">
|
15586
|
+
<pdfaProperty:category>internal</pdfaProperty:category>
|
15587
|
+
<pdfaProperty:description>PDF/UA corrigenda identifier</pdfaProperty:description>
|
15588
|
+
<pdfaProperty:name>corr</pdfaProperty:name>
|
15589
|
+
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
|
15590
|
+
</rdf:li>
|
15591
|
+
</rdf:Seq>
|
15592
|
+
</pdfaSchema:property>
|
15593
|
+
</rdf:li>
|
15594
|
+
</rdf:Bag>
|
15595
|
+
</pdfaExtension:schemas>
|
15596
|
+
</rdf:Description>
|
15518
15597
|
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
|
15519
15598
|
<!-- Dublin Core properties go here -->
|
15520
15599
|
<dc:title>
|
@@ -15526,30 +15605,54 @@
|
|
15526
15605
|
|
15527
15606
|
</xsl:for-each>
|
15528
15607
|
</xsl:variable>
|
15529
|
-
<
|
15530
|
-
<
|
15531
|
-
<xsl:
|
15532
|
-
|
15533
|
-
|
15534
|
-
|
15535
|
-
|
15536
|
-
|
15608
|
+
<rdf:Alt>
|
15609
|
+
<rdf:li xml:lang="x-default">
|
15610
|
+
<xsl:choose>
|
15611
|
+
<xsl:when test="normalize-space($title) != ''">
|
15612
|
+
<xsl:value-of select="$title"/>
|
15613
|
+
</xsl:when>
|
15614
|
+
<xsl:otherwise>
|
15615
|
+
<xsl:text> </xsl:text>
|
15616
|
+
</xsl:otherwise>
|
15617
|
+
</xsl:choose>
|
15618
|
+
</rdf:li>
|
15619
|
+
</rdf:Alt>
|
15537
15620
|
</dc:title>
|
15538
|
-
<
|
15621
|
+
<xsl:variable name="dc_creator">
|
15539
15622
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
15540
15623
|
|
15541
|
-
<
|
15624
|
+
<rdf:Seq>
|
15625
|
+
<rdf:li>
|
15626
|
+
<xsl:value-of select="ieee:ext/ieee:editorialgroup/ieee:committee"/>
|
15627
|
+
</rdf:li>
|
15628
|
+
</rdf:Seq>
|
15542
15629
|
|
15543
15630
|
</xsl:for-each>
|
15544
|
-
</
|
15545
|
-
<
|
15631
|
+
</xsl:variable>
|
15632
|
+
<xsl:if test="normalize-space($dc_creator) != ''">
|
15633
|
+
<dc:creator>
|
15634
|
+
<xsl:copy-of select="$dc_creator"/>
|
15635
|
+
</dc:creator>
|
15636
|
+
</xsl:if>
|
15637
|
+
|
15638
|
+
<xsl:variable name="dc_description">
|
15546
15639
|
<xsl:variable name="abstract">
|
15547
15640
|
|
15548
15641
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
15549
15642
|
|
15550
15643
|
</xsl:variable>
|
15551
|
-
<
|
15552
|
-
|
15644
|
+
<rdf:Alt>
|
15645
|
+
<rdf:li xml:lang="x-default">
|
15646
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
15647
|
+
</rdf:li>
|
15648
|
+
</rdf:Alt>
|
15649
|
+
</xsl:variable>
|
15650
|
+
<xsl:if test="normalize-space($dc_description)">
|
15651
|
+
<dc:description>
|
15652
|
+
<xsl:copy-of select="$dc_description"/>
|
15653
|
+
</dc:description>
|
15654
|
+
</xsl:if>
|
15655
|
+
|
15553
15656
|
<pdf:Keywords>
|
15554
15657
|
<xsl:call-template name="insertKeywords">
|
15555
15658
|
<xsl:with-param name="meta">true</xsl:with-param>
|
@@ -15564,26 +15667,51 @@
|
|
15564
15667
|
</x:xmpmeta>
|
15565
15668
|
<!-- add attachments -->
|
15566
15669
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
15567
|
-
<xsl:
|
15568
|
-
|
15569
|
-
|
15570
|
-
|
15571
|
-
|
15572
|
-
|
15573
|
-
|
15574
|
-
|
15575
|
-
|
15576
|
-
<
|
15577
|
-
|
15578
|
-
|
15670
|
+
<xsl:variable name="bibitem_attachment_" select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]"/>
|
15671
|
+
<xsl:variable name="bibitem_attachment" select="xalan:nodeset($bibitem_attachment_)"/>
|
15672
|
+
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
|
15673
|
+
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
|
15674
|
+
<!-- Todo: need update -->
|
15675
|
+
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
15676
|
+
|
15677
|
+
<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
|
15678
|
+
<xsl:attribute name="src">
|
15679
|
+
<xsl:choose>
|
15680
|
+
<xsl:when test="normalize-space() != ''">
|
15681
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
15682
|
+
<xsl:value-of select="$src_attachment"/>
|
15683
|
+
</xsl:when>
|
15684
|
+
<xsl:otherwise>
|
15685
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
15686
|
+
<xsl:value-of select="$url"/>
|
15687
|
+
</xsl:otherwise>
|
15688
|
+
</xsl:choose>
|
15689
|
+
</xsl:attribute>
|
15690
|
+
<xsl:if test="$description != ''">
|
15691
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15692
|
+
</xsl:if>
|
15693
|
+
<xsl:if test="$afrelationship != ''">
|
15694
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
15695
|
+
</xsl:if>
|
15696
|
+
</pdf:embedded-file>
|
15579
15697
|
</xsl:for-each>
|
15580
15698
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
15581
15699
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
15582
15700
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
15583
15701
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
15584
|
-
<xsl:variable name="
|
15585
|
-
<xsl:variable name="
|
15586
|
-
<
|
15702
|
+
<xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
|
15703
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
15704
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
15705
|
+
<!-- Todo: need update -->
|
15706
|
+
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
|
15707
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
|
15708
|
+
<xsl:if test="$description != ''">
|
15709
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
15710
|
+
</xsl:if>
|
15711
|
+
<xsl:if test="$afrelationship != ''">
|
15712
|
+
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
|
15713
|
+
</xsl:if>
|
15714
|
+
</pdf:embedded-file>
|
15587
15715
|
</xsl:for-each>
|
15588
15716
|
</xsl:if>
|
15589
15717
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -15602,6 +15730,12 @@
|
|
15602
15730
|
<!-- Get or calculate depth of the element -->
|
15603
15731
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="getLevel">
|
15604
15732
|
<xsl:param name="depth"/>
|
15733
|
+
<!-- <xsl:message>
|
15734
|
+
<xsl:choose>
|
15735
|
+
<xsl:when test="local-name() = 'title'">title=<xsl:value-of select="."/></xsl:when>
|
15736
|
+
<xsl:when test="local-name() = 'clause'">clause/title=<xsl:value-of select="*[local-name() = 'title']"/></xsl:when>
|
15737
|
+
</xsl:choose>
|
15738
|
+
</xsl:message> -->
|
15605
15739
|
<xsl:choose>
|
15606
15740
|
<xsl:when test="normalize-space(@depth) != ''">
|
15607
15741
|
<xsl:value-of select="@depth"/>
|
@@ -15622,8 +15756,27 @@
|
|
15622
15756
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
15623
15757
|
<xsl:value-of select="$level_total - 2"/>
|
15624
15758
|
</xsl:when>
|
15759
|
+
<xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
|
15760
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
15761
|
+
<xsl:choose>
|
15762
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
15763
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
15764
|
+
</xsl:when>
|
15765
|
+
<xsl:otherwise>
|
15766
|
+
<xsl:value-of select="$level_total - 2"/>
|
15767
|
+
</xsl:otherwise>
|
15768
|
+
</xsl:choose>
|
15769
|
+
</xsl:when>
|
15625
15770
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
15626
|
-
<xsl:
|
15771
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
|
15772
|
+
<xsl:choose>
|
15773
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
15774
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
15775
|
+
</xsl:when>
|
15776
|
+
<xsl:otherwise>
|
15777
|
+
<xsl:value-of select="$level_total - 1"/>
|
15778
|
+
</xsl:otherwise>
|
15779
|
+
</xsl:choose>
|
15627
15780
|
</xsl:when>
|
15628
15781
|
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
15629
15782
|
<xsl:value-of select="$level_total - 1"/>
|
@@ -15631,6 +15784,17 @@
|
|
15631
15784
|
<xsl:when test="parent::*[local-name() = 'annex']">
|
15632
15785
|
<xsl:value-of select="$level_total - 1"/>
|
15633
15786
|
</xsl:when>
|
15787
|
+
<xsl:when test="ancestor::*[local-name() = 'annex'] and self::*[local-name() = 'title']">
|
15788
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
|
15789
|
+
<xsl:choose>
|
15790
|
+
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
15791
|
+
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
15792
|
+
</xsl:when>
|
15793
|
+
<xsl:otherwise>
|
15794
|
+
<xsl:value-of select="$level_total - 1"/>
|
15795
|
+
</xsl:otherwise>
|
15796
|
+
</xsl:choose>
|
15797
|
+
</xsl:when>
|
15634
15798
|
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
15635
15799
|
<xsl:value-of select="$level_total"/>
|
15636
15800
|
</xsl:when>
|
@@ -15961,7 +16125,14 @@
|
|
15961
16125
|
<xsl:value-of select="$src"/>
|
15962
16126
|
</xsl:when>
|
15963
16127
|
<xsl:otherwise>
|
15964
|
-
<xsl:
|
16128
|
+
<xsl:choose>
|
16129
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
16130
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
16131
|
+
</xsl:when>
|
16132
|
+
<xsl:otherwise>
|
16133
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
16134
|
+
</xsl:otherwise>
|
16135
|
+
</xsl:choose>
|
15965
16136
|
</xsl:otherwise>
|
15966
16137
|
</xsl:choose>
|
15967
16138
|
</xsl:template>
|
@@ -15982,6 +16153,20 @@
|
|
15982
16153
|
|
15983
16154
|
<!-- END: insert cover page image -->
|
15984
16155
|
|
16156
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="insertVerticalChar">
|
16157
|
+
<xsl:param name="str"/>
|
16158
|
+
<xsl:if test="string-length($str) > 0">
|
16159
|
+
<fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
16160
|
+
<fo:block-container width="1em">
|
16161
|
+
<fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
|
16162
|
+
</fo:block-container>
|
16163
|
+
</fo:inline-container>
|
16164
|
+
<xsl:call-template name="insertVerticalChar">
|
16165
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
16166
|
+
</xsl:call-template>
|
16167
|
+
</xsl:if>
|
16168
|
+
</xsl:template>
|
16169
|
+
|
15985
16170
|
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" name="number-to-words">
|
15986
16171
|
<xsl:param name="number"/>
|
15987
16172
|
<xsl:param name="first"/>
|
@@ -16269,4 +16454,18 @@
|
|
16269
16454
|
</xsl:if>
|
16270
16455
|
</xsl:template>
|
16271
16456
|
|
16457
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="@*|node()" mode="set_table_role_skip">
|
16458
|
+
<xsl:copy>
|
16459
|
+
<xsl:apply-templates select="@*|node()" mode="set_table_role_skip"/>
|
16460
|
+
</xsl:copy>
|
16461
|
+
</xsl:template>
|
16462
|
+
|
16463
|
+
<xsl:template xmlns:redirect="http://xml.apache.org/xalan/redirect" match="*[starts-with(local-name(), 'table')]" mode="set_table_role_skip">
|
16464
|
+
<xsl:copy>
|
16465
|
+
<xsl:apply-templates select="@*" mode="set_table_role_skip"/>
|
16466
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
16467
|
+
<xsl:apply-templates select="node()" mode="set_table_role_skip"/>
|
16468
|
+
</xsl:copy>
|
16469
|
+
</xsl:template>
|
16470
|
+
|
16272
16471
|
</xsl:stylesheet>
|
data/lib/isodoc/ieee/init.rb
CHANGED
@@ -35,7 +35,7 @@ module IsoDoc
|
|
35
35
|
|
36
36
|
def subclause?(target, type, from)
|
37
37
|
(from&.match?(/\./) && type == "clause") ||
|
38
|
-
target&.gsub(/<[
|
38
|
+
target&.gsub(/<[^<>]+>/, "")&.match?(/^IEV$|^IEC 60050-/)
|
39
39
|
end
|
40
40
|
|
41
41
|
def eref_localities1(opt)
|