Skip to content

Commit

Permalink
Move "json-ld-version"
Browse files Browse the repository at this point in the history
  • Loading branch information
tomschr committed Jan 30, 2024
1 parent 8408129 commit 7f4003a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions suse2022-ns/xhtml/json-ld.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,6 @@
},
</xsl:template>

<xsl:template name="json-ld-version">
<xsl:param name="node" select="."/>
<xsl:variable name="productnumber" select="($node/d:info/d:productnumber)"/>
<xsl:variable name="meta" select="$node/d:info/d:meta[@name='productname']/d:productname/@version"/>
<xsl:variable name="version" select="($productnumber | $meta)[last()]"/>

<xsl:if test="$version != ''">
"version": "<xsl:value-of select="$version"/>",
</xsl:if>
</xsl:template>

<xsl:template name="json-ld-person.name.list">
<xsl:param name="node" select="."/>
<xsl:param name="person.list" select="$node/d:author|$node/d:corpauthor|$node/d:othercredit|$node/d:editor"/>
Expand Down Expand Up @@ -492,4 +481,17 @@
"articleSection": "<xsl:value-of select="$cat"/>",
</xsl:if>
</xsl:template>

<!-- -->
<xsl:template name="json-ld-version">
<xsl:param name="node" select="."/>
<xsl:variable name="productnumber" select="($node/d:info/d:productnumber)"/>
<xsl:variable name="meta" select="$node/d:info/d:meta[@name='productname']/d:productname/@version"/>
<xsl:variable name="version" select="($productnumber | $meta)[last()]"/>

<xsl:if test="$version != ''">
"softwareVersion": "<xsl:value-of select="$version"/>",
</xsl:if>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 7f4003a

Please sign in to comment.