Skip to content

Commit

Permalink
add HTML5 metadata placeholders for <data>, <data-about>, and <resour…
Browse files Browse the repository at this point in the history
…ceid>
  • Loading branch information
chrispy-snps committed Nov 3, 2024
1 parent 3eeb9fd commit 0b5f1a0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/plugins/org.dita.html5/xsl/get-meta.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,25 @@ See the accompanying LICENSE file for applicable license.
<!-- CONTENT: Subject - prolog/metadata/keywords -->
<xsl:apply-templates select="." mode="gen-keywords-metadata"/>

<!-- CONTENT: Resource IDs - prolog/resourceid -->
<xsl:apply-templates select="." mode="gen-resourceid-metadata"/>

<!-- CONTENT: User-defined - prolog/data -->
<xsl:apply-templates select="*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/data ')] |
*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/metadata ')]/*[contains(@class,' topic/data ')] |
*[contains(@class,' map/topicmeta ')]/*[contains(@class,' topic/data ')] |
*[contains(@class,' map/topicmeta ')]/*[contains(@class,' topic/metadata ')]/*[contains(@class,' topic/data ')] |
self::dita/*[1]/*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/data ')] |
self::dita/*[1]/*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/metadata ')]/*[contains(@class,' topic/data ')]" mode="gen-metadata"/>

<!-- CONTENT: User-defined - prolog/data-about -->
<xsl:apply-templates select="*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/data-about ')] |
*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/metadata ')]/*[contains(@class,' topic/data-about ')] |
*[contains(@class,' map/topicmeta ')]/*[contains(@class,' topic/data-about ')] |
*[contains(@class,' map/topicmeta ')]/*[contains(@class,' topic/metadata ')]/*[contains(@class,' topic/data-about ')] |
self::dita/*[1]/*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/data-about ')] |
self::dita/*[1]/*[contains(@class,' topic/prolog ')]/*[contains(@class,' topic/metadata ')]/*[contains(@class,' topic/data-about ')]" mode="gen-metadata"/>

<!-- CONTENT: Relation - related-links -->
<xsl:apply-templates select="*[contains(@class,' topic/related-links ')]/descendant::*/@href |
self::dita/*/*[contains(@class,' topic/related-links ')]/descendant::*/@href" mode="gen-metadata"/>
Expand Down Expand Up @@ -207,6 +226,7 @@ See the accompanying LICENSE file for applicable license.

<!-- INSTANTIATION: Language -->
<xsl:apply-templates select="@xml:lang | self::dita/*[1]/@xml:lang" mode="gen-metadata"/>

</xsl:template>


Expand Down Expand Up @@ -268,6 +288,10 @@ See the accompanying LICENSE file for applicable license.
</xsl:if>
</xsl:template>

<!-- CONTENT: User-defined - prolog/resourceid -->
<xsl:template match="*[contains(@class, ' topic/topic ')]" mode="gen-resourceid-metadata"/>
<xsl:template match="*[contains(@class, ' map/map ')]" mode="gen-resourceid-metadata"/>

<!-- Rights - prolog/copyright -->
<xsl:template match="*[contains(@class,' topic/copyright ')]" mode="gen-metadata">
<meta name="rights">
Expand Down

0 comments on commit 0b5f1a0

Please sign in to comment.