Skip to content

Commit

Permalink
Merge pull request #424 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 7, 2024
2 parents 68d8d92 + 5d7b03d commit 1235ba3
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 20 deletions.
16 changes: 12 additions & 4 deletions lib/isodoc/bipm/bipm.brochure.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15698,7 +15698,8 @@
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>

<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
<xsl:attribute name="src">
Expand All @@ -15719,6 +15720,9 @@
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
Expand All @@ -15729,14 +15733,18 @@
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
<xsl:if test="$description != ''">
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
</xsl:if>
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
</xsl:if>
Expand Down
16 changes: 12 additions & 4 deletions lib/isodoc/bipm/bipm.guide.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15698,7 +15698,8 @@
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>

<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
<xsl:attribute name="src">
Expand All @@ -15719,6 +15720,9 @@
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
Expand All @@ -15729,14 +15733,18 @@
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
<xsl:if test="$description != ''">
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
</xsl:if>
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
</xsl:if>
Expand Down
16 changes: 12 additions & 4 deletions lib/isodoc/bipm/bipm.mise-en-pratique.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15698,7 +15698,8 @@
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>

<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
<xsl:attribute name="src">
Expand All @@ -15719,6 +15720,9 @@
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
Expand All @@ -15729,14 +15733,18 @@
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
<xsl:if test="$description != ''">
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
</xsl:if>
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
</xsl:if>
Expand Down
16 changes: 12 additions & 4 deletions lib/isodoc/bipm/bipm.rapport.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -15698,7 +15698,8 @@
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>

<pdf:embedded-file filename="{$filename}" link-as-file-annotation="true">
<xsl:attribute name="src">
Expand All @@ -15719,6 +15720,9 @@
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
Expand All @@ -15729,14 +15733,18 @@
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
<pdf:embedded-file src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
<xsl:if test="$description != ''">
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
</xsl:if>
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
</xsl:if>
Expand Down
16 changes: 12 additions & 4 deletions lib/isodoc/bipm/jcgm.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -13587,7 +13587,8 @@
<xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
<xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>

<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
<xsl:attribute name="src">
Expand All @@ -13608,6 +13609,9 @@
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
Expand All @@ -13618,14 +13622,18 @@
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
<!-- Todo: need update -->
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
<xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
<xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
<xsl:if test="$description != ''">
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
</xsl:if>
<xsl:if test="$afrelationship != ''">
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
</xsl:if>
<xsl:if test="$volatile != ''">
<xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
</xsl:if>
</pdf:embedded-file>
</xsl:for-each>
</xsl:if>
Expand Down

0 comments on commit 1235ba3

Please sign in to comment.