Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
02661b1b
Commit
02661b1b
authored
7 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
toggle answers and highlighting
parent
e4e33815
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl
+101
-0
101 additions, 0 deletions
ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl
ws/Docbook/CustomLayer/webhelp/webhelpHdm.xsl
+16
-10
16 additions, 10 deletions
ws/Docbook/CustomLayer/webhelp/webhelpHdm.xsl
with
117 additions
and
10 deletions
ws/Docbook/CustomLayer/webhelp/hdmextensions.xsl
0 → 100644
+
101
−
0
View file @
02661b1b
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:d=
"http://docbook.org/ns/docbook"
xmlns:m=
"http://www.w3.org/1998/Math/MathML"
xmlns=
"http://www.w3.org/1999/xhtml"
exclude-result-prefixes=
"d"
version=
"1.1"
>
<xsl:template
name=
"user.webhelp.head.content"
>
<xsl:param
name=
"node"
/>
<script
type=
"text/javascript"
>
<!-- goiks extension head start -->
function toggleDisplay(inputEl) {
divElem = nextSibling(inputEl);
if (divElem.style.visibility == 'hidden') {
divElem.style.visibility = 'visible';
inputEl.setAttribute('value','-');
} else {
divElem.style.visibility = 'hidden';
inputEl.setAttribute('value','+');
}
}
function nextSibling(n) {
x=n.nextSibling;
while (x.nodeType!=1) {
x=x.nextSibling;
}
return x;
}
</script>
<xsl:if
test=
"//m:math"
>
<script
type=
"text/x-mathjax-config"
>
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script
src=
"https://prog.mi.hdm-stuttgart.de/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
>
<xsl:comment>
Self closing tags disallowed!
</xsl:comment>
</script>
</xsl:if>
</xsl:template>
<!--Allow for opening and closing of answers -->
<xsl:template
match=
"d:answer"
>
<xsl:variable
name=
"deflabel"
>
<xsl:apply-templates
select=
"."
mode=
"qanda.defaultlabel"
/>
</xsl:variable>
<tr>
<xsl:apply-templates
select=
"."
mode=
"common.html.attributes"
/>
<xsl:call-template
name=
"id.attribute"
/>
<td
align=
"{$direction.align.start}"
valign=
"top"
>
<xsl:call-template
name=
"anchor"
/>
<xsl:variable
name=
"answer.label"
>
<xsl:apply-templates
select=
"."
mode=
"label.markup"
/>
</xsl:variable>
<xsl:if
test=
"string-length($answer.label) > 0"
>
<p><strong>
<xsl:copy-of
select=
"$answer.label"
/>
</strong></p>
</xsl:if>
</td>
<td
align=
"{$direction.align.start}"
valign=
"top"
>
<input
onclick=
"toggleDisplay(this)"
type=
"button"
value=
"+"
/>
<!--goik: start "header" clickable answer modification -->
<div
style=
"visibility:hidden;"
>
<!--goik: end "header" clickable answer modification -->
<xsl:apply-templates
select=
"*[local-name(.) != 'label' and local-name(.) != 'qandaentry']"
/>
<!-- * handle nested answer/qandaentry instances -->
<!-- * (bug 1509043 from Daniel Leidert) -->
<xsl:if
test=
"descendant::d:question"
>
<xsl:call-template
name=
"process.qandaset"
/>
</xsl:if>
</div>
<!--goik: "footer" clickable answer modification -->
</td>
</tr>
</xsl:template>
<xsl:template
match=
"m:*"
>
<xsl:element
name=
"{local-name()}"
>
<xsl:copy-of
select=
"@*"
/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template
match=
"d:videodata"
>
<video
controls=
"controls"
preload=
"auto"
>
<xsl:attribute
name=
"title"
>
<xsl:value-of
select=
"normalize-space(../../../d:title)"
/>
</xsl:attribute>
<xsl:variable
name=
"hdm_ImageFilename"
>
<!-- hdm_ prefix: do not mess with docbook! -->
<xsl:call-template
name=
"mediaobject.filename"
>
<xsl:with-param
name=
"object"
select=
".."
/>
</xsl:call-template>
</xsl:variable>
<source
src=
"{$hdm_ImageFilename}"
type=
'video/webm'
/>
<source
src=
"{$hdm_ImageFilename}.mp4"
type=
'video/mp4'
/>
</video>
</xsl:template>
</xsl:stylesheet>
This diff is collapsed.
Click to expand it.
ws/Docbook/CustomLayer/webhelp/webhelpHdm.xsl
+
16
−
10
View file @
02661b1b
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:d=
"http://docbook.org/ns/docbook"
xmlns:doc=
"http://nwalsh.com/xsl/documentation/1.0"
xmlns:exsl=
"http://exslt.org/common"
xmlns:set=
"http://exslt.org/sets"
version=
"1.0"
exclude-result-prefixes=
"doc exsl set d"
>
<xsl:import
href=
"../../docbook-xsl/xhtml/chunk.xsl"
/>
<xsl:import
href=
"../../docbook-xsl/webhelp/xsl/webhelp-common.xsl"
/>
<xsl:import
href=
"../../docbook-xsl/webhelp/xsl/titlepage.templates.xsl"
/>
xmlns:d=
"http://docbook.org/ns/docbook"
xmlns:doc=
"http://nwalsh.com/xsl/documentation/1.0"
xmlns:exsl=
"http://exslt.org/common"
xmlns:set=
"http://exslt.org/sets"
version=
"1.0"
exclude-result-prefixes=
"doc exsl set d"
>
<xsl:import
href=
"../../docbook-xsl/xhtml/chunk.xsl"
/>
<xsl:import
href=
"../../docbook-xsl/xhtml/highlight.xsl"
/>
<xsl:import
href=
"../../docbook-xsl/webhelp/xsl/webhelp-common.xsl"
/>
<xsl:import
href=
"../../docbook-xsl/webhelp/xsl/titlepage.templates.xsl"
/>
<!--
-->
<xsl:include
href=
"hdmextensions.xsl"
/>
</xsl:stylesheet>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment