Skip to content

Commit

Permalink
also save submap metadata inside <mapref> elements
Browse files Browse the repository at this point in the history
Signed-off-by: chrispy <[email protected]>
  • Loading branch information
chrispy-snps authored and jelovirt committed Jan 25, 2024
1 parent 2ba7130 commit 9afa146
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/plugins/org.dita.base/xsl/preprocess/maprefImpl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ See the accompanying LICENSE file for applicable license.
</xsl:choose>
</xsl:variable>
<xsl:variable name="targetTitleAndTopicmeta" as="element()*"
select="$file/*/*[contains(@class,' topic/title ') or contains(@class,' map/topicmeta ')]"/>
select="$file/*/*[contains(@class,' topic/title ') or contains(@class,' map/topicmeta ')]"/> <!-- submap title and topicmeta -->
<xsl:variable name="maprefTopicmeta" as="element()?"
select="*[contains(@class,' map/topicmeta ')]"/> <!-- mapref topicmeta -->
<xsl:variable name="contents" as="node()*">
<xsl:choose>
<xsl:when test="not(contains($href,'://') or empty($element-id) or $file/*[contains(@class,' map/map ')][@id = $element-id])">
Expand Down Expand Up @@ -275,6 +277,7 @@ See the accompanying LICENSE file for applicable license.
</xsl:choose>
</xsl:with-param>
</xsl:apply-templates>
<xsl:apply-templates select="$maprefTopicmeta" mode="preserve-mapref-topicmeta"/>
<xsl:apply-templates select="*[contains(@class, ' ditavalref-d/ditavalref ')]"/>
<xsl:apply-templates select="$contents">
<xsl:with-param name="refclass" select="$refclass"/>
Expand Down Expand Up @@ -537,6 +540,11 @@ See the accompanying LICENSE file for applicable license.
<xsl:apply-templates select="*|processing-instruction()|text()"/>
</submap-topicmeta-container>
</xsl:template>
<xsl:template match="*[contains(@class,' map/topicmeta ')]" mode="preserve-mapref-topicmeta">
<mapref-topicmeta-container class="+ topic/foreign ditaot-d/mapref-topicmeta-container ">
<xsl:apply-templates select="*|processing-instruction()|text()"/>
</mapref-topicmeta-container>
</xsl:template>

<xsl:template match="*" mode="reltable-copy" priority="10">
<xsl:param name="keyscope" as="xs:string?"/>
Expand Down

0 comments on commit 9afa146

Please sign in to comment.