Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
IAM CMS
toolcompendium
Commits
77422c53
Verified
Commit
77422c53
authored
Apr 01, 2022
by
Philipp Zschumme
Browse files
Implements possiblity to override the name for param-refs
parent
7c964cb2
Pipeline
#3703
passed with stages
in 12 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/html/toolcompendiumHTML.xsl
View file @
77422c53
...
...
@@ -124,12 +124,22 @@
<xsl:template
name=
"programInternal"
>
<xsl:param
name=
"description"
/>
<xsl:param
name=
"father"
/>
<xsl:param
name=
"override-name"
/>
<div
class=
"tc-searchable tc-program"
>
<button
class=
"tc-accordion"
>
<a
id=
"{@name}"
class=
"tc-program-name"
href=
"#{@name}"
name=
"{@name}"
>
<xsl:value-of
select=
"@name"
/>
</a>
<xsl:choose>
<xsl:when
test=
"$override-name"
>
<a
id=
"{$override-name}"
class=
"tc-program-name"
href=
"#{$override-name}"
name=
"{$override-name}"
>
<xsl:value-of
select=
"$override-name"
/>
</a>
</xsl:when>
<xsl:otherwise>
<a
id=
"{@name}"
class=
"tc-program-name"
href=
"#{@name}"
name=
"{@name}"
>
<xsl:value-of
select=
"@name"
/>
</a>
</xsl:otherwise>
</xsl:choose>
</button>
<div
class=
"tc-panel"
style=
"overflow-x:auto;"
>
<center>
...
...
@@ -176,12 +186,14 @@
<xsl:apply-templates
select=
"/programs/struct-ref[@name=$struct_ref_name]"
>
<xsl:with-param
name=
"father_name"
select=
"$struct_ref_father_name"
/>
<xsl:with-param
name=
"description"
select=
"$struct_description"
/>
<xsl:with-param
name=
"override-name"
select=
"@as-param"
/>
<!-- to override with which name the struct-ref is shown -->
</xsl:apply-templates>
</xsl:template>
<xsl:template
match=
"struct-ref"
>
<xsl:param
name=
"father_name"
/>
<xsl:param
name=
"description"
/>
<xsl:param
name=
"override-name"
/>
<xsl:if
test=
"parent::section"
>
<!-- resolve the reference -->
...
...
@@ -193,6 +205,7 @@
<!-- call this template again to print the program -->
<xsl:with-param
name=
"father_name"
select=
"$struct_ref_father_name"
/>
<xsl:with-param
name=
"description"
select=
"$struct_description"
/>
<xsl:with-param
name=
"override-name"
select=
"$override-name"
/>
<!-- to override with which name the struct-ref is shown -->
</xsl:apply-templates>
</xsl:if>
<xsl:if
test=
"parent::programs"
>
...
...
@@ -201,6 +214,7 @@
<!-- copying the description of the <struct-ref> over to the <program> -->
<xsl:with-param
name=
"description"
select=
"$description"
/>
<xsl:with-param
name=
"father"
select=
"$father_name"
/>
<xsl:with-param
name=
"override-name"
select=
"$override-name"
/>
<!-- to override with which name the struct-ref is shown -->
</xsl:call-template>
</xsl:if>
</xsl:template>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment