Skip to content

Commit

Permalink
simplify text value templates
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitawootten-nist committed Mar 28, 2024
1 parent e910e2f commit fc7ba4a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/document/common/common-definitions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@
<xsl:variable name="definition" as="element()">
<xsl:apply-templates select="." mode="find-definition"/>
</xsl:variable>
<xsl:variable name="is-deprecated" select="exists($definition/@deprecated)"/>
<div class="model-entry definition { name() }">
<div class="{ if ($is-inline) then 'instance-header' else 'definition-header' }{ if ($is-deprecated) then ' deprecated-header' else '' }">
<div class="{ if ($is-inline) then 'instance-header' else 'definition-header' }{ $definition/@deprecated/' deprecated-header' }">
<xsl:element namespace="http://www.w3.org/1999/xhtml" name="{ $header-tag }"
expand-text="true">
<xsl:call-template name="mark-id"/>
Expand Down
2 changes: 1 addition & 1 deletion src/document/json/object-map-html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ details:not([open]) .show-closed { display: inline }
<xsl:if test="empty(@_tree-json-id)">
<xsl:message expand-text="true">not seeing json tree id for { name(.) }</xsl:message>
</xsl:if>
<a class="OM-name{ if (@deprecated) then ' OM-name-deprecated' else ''}" href="{ $reference-link }#{ @_tree-json-id }">
<a class="OM-name{ @deprecated/' OM-name-deprecated' }" href="{ $reference-link }#{ @_tree-json-id }">
<xsl:value-of select="(@key,@gi,@name)[1]"/>
</a>
</xsl:template>
Expand Down
2 changes: 1 addition & 1 deletion src/document/json/object-reference-html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<div class="model-entry definition { tokenize($me/@_metaschema-json-id,'/')[2] }">
<xsl:variable name="header-class" expand-text="true">{ if (exists(parent::map)) then
'definition' else 'instance' }-header</xsl:variable>
<div class="{ $header-class }{ if (exists($me/@deprecated)) then ' deprecated-header' else '' }">
<div class="{ $header-class }{ $me/@deprecated/' deprecated-header' }">
<!--
Generate the proper class attribute to match a given HTML header from $header-tag (h1, h2,...h6)
to define the proper corresponding style (toc1, toc2,... toc6) as bound by toc{ $level } in Hugo.
Expand Down

0 comments on commit fc7ba4a

Please sign in to comment.