Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2952abbf
Commit
2952abbf
authored
May 31, 2011
by
Davis King
Browse files
Setup the XSLT for a FAQ page
parent
e0f98d92
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
0 deletions
+97
-0
docs/docs/faq.xml
docs/docs/faq.xml
+37
-0
docs/docs/main_menu.xml
docs/docs/main_menu.xml
+4
-0
docs/docs/stylesheet.xsl
docs/docs/stylesheet.xsl
+56
-0
No files found.
docs/docs/faq.xml
0 → 100644
View file @
2952abbf
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>
Frequently Asked Questions
</title>
<!-- ************************************************************************* -->
<questions>
<question
text=
"Which machine learning method should I use?"
>
answer goes here
</question>
<question
text=
"another question?"
>
<questions>
<question
text=
"yet another question?"
>
<questions>
<question
text=
"what is 1 + 1?"
>
2!
</question>
<question
text=
"what is 1 + 6?"
>
7!
</question>
</questions>
</question>
<question
text=
"yet yet YET another question?"
>
yet another answer goes here
</question>
</questions>
</question>
</questions>
<!-- ************************************************************************* -->
</doc>
docs/docs/main_menu.xml
View file @
2952abbf
...
...
@@ -104,6 +104,10 @@
<name>
How to contribute
</name>
<link>
howto_contribute.html
</link>
</item>
<item>
<name>
FAQ
</name>
<link>
faq.html
</link>
</item>
<item>
<name>
Index
</name>
<link>
term_index.html
</link>
...
...
docs/docs/stylesheet.xsl
View file @
2952abbf
...
...
@@ -179,6 +179,15 @@
padding: 0.7em;
}
div#question {
background-color:white;
border: 2px solid rgb(102,102,102);
text-align:left;
margin-top: 1.5em;
margin-bottom: 90%;
padding: 0.7em;
}
div#function {
background-color:white;
border: 2px solid rgb(102,102,255);
...
...
@@ -270,6 +279,14 @@
<center><h1>
<xsl:value-of
select=
"title"
/>
</h1></center>
</xsl:if>
<xsl:apply-templates
select=
"body"
/>
<ul>
<xsl:for-each
select=
"questions/question"
>
<xsl:sort
select=
"translate(name,$lcletters, $ucletters)"
/>
<li><a
href=
"#{@text}"
><xsl:value-of
select=
"@text"
/></a></li>
</xsl:for-each>
</ul>
</td>
<!-- ************************************************************************* -->
<xsl:choose>
...
...
@@ -290,6 +307,12 @@
</table>
<xsl:apply-templates
select=
"components"
/>
<xsl:apply-templates
select=
"questions"
/>
<xsl:apply-templates
select=
"questions/question/questions"
/>
<xsl:apply-templates
select=
"questions/question/questions/question/questions"
/>
<xsl:apply-templates
select=
"questions/question/questions/question/questions/question/questions"
/>
<xsl:apply-templates
select=
"questions/question/questions/question/questions/question/questions/question/questions"
/>
<xsl:apply-templates
select=
"questions/question/questions/question/questions/question/questions/question/questions/question/questions"
/>
</div>
</body>
...
...
@@ -430,6 +453,39 @@
</ul>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template
match=
"questions"
>
<xsl:for-each
select=
"question"
>
<xsl:sort
select=
"translate(name,$lcletters, $ucletters)"
/>
<xsl:variable
name=
"checked"
select=
"@checked"
/>
<a
name =
"{@text}"
>
<div
id=
"question"
>
<a
href=
"#top"
><font
size=
'2'
><center>
[top]
</center></font></a>
<h2><xsl:value-of
select=
"@text"
/></h2>
<xsl:for-each
select=
"."
>
<xsl:if
test=
"questions"
>
<ul>
<xsl:for-each
select=
"questions/question"
>
<xsl:sort
select=
"translate(name,$lcletters, $ucletters)"
/>
<li><a
href=
"#{@text}"
><xsl:value-of
select=
"@text"
/></a></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if
test=
"not(questions)"
>
<xsl:apply-templates
select=
"."
/>
</xsl:if>
</xsl:for-each>
</div>
</a>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template
match=
"components"
>
...
...
Write
Preview
Markdown
is supported
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