Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
2952abbf
Commit
2952abbf
authored
Jun 01, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup the XSLT for a FAQ page
parent
e0f98d92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
0 deletions
+97
-0
faq.xml
docs/docs/faq.xml
+37
-0
main_menu.xml
docs/docs/main_menu.xml
+4
-0
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