Skip to content

Commit

Permalink
common.xsl updated for PDF attachments, metanorma/metanorma-standoc#900
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Jul 29, 2024
1 parent 978534b commit 857cee7
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 857cee7

Please sign in to comment.