Commit 58a23a11 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Splitting each category index into spearate files.

Additional minor cleanup.
parent d8374d3d
......@@ -270,6 +270,7 @@ function (generate_htmls_from_xmls output_files xmlpatterns xmls gui_xmls output
set (${output_files} ${dependencies} PARENT_SCOPE)
endfunction()
#------------------------------------------------------------------------------
# Function used to build a qhp file.
# build_help_project(NAME
# WORKING_DIRECTORY directory
......@@ -289,7 +290,9 @@ endfunction()
# not specified.
# TABLE_OF_CONTENTS_FILE :- file to read in to obtain the TABLE_OF_CONTENTS
# FILES :- (optional: default="*.*") list of files (names or wildcards) to list
# in the qhp file.
# in the qhp file. Note that these files/paths are relative to the
# WORKING_DIRECTORY.
#------------------------------------------------------------------------------
function(build_help_project name)
pv_parse_arguments(arg
"WORKING_DIRECTORY;NAMESPACE;FOLDER;TABLE_OF_CONTENTS;TABLE_OF_CONTENTS_FILE;FILES"
......@@ -297,7 +300,6 @@ function(build_help_project name)
${ARGN}
)
message ("wd ${arg_WORKING_DIRECTORY}")
if (NOT DEFINED arg_WORKING_DIRECTORY)
message(FATAL_ERROR "No WORKING_DIRECTORY specified in build_help_project()")
endif()
......
......@@ -3,42 +3,44 @@
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/xml">
<xsl:apply-templates select="proxy" />
<xsl:apply-templates select="categoryindex" />
</xsl:template>
<xsl:template match="/xml/categoryindex">
<html>
<head>
<title>Catergory Index</title>
<meta name="filename" contents="CategoryIndex.html" />
<title><xsl:value-of select="label" />Index</title>
<xsl:element name="meta">
<xsl:attribute name="name">filename</xsl:attribute>
<xsl:attribute name="contents"><xsl:value-of select="label"/>.html</xsl:attribute></xsl:element>
</head>
<body>
<xsl:for-each select="categoryindex">
<h2><xsl:value-of select="label" /></h2>
<hr />
<table class="index_table">
<tr><th>Name</th><th>Description</th></tr>
<xsl:for-each select="item">
<tr>
<td>
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="group" />.<xsl:value-of select="name"/>.html</xsl:attribute>
<xsl:variable name="group_name"><xsl:value-of select="group"/></xsl:variable>
<xsl:variable name="proxy_name"><xsl:value-of select="name"/></xsl:variable>
<xsl:value-of select="/xml/proxy[group=$group_name and name=$proxy_name]/label" />
<span />
</xsl:element>
</td>
<td>
<h2><xsl:value-of select="label" /></h2>
<hr />
<table class="index_table">
<tr><th>Name</th><th>Description</th></tr>
<xsl:for-each select="item">
<tr>
<td>
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="group" />.<xsl:value-of select="name"/>.html</xsl:attribute>
<xsl:variable name="group_name"><xsl:value-of select="group"/></xsl:variable>
<xsl:variable name="proxy_name"><xsl:value-of select="name"/></xsl:variable>
<xsl:value-of select="/xml/proxy[group=$group_name and name=$proxy_name]/documentation/brief" />
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
<xsl:value-of select="/xml/proxy[group=$group_name and name=$proxy_name]/label" />
<span />
</xsl:element>
</td>
<td>
<xsl:variable name="group_name"><xsl:value-of select="group"/></xsl:variable>
<xsl:variable name="proxy_name"><xsl:value-of select="name"/></xsl:variable>
<xsl:value-of select="/xml/proxy[group=$group_name and name=$proxy_name]/documentation/brief" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
<xsl:apply-templates select="proxy"/>
</xsl:template>
<xsl:template match="/xml/proxy">
......
# Copy all online help files from current directory over to the binary directory.
# These do not include any server manager documentation htmls.
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR})
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/index.html.in"
"${CMAKE_CURRENT_BINARY_DIR}/index.html"
......@@ -47,10 +41,10 @@ build_help_project(paraview
<section title=\"Introduction\" ref=\"Book/Book_Chapter1.html\"/>
<section title=\"Plugins\" ref=\"Book/Book_Chapter16.html\"/>
<section title=\"Appendices\" ref=\"Book/Book_Chapter17.html\"/>
<section title=\"Sources\" ref=\"CategoryIndex.html#Sources\"/>
<section title=\"Filters\" ref=\"CategoryIndex.html#Filters\"/>
<section title=\"Readers\" ref=\"CategoryIndex.html#Readers\"/>
<section title=\"Writers\" ref=\"CategoryIndex.html#Writers\"/>
<section title=\"Sources\" ref=\"Sources.html\"/>
<section title=\"Filters\" ref=\"Filters.html\"/>
<section title=\"Readers\" ref=\"Readers.html\"/>
<section title=\"Writers\" ref=\"Writers.html\"/>
</section>
</toc>"
FILES "*.html;*.css;*.png;*.jpg;Book/*.html;Book/*.css;Book/*.png;Book/*.jpg"
......@@ -60,9 +54,18 @@ ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/paraview.qch
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/paraview.qhp
${proxy_html_outputs}
# copy all htmls from source to destination directory (same location where the
# qhp file is present.
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
# Now, compile the qhp file to generate the qch.
COMMAND ${QT_HELP_GENERATOR}
${CMAKE_CURRENT_BINARY_DIR}/paraview.qhp
-o ${CMAKE_CURRENT_BINARY_DIR}/paraview.qch
COMMENT "Compiling Qt help project paraview.qhp"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment