Skip to content

Commit

Permalink
EXM-49686 Move prolog after shortdesc
Browse files Browse the repository at this point in the history
  • Loading branch information
raducoravu committed Jan 11, 2022
1 parent eff199c commit 440fc0c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions refactoring/convertDITA1_3To2_0.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@
<xsl:apply-templates select="node()"/>
</xsl:template>

<!-- Move shortdesc before titlealts before converting it to a prolog -->
<xsl:template match="*[title][titlealts][shortdesc][not(prolog)]">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()[following-sibling::titlealts]"/>
<xsl:apply-templates select="shortdesc"/>
<xsl:apply-templates select="titlealts"/>
<xsl:apply-templates select="node()[preceding-sibling::shortdesc]"/>
</xsl:copy>
</xsl:template>


<!--Element removed in DITA 2.0, move its contents to the prolog element-->
<xsl:template match="titlealts[following-sibling::prolog]">
<xsl:message>The element 'titlealts' is removed in the DITA 2.0 standard. Moving its contents to 'prolog'.</xsl:message>
Expand All @@ -252,7 +264,7 @@
</xsl:template>
<xsl:template match="titlealts[not(following-sibling::prolog)]">
<!-- Convert to prolog -->
<xsl:message>The element 'titlealts' is removed in the DITA 2.0 standard.</xsl:message>
<xsl:message>The element 'titlealts' is removed in the DITA 2.0 standard. Converting to 'prolog'.</xsl:message>
<prolog>
<xsl:apply-templates select="@* | node()"/>
</prolog>
Expand Down Expand Up @@ -298,4 +310,4 @@
<xsl:template match="link/@query">
<xsl:message>The attribute 'query' is removed in the DITA 2.0 standard.</xsl:message>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>

0 comments on commit 440fc0c

Please sign in to comment.