Commit 5f32f40a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Renaming files and adding helpful documentation.

parent 7984a4c9
......@@ -229,6 +229,9 @@ ENDFUNCTION (protobuf_generate)
#------------------------------------------------------------------------------
function (generate_htmls_from_xmls output_files xmlpatterns xmls gui_xmls output_dir)
# create a string from the xmls list to pass
# since this list needs to be passed as an argument, we cannot escape the ";".
# generate_proxydocumentation.cmake has code to convert these strings back to
# lists.
set (xmls_string)
foreach (xml ${xmls})
set (xmls_string "${xmls_string}${xml}+")
......@@ -245,18 +248,18 @@ function (generate_htmls_from_xmls output_files xmlpatterns xmls gui_xmls output
# process each html file to sperate it out into files for each proxy.
COMMAND "${CMAKE_COMMAND}"
-Dxmlpatterns="${xmlpatterns}"
-Dxml_to_xml_xsl="${ParaView_CMAKE_DIR}/smdocumentation_generator.xsl"
-Dxml_to_xml_xsl="${ParaView_CMAKE_DIR}/smxml_to_xml.xsl"
-Dxml_to_html_xsl="${ParaView_CMAKE_DIR}/xml_to_html.xsl"
-Dinput_xmls:STRING="${xmls_string}"
-Dinput_gui_xmls:STRING="${gui_xmls_string}"
-Doutput_dir="${output_dir}"
-Dtemporary_dir="${CMAKE_CURRENT_BINARY_DIR}"
-P "${ParaView_CMAKE_DIR}/split_htmls.cmake"
-Doutput_file="${CMAKE_CURRENT_BINARY_DIR}/temporary.xml"
-P "${ParaView_CMAKE_DIR}/generate_proxydocumentation.cmake"
DEPENDS ${xmls}
"${ParaView_CMAKE_DIR}/smdocumentation_generator.xsl"
"${ParaView_CMAKE_DIR}/smxml_to_xml.xsl"
"${ParaView_CMAKE_DIR}/xml_to_html.xsl"
"${ParaView_CMAKE_DIR}/split_htmls.cmake"
"${ParaView_CMAKE_DIR}/generate_proxydocumentation.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
......
......@@ -2,6 +2,17 @@
# to split a file consisting of multiple htmls into multiple files.
cmake_minimum_required(VERSION 2.8)
# INPUT VARIABLES:
# xmlpatterns :- xmlpatterns executable.
# xml_to_xml_xsl :- xsl file to convert SM xml to internal xml Model.
# xml_to_html_xsl :- xsl file to conevrt the internal xml to html.
# input_xmls :- + separated list of SM xml files
# input_gui_xmls :- + separated list of GUI xml files used to generate the
# CatergoryIndex.html
# output_dir :- Directory where all HTMLs are written out.
# output_file :- File written out on successful completion.
# This file is also used to save intermediate results.
# input_xmls is a pseudo-list. Convert it to a real CMake list.
string(REPLACE "+" ";" input_xmls ${input_xmls})
string(REPLACE "+" ";" input_gui_xmls ${input_gui_xmls})
......@@ -19,9 +30,6 @@ foreach(xml ${input_xmls} ${input_gui_xmls})
# process each XML using the XSL to generate the html.
execute_process(
COMMAND "${xmlpatterns}" "${xml_to_xml_xsl}" "${xml}"
WORKING_DIRECTORY "${temporary_dir}"
OUTPUT_VARIABLE temp
)
......@@ -31,7 +39,7 @@ endforeach()
# write the combined XML out in a single file.
set (xslt_xml "<xml>\n${xslt_xml}\n</xml>")
file (WRITE "${temporary_dir}/temporary.xml" "${xslt_xml}")
file (WRITE "${output_file}" "${xslt_xml}")
# process the temporary.xml using the second XSL to generate a combined html
# file.
......@@ -39,10 +47,7 @@ set (multiple_htmls)
execute_process(
COMMAND "${xmlpatterns}"
"${xml_to_html_xsl}"
"${temporary_dir}/temporary.xml"
WORKING_DIRECTORY "${temporary_dir}"
"${output_file}"
OUTPUT_VARIABLE multiple_htmls
)
......
<?xml version="1.0" encoding="utf8"?>
<!-- XSL used to generate HTMLs from server manager XML
to run use : xmlpatterns <xsl> <xml> -output <html>
<!-- XSL used to generate XML DOM from ServerManager xmls as well as GUI
configuration xmls for sources/filters/etc.
to run use : xmlpatterns <xsl> <xml> -output <html>
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
......
<?xml version="1.0" encoding="utf8"?>
<!-- Used to convert XML DOM generated from smxml_to_xml.xsl to HTML -->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/xml">
......
......@@ -8,10 +8,10 @@
<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"/>
<section title="Filters" ref="CategoryIndex.html"/>
<section title="Readers" ref="CategoryIndex.html"/>
<section title="Writers" ref="CategoryIndex.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>
</toc>
<keywords>
......
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