Skip to content

Commit

Permalink
Merge pull request #235 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 29, 2024
2 parents c354880 + 20086ed commit 624ff97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/isodoc/m3aawg/m3aawg.policy.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6732,14 +6732,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
7 changes: 5 additions & 2 deletions lib/isodoc/m3aawg/m3aawg.report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6732,14 +6732,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 624ff97

Please sign in to comment.