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
b7e9326b
Commit
b7e9326b
authored
May 27, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated stylesheet to support listing of python example programs.
parent
1e7703d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
5 deletions
+43
-5
stylesheet.xsl
docs/docs/stylesheet.xsl
+43
-5
No files found.
docs/docs/stylesheet.xsl
View file @
b7e9326b
...
...
@@ -603,17 +603,55 @@ function BigToggle(node)
</xsl:for-each>
</xsl:template>
<!-- This template outputs a length 1 string if there is a python example program -->
<xsl:template
name=
"has_python_example"
>
<xsl:for-each
select=
"example"
>
<xsl:if
test=
"substring-before(.,'.py.html') != ''"
>
1
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- This template outputs a length 1 string if there is a C++ example program -->
<xsl:template
name=
"has_cpp_example"
>
<xsl:for-each
select=
"example"
>
<xsl:if
test=
"substring-before(.,'.cpp.html') != ''"
>
1
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template
match=
"examples"
>
<BR/>
Example Programs:
<xsl:variable
name=
"has_python"
><xsl:call-template
name=
"has_python_example"
/></xsl:variable>
<xsl:variable
name=
"has_cpp"
><xsl:call-template
name=
"has_cpp_example"
/></xsl:variable>
<xsl:variable
name=
"numpy"
select=
"string-length($has_python)"
/>
<xsl:variable
name=
"numcpp"
select=
"string-length($has_cpp)"
/>
<xsl:if
test=
"$numcpp != 0"
>
<BR/>
C++ Example Programs:
</xsl:if>
<xsl:for-each
select=
"example"
>
<xsl:variable
name=
"fname"
select=
"substring-before(.,'.cpp.html')"
/>
<xsl:variable
name=
"name"
select=
"substring-before(.,'.html')"
/>
<xsl:if
test=
"$fname != ''"
>
<xsl:choose>
<xsl:when
test=
"position() >= last()-$numpy"
>
<a
href=
"{.}"
><xsl:value-of
select=
"$name"
/></a>
</xsl:when>
<xsl:otherwise>
<a
href=
"{.}"
><xsl:value-of
select=
"$name"
/></a>
,
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
<xsl:if
test=
"$numpy != 0"
>
<BR/>
Python Example Programs:
</xsl:if>
<xsl:for-each
select=
"example"
>
<xsl:variable
name=
"fname"
select=
"substring-before(.,'.py.html')"
/>
<xsl:variable
name=
"name"
select=
"substring-before(.,'.html')"
/>
<xsl:if
test=
"$fname != ''"
>
<xsl:choose>
<xsl:when
test=
"position() = last()
"
>
<a
href=
"{.}"
><xsl:value-of
select=
"substring-before(.,'.html')
"
/></a>
<xsl:when
test=
"position() >= last()-$numcpp
"
>
<a
href=
"{.}"
><xsl:value-of
select=
"$name
"
/></a>
</xsl:when>
<xsl:otherwise>
<a
href=
"{.}"
><xsl:value-of
select=
"substring-before(.,'.html')
"
/></a>
,
<a
href=
"{.}"
><xsl:value-of
select=
"$name
"
/></a>
,
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:template>
...
...
@@ -1081,7 +1119,7 @@ function BigToggle(node)
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ******* Subversion stylesheet st
f
uff ******************** -->
<!-- ******* Subversion stylesheet stuff ******************** -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
...
...
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