lib/isodoc/ogc/ogc.reference-model.xsl in metanorma-ogc-1.4.0 vs lib/isodoc/ogc/ogc.reference-model.xsl in metanorma-ogc-1.4.1

- old
+ new

@@ -172,11 +172,11 @@ </fo:table> </fo:block> <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> <fo:block-container width="155mm"> - <fo:block font-size="33pt"> + <fo:block font-size="33pt" role="H1"> <xsl:call-template name="addLetterSpacing"> <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/> <xsl:with-param name="letter-spacing" select="1.1"/> </xsl:call-template> </fo:block> @@ -330,11 +330,11 @@ </xsl:variable> <fo:block-container margin-left="-18mm"> <fo:block-container margin-left="0mm"> <fo:block margin-bottom="40pt"> - <fo:block font-size="33pt" margin-bottom="4pt"> + <fo:block font-size="33pt" margin-bottom="4pt" role="H1"> <xsl:call-template name="addLetterSpacing"> <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/> <xsl:with-param name="letter-spacing" select="1.1"/> </xsl:call-template> </fo:block> @@ -346,74 +346,74 @@ </fo:block-container> <fo:block-container line-height="130%"> - - <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"> - - <fo:block> - <xsl:if test="@level = 1"> - <xsl:attribute name="margin-top">14pt</xsl:attribute> - </xsl:if> - <xsl:if test="@level = 1 or @parent = 'annex'"> - <xsl:attribute name="font-size">12pt</xsl:attribute> - </xsl:if> - <xsl:if test="@level = 2 and not(@parent = 'annex')"> - <xsl:attribute name="font-size">10pt</xsl:attribute> - </xsl:if> + <fo:block role="TOC"> + <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"> - <xsl:choose> - <xsl:when test="@level = 1"> - <fo:list-block provisional-distance-between-starts="7mm"> - <xsl:if test="@type = 'annex'"> - <xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute> - </xsl:if> - <fo:list-item> - <fo:list-item-label end-indent="label-end()"> - <fo:block> - <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/> - </fo:block> - </fo:list-item-label> - <fo:list-item-body start-indent="body-start()"> - <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm"> - <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}"> - <xsl:variable name="sectionTitle"> - <xsl:apply-templates select="title"/> - </xsl:variable> - <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/> - <xsl:text> </xsl:text> - <fo:inline keep-together.within-line="always"> - <fo:leader leader-pattern="dots"/> - <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline> - </fo:inline> - </fo:basic-link> - </fo:block> - </fo:list-item-body> - </fo:list-item> - </fo:list-block> - </xsl:when> - <xsl:otherwise> - <fo:block text-align-last="justify" margin-left="7mm"> - <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}"> - <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/> - <xsl:text> </xsl:text> - <xsl:apply-templates select="title"/> - <xsl:text> </xsl:text> - <fo:inline keep-together.within-line="always"> - <fo:leader leader-pattern="dots"/> - <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline> - </fo:inline> - </fo:basic-link> - </fo:block> - </xsl:otherwise> - </xsl:choose> - - - </fo:block> - </xsl:for-each> - + <fo:block role="TOCI"> + <xsl:if test="@level = 1"> + <xsl:attribute name="margin-top">14pt</xsl:attribute> + </xsl:if> + <xsl:if test="@level = 1 or @parent = 'annex'"> + <xsl:attribute name="font-size">12pt</xsl:attribute> + </xsl:if> + <xsl:if test="@level = 2 and not(@parent = 'annex')"> + <xsl:attribute name="font-size">10pt</xsl:attribute> + </xsl:if> + + <xsl:choose> + <xsl:when test="@level = 1"> + <fo:list-block provisional-distance-between-starts="7mm"> + <xsl:if test="@type = 'annex'"> + <xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute> + </xsl:if> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/> + </fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm"> + <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}"> + <xsl:variable name="sectionTitle"> + <xsl:apply-templates select="title"/> + </xsl:variable> + <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/> + <xsl:text> </xsl:text> + <fo:inline keep-together.within-line="always"> + <fo:leader leader-pattern="dots"/> + <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline> + </fo:inline> + </fo:basic-link> + </fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + </xsl:when> + <xsl:otherwise> + <fo:block text-align-last="justify" margin-left="7mm"> + <fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}"> + <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@section))"/> + <xsl:text> </xsl:text> + <xsl:apply-templates select="title"/> + <xsl:text> </xsl:text> + <fo:inline keep-together.within-line="always"> + <fo:leader leader-pattern="dots"/> + <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline> + </fo:inline> + </fo:basic-link> + </fo:block> + </xsl:otherwise> + </xsl:choose> + + + </fo:block> + </xsl:for-each> + </fo:block> </fo:block-container> <xsl:if test="//ogc:table[@id and ogc:name]"> <xsl:variable name="title-list-tables"> <xsl:call-template name="getTitle"> @@ -428,11 +428,11 @@ </xsl:call-template> </fo:block-container> </fo:block-container> <fo:block-container line-height="130%"> <xsl:for-each select="//ogc:table[@id and ogc:name]"> - <fo:block text-align-last="justify" margin-top="2pt"> + <fo:block text-align-last="justify" margin-top="2pt" role="TOCI"> <fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}"> <xsl:apply-templates select="ogc:name" mode="contents"/> <fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots"/> <fo:page-number-citation ref-id="{@id}"/> @@ -457,11 +457,11 @@ </fo:block-container> </fo:block-container> <fo:block-container line-height="130%"> <xsl:for-each select="//ogc:figure[@id and ogc:name]"> - <fo:block text-align-last="justify" margin-top="2pt"> + <fo:block text-align-last="justify" margin-top="2pt" role="TOCI"> <fo:basic-link internal-destination="{@id}" fox:alt-text="{ogc:name}"> <xsl:apply-templates select="ogc:name" mode="contents"/> <fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots"/> <fo:page-number-citation ref-id="{@id}"/> @@ -490,11 +490,11 @@ <fo:block-container line-height="130%"> <!-- <xsl:for-each select="//ogc:permission[@id and ogc:name] | //ogc:recommendation[@id and ogc:name] | //ogc:requirement[@id and ogc:name]"> --> <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]"> <xsl:variable name="table_id" select="@id"/> - <fo:block text-align-last="justify" margin-top="6pt"> + <fo:block text-align-last="justify" margin-top="6pt" role="TOCI"> <fo:basic-link internal-destination="{@id}" fox:alt-text="{.//ogc:p[@class = 'RecommendationTitle'][1]/text()}"> <xsl:apply-templates select=".//ogc:p[@class = 'RecommendationTitle'][ancestor::ogc:table[1][@id= $table_id]]/node()"/> <xsl:text> </xsl:text> <fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots"/> @@ -737,18 +737,24 @@ <fo:block font-size="8pt" line-height="125%"> <xsl:apply-templates/> </fo:block> </xsl:template> - <xsl:template match="ogc:license-statement//ogc:title"> - <fo:block font-weight="bold" color="{$color_blue}"> + <xsl:template match="ogc:license-statement//ogc:title"> + <xsl:variable name="level"> + <xsl:call-template name="getLevel"/> + </xsl:variable> + <fo:block font-weight="bold" color="{$color_blue}" role="H{$level}"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="ogc:copyright-statement//ogc:title"> - <fo:block font-weight="bold" color="{$color_blue}" margin-top="24pt"> + <xsl:variable name="level"> + <xsl:call-template name="getLevel"/> + </xsl:variable> + <fo:block font-weight="bold" color="{$color_blue}" margin-top="24pt" role="H{$level}"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="ogc:license-statement//ogc:p | ogc:feedback-statement//ogc:p | ogc:copyright-statement//ogc:p"> @@ -762,11 +768,14 @@ <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="ogc:legal-statement//ogc:title"> - <fo:inline font-weight="bold"> + <xsl:variable name="level"> + <xsl:call-template name="getLevel"/> + </xsl:variable> + <fo:inline font-weight="bold" role="H{$level}"> <xsl:apply-templates/><xsl:text>: </xsl:text> </fo:inline> </xsl:template> <xsl:template match="ogc:legal-statement//ogc:title/text() | ogc:license-statement//ogc:title/text() | ogc:copyright-statement//ogc:title/text()"> @@ -837,11 +846,11 @@ <xsl:choose> <xsl:when test="$level = 1"> <fo:block-container margin-left="-22mm"> <fo:block-container margin-left="0mm"> - <fo:block margin-bottom="10pt" space-before="36pt" keep-with-next="always"> + <fo:block margin-bottom="10pt" space-before="36pt" keep-with-next="always" role="H{$level}"> <fo:table table-layout="fixed" width="100%"> <fo:table-column column-width="22mm"/> <fo:table-column column-width="158mm"/> <fo:table-body> <fo:table-row> @@ -881,11 +890,11 @@ </fo:block> </fo:block-container> </fo:block-container> </xsl:when> <xsl:when test="$level = 2"> - <fo:block space-before="24pt" margin-bottom="10pt"> + <fo:block space-before="24pt" margin-bottom="10pt" role="H{$level}"> <xsl:attribute name="keep-with-next">always</xsl:attribute> <xsl:variable name="title"> <xsl:choose> <xsl:when test="*[local-name() = 'tab']"> <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/> @@ -903,16 +912,18 @@ </fo:block> </xsl:when> <xsl:otherwise> <xsl:element name="{$element-name}"> <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute> - <xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute> - <xsl:attribute name="keep-with-next">always</xsl:attribute> - <xsl:attribute name="margin-top">30pt</xsl:attribute> - <xsl:attribute name="margin-bottom">12pt</xsl:attribute> - <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute> + <xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute> + <xsl:attribute name="keep-with-next">always</xsl:attribute> + <xsl:attribute name="margin-top">30pt</xsl:attribute> + <xsl:attribute name="margin-bottom">12pt</xsl:attribute> + <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute> + <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute> <xsl:apply-templates/> + <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/> </xsl:element> </xsl:otherwise> </xsl:choose> @@ -1116,11 +1127,14 @@ </fo:list-item-body> </fo:list-item> </xsl:template> <xsl:template match="ogc:term/ogc:name" priority="2"> - <fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always"> + <xsl:variable name="levelTerm"> + <xsl:call-template name="getLevelTermName"/> + </xsl:variable> + <fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}"> <fo:block color="{$color_blue}" keep-with-next="always"> <fo:inline font-size="18pt" padding-right="1mm"><xsl:apply-templates/></fo:inline> <xsl:apply-templates select="../ogc:preferred | ../ogc:deprecated | ../ogc:admitted" mode="term_name"/> </fo:block> <xsl:call-template name="insertOrangeHorizontalLine"/> @@ -1261,11 +1275,11 @@ <fo:block break-after="page"/> </xsl:template> <xsl:template name="insertHeaderFooter"> <xsl:param name="color" select="$color_blue"/> - <fo:static-content flow-name="footer"> + <fo:static-content flow-name="footer" role="artifact"> <fo:block-container font-size="8pt" height="100%" color="{$color}" padding-top="6mm"> <fo:table table-layout="fixed" width="100%"> <fo:table-column column-width="90%"/> <fo:table-column column-width="10%"/> <fo:table-body> @@ -1421,10 +1435,19 @@ <xsl:with-param name="letter-spacing" select="0.6"/> </xsl:call-template> </fo:inline> </xsl:if> <xsl:apply-templates select="xalan:nodeset($title)" mode="titlesmall"/> + + <xsl:variable name="variant-title"> + <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="titlesmall"/> + </xsl:variable> + <xsl:if test="normalize-space($variant-title) != ''"> + <fo:inline padding-right="5mm"> </fo:inline> + <fo:inline><xsl:copy-of select="$variant-title"/></fo:inline> + </xsl:if> + </fo:block> <xsl:call-template name="insertOrangeHorizontalLine"/> </fo:block> </xsl:template> @@ -1638,10 +1661,11 @@ </xsl:attribute-set><xsl:attribute-set name="sourcecode-style"> <xsl:attribute name="white-space">pre</xsl:attribute> <xsl:attribute name="wrap-option">wrap</xsl:attribute> + <xsl:attribute name="role">Code</xsl:attribute> @@ -1689,12 +1713,17 @@ </xsl:attribute-set><xsl:attribute-set name="requirement-label-style"> <xsl:attribute name="margin-bottom">12pt</xsl:attribute> - </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style"> - </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style"> + </xsl:attribute-set><xsl:attribute-set name="subject-style"> + </xsl:attribute-set><xsl:attribute-set name="inherit-style"> + </xsl:attribute-set><xsl:attribute-set name="description-style"> + </xsl:attribute-set><xsl:attribute-set name="specification-style"> + </xsl:attribute-set><xsl:attribute-set name="measurement-target-style"> + </xsl:attribute-set><xsl:attribute-set name="verification-style"> + </xsl:attribute-set><xsl:attribute-set name="import-style"> </xsl:attribute-set><xsl:attribute-set name="recommendation-style"> <xsl:attribute name="margin-top">6pt</xsl:attribute> @@ -1919,11 +1948,12 @@ <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="padding-right">1mm</xsl:attribute> - </xsl:attribute-set><xsl:attribute-set name="quote-style"> + </xsl:attribute-set><xsl:attribute-set name="quote-style"> + <xsl:attribute name="role">BlockQuote</xsl:attribute> <xsl:attribute name="margin-top">12pt</xsl:attribute> <xsl:attribute name="margin-left">13mm</xsl:attribute> <xsl:attribute name="margin-right">12mm</xsl:attribute> @@ -2127,12 +2157,14 @@ <!-- Display table's name before table as standalone block --> <!-- $namespace = 'iso' or --> <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/> - + + + <xsl:call-template name="fn_name_display"/> <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/> @@ -4026,20 +4058,72 @@ <xsl:call-template name="setTrackChangesStyles"> <xsl:with-param name="isAdded" select="$isAdded"/> <xsl:with-param name="isDeleted" select="$isDeleted"/> </xsl:call-template> + + <xsl:variable name="mathml"> <xsl:apply-templates select="." mode="mathml"/> </xsl:variable> <fo:instream-foreign-object fox:alt-text="Math"> + <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/> + <xsl:variable name="comment_text_"> + <xsl:choose> + <xsl:when test="normalize-space($comment_text_following) != ''"> + <xsl:value-of select="$comment_text_following"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/> + + <xsl:if test="normalize-space($comment_text) != ''"> + <!-- put Mathin Alternate Text --> + <xsl:attribute name="fox:alt-text"> + <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/> + </xsl:attribute> + </xsl:if> + + <xsl:variable name="mathml_content"> + <xsl:apply-templates select="." mode="mathml_actual_text"/> + </xsl:variable> + <!-- put MathML in Actual Text --> + <xsl:attribute name="fox:actual-text"> + <xsl:value-of select="$mathml_content"/> + </xsl:attribute> + + <!-- <xsl:copy-of select="."/> --> <xsl:copy-of select="xalan:nodeset($mathml)"/> </fo:instream-foreign-object> </fo:inline> + </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text"> + <!-- <xsl:text>a+b</xsl:text> --> + <xsl:text>&lt;</xsl:text> + <xsl:value-of select="local-name()"/> + <xsl:if test="local-name() = 'math'"> + <xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text> + </xsl:if> + <xsl:for-each select="@*"> + <xsl:text> </xsl:text> + <xsl:value-of select="local-name()"/> + <xsl:text>="</xsl:text> + <xsl:value-of select="."/> + <xsl:text>"</xsl:text> + </xsl:for-each> + <xsl:text>&gt;</xsl:text> + <xsl:apply-templates mode="mathml_actual_text"/> + <xsl:text>&lt;/</xsl:text> + <xsl:value-of select="local-name()"/> + <xsl:text>&gt;</xsl:text> + </xsl:template><xsl:template match="text()" mode="mathml_actual_text"> + <xsl:value-of select="normalize-space()"/> </xsl:template><xsl:template match="@*|node()" mode="mathml"> <xsl:copy> <xsl:apply-templates select="@*|node()" mode="mathml"/> </xsl:copy> </xsl:template><xsl:template match="mathml:mtext" mode="mathml"> @@ -4097,11 +4181,14 @@ <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style"> <xsl:apply-templates select="*[local-name()='title']" mode="process"/> </fo:block> <xsl:apply-templates/> </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process"> - <fo:inline><xsl:apply-templates/></fo:inline> + <xsl:variable name="level"> + <xsl:call-template name="getLevel"/> + </xsl:variable> + <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline> </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2"> <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style"> <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/> </fo:block> <xsl:apply-templates/> @@ -4132,13 +4219,14 @@ <xsl:with-param name="name" select="'title-modified'"/> </xsl:call-template> </xsl:variable> + <xsl:variable name="text"><xsl:apply-templates/></xsl:variable> <xsl:choose> - <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when> - <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise> + <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when> + <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise> </xsl:choose> <xsl:apply-templates/> </xsl:template><xsl:template match="*[local-name() = 'xref']"> <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style"> @@ -4286,11 +4374,14 @@ <xsl:apply-templates/> </fo:block> </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation"> <xsl:if test="normalize-space() != ''"> - <fo:inline> + <xsl:variable name="level"> + <xsl:call-template name="getLevelTermName"/> + </xsl:variable> + <fo:inline role="H{$level}"> <xsl:apply-templates/> <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'"> <xsl:text>.</xsl:text> </xsl:if> --> </fo:inline> @@ -4960,10 +5051,11 @@ <xsl:when test="*[local-name() = 'tab']"> <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> + <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/> </xsl:otherwise> </xsl:choose> </fo:block> </fo:list-item-body> </fo:list-item> @@ -5108,18 +5200,10 @@ </fo:block> </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation"> <fo:block> <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/> </fo:block> - </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation"> - <fo:block xsl:use-attribute-sets="requirement-subject-style"> - <xsl:text>Target Type </xsl:text><xsl:apply-templates/> - </fo:block> - </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']"> - <fo:block xsl:use-attribute-sets="requirement-inherit-style"> - <xsl:text>Dependency </xsl:text><xsl:apply-templates/> - </fo:block> </xsl:template><xsl:template match="*[local-name() = 'recommendation']"> <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style"> <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/> <xsl:apply-templates/> </fo:block> @@ -5132,10 +5216,42 @@ </xsl:if> </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']"> <fo:block xsl:use-attribute-sets="recommendation-label-style"> <xsl:apply-templates/> </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation"> + <fo:block xsl:use-attribute-sets="subject-style"> + <xsl:text>Target Type </xsl:text><xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'subject']"> + <fo:block xsl:use-attribute-sets="subject-style"> + <xsl:text>Target Type </xsl:text><xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']"> + <fo:block xsl:use-attribute-sets="inherit-style"> + <xsl:text>Dependency </xsl:text><xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']"> + <fo:block xsl:use-attribute-sets="description-style"> + <xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']"> + <fo:block xsl:use-attribute-sets="specification-style"> + <xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']"> + <fo:block xsl:use-attribute-sets="measurement-target-style"> + <xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']"> + <fo:block xsl:use-attribute-sets="verification-style"> + <xsl:apply-templates/> + </fo:block> + </xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']"> + <fo:block xsl:use-attribute-sets="import-style"> + <xsl:apply-templates/> + </fo:block> </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']"> <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt"> <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']"> <xsl:attribute name="margin-bottom">0pt</xsl:attribute> </xsl:if> @@ -6149,10 +6265,13 @@ </fo:inline> </xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']"> <fo:block-container border="1pt solid black" width="50%"> <fo:block> </fo:block> </fo:block-container> + </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"> + <fo:inline padding-right="5mm"> </fo:inline> + <fo:inline><xsl:apply-templates/></fo:inline> </xsl:template><xsl:template name="convertDate"> <xsl:param name="date"/> <xsl:param name="format" select="'short'"/> <xsl:variable name="year" select="substring($date, 1, 4)"/> <xsl:variable name="month" select="substring($date, 6, 2)"/> @@ -6385,9 +6504,29 @@ <xsl:value-of select="$level_total - 1"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="$level"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template><xsl:template name="getLevelTermName"> + <xsl:choose> + <xsl:when test="normalize-space(../@depth) != ''"> + <xsl:value-of select="../@depth"/> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="title_level_"> + <xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]"> + <xsl:call-template name="getLevel"/> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="title_level" select="normalize-space($title_level_)"/> + <xsl:choose> + <xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when> + <xsl:otherwise> + <xsl:call-template name="getLevel"/> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template><xsl:template name="split"> <xsl:param name="pText" select="."/> <xsl:param name="sep" select="','"/> \ No newline at end of file