Skip to content

Commit

Permalink
Merge pull request #726 from metanorma/fix/attachments
Browse files Browse the repository at this point in the history
common.xsl updated for PDF attachments, metanorma/metanorma-standoc#900
  • Loading branch information
Intelligent2013 authored Jul 29, 2024
2 parents 978534b + 857cee7 commit e445b04
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xslt_src/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -12347,14 +12347,17 @@
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
</xsl:when>
<!-- link to the PDF attachment -->
<xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
</xsl:when>
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
<xsl:value-of select="concat('url(embedded-file:', $target_attachment_name, ')')"/>
</xsl:when>
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
</xsl:when>
</xsl:when> -->
<xsl:otherwise>
<xsl:value-of select="normalize-space(@target)"/>
</xsl:otherwise>
Expand Down

0 comments on commit e445b04

Please sign in to comment.