[C-MPI-commits] SF.net SVN: c-mpi:[51] docs/docbook
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-29 19:16:23
|
Revision: 51
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=51&view=rev
Author: jmwozniak
Date: 2010-04-29 19:16:17 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
Manual, Makefile, and XSL.
Added Paths:
-----------
docs/docbook/Makefile
docs/docbook/formatting/
docs/docbook/formatting/swift_html.xsl
docs/docbook/formatting/swiftsh_html.xsl
docs/docbook/formatting/swiftsh_html_chunked.xsl
docs/docbook/formatting/vdl2_fo.xsl
docs/docbook/manual.xml
Added: docs/docbook/Makefile
===================================================================
--- docs/docbook/Makefile (rev 0)
+++ docs/docbook/Makefile 2010-04-29 19:16:17 UTC (rev 51)
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+all: htmls
+# phps pdfs
+
+# phps: userguide.php
+
+htmls: manual.html
+
+# pdfs: userguide.pdf
+
+# chunked-userguide: userguide.xml
+# ./build-chunked-userguide.sh
+
+%.php: %.xml formatting/swiftsh_html.xsl
+ xsltproc --nonet formatting/swiftsh_html.xsl $<
+ sed -e "s/index.html#/#/g" index.html >$@
+
+#%.pdf: %.xml formatting/vdl2_fo.xsl
+# fop/fop -xsl formatting/vdl2_fo.xsl -xml $< -pdf $@
+
+%.html: %.php
+ cp $< $@
Added: docs/docbook/formatting/swift_html.xsl
===================================================================
--- docs/docbook/formatting/swift_html.xsl (rev 0)
+++ docs/docbook/formatting/swift_html.xsl 2010-04-29 19:16:17 UTC (rev 51)
@@ -0,0 +1,256 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <!-- Which DocBook standard xsl file should we use as the default? -->
+ <!-- Well, xsltproc doesn't cache the xsl files fetched over the web, so better use a local copy -->
+ <xsl:import href="docbook/html/chunk.xsl"/>
+ <!--<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>-->
+ <!--
+
+ testing: if you want to generate your own html without installing
+ stylesheets, substitute the following url for the import href above:
+ http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
+
+ -->
+ <!-- speed up the chunking process? -->
+ <xsl:param name="chunk.fast">1</xsl:param>
+
+ <!--
+ Use graphics in admonitions? like 'warnings' 'important' 'note' etc
+ -->
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <!-- Set path to admonition graphics -->
+ <xsl:param name="admon.graphics.path">/docbook-images/</xsl:param>
+ <!--
+
+ Set path to docbook graphics (testing)
+ <xsl:param name="admon.graphics.path">file:///Z:/testing/alliance/docbook-images/</xsl:param>
+
+ -->
+ <!--
+ Again, if 1 above, what is the filename extension for admon graphics?
+ -->
+ <xsl:param name="admon.graphics.extension" select="'.gif'"/>
+ <!-- Set path to callout graphics -->
+
+ <xsl:param name="callout.graphics.path">/docbook-images/</xsl:param>
+ <!-- Depth to which sections should be chunked -->
+ <xsl:param name="chunk.section.depth">0</xsl:param>
+
+ <!--
+
+ Are parts automatically enumerated?
+ <xsl:param name="part.autolabel">0</xsl:param>
+
+ -->
+ <!-- Are chapters automatically enumerated? -->
+ <xsl:param name="chapter.autolabel">0</xsl:param>
+ <!-- Are sections enumerated? -->
+ <xsl:param name="section.autolabel">1</xsl:param>
+ <!-- how deep should each toc be? (how many levels?) -->
+ <xsl:param name="toc.max.depth">2</xsl:param>
+ <!--
+ How deep should recursive sections appear in the TOC for chapters?
+ -->
+ <xsl:param name="toc.section.depth">4</xsl:param>
+ <!--
+ Should the first section be chunked separately from its parent? > 0 = yes
+ -->
+ <xsl:param name="chunk.first.sections">1</xsl:param>
+ <!--
+
+ Instead of using default filenames, use ids for filenames (dbhtml
+ directives take precedence) taking this out to avoid breaking any
+ current bookmarks
+
+ <xsl:param name="use.id.as.filename">1</xsl:param>
+
+ -->
+ <!-- custom toc - book only shows chapter -->
+ <xsl:template match="preface|chapter|appendix|article" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="local-name($toc-context) = 'book'">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="foo"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="section|sect1|glossary|bibliography|index |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- INDEX PARAMETERS -->
+ <!-- do you want an index? -->
+ <xsl:param name="generate.index">1</xsl:param>
+ <!-- Select indexterms based on type attribute value -->
+ <xsl:param name="index.on.type">1</xsl:param>
+ <!-- GLOSSARY PARAMETERS -->
+ <!-- Display glossentry acronyms? -->
+ <xsl:param name="glossentry.show.acronym">yes</xsl:param>
+
+ <!--
+
+ Name of the glossary collection file
+
+ <xsl:param name="glossary.collection" select="'glossary.xml'"></xsl:param>
+
+ -->
+
+ <!--
+ Generate links from glossterm to glossentry automatically?
+
+ <xsl:param name="glossterm.auto.link">1</xsl:param>
+
+ -->
+
+ <!--
+
+ if non-zero value for previous parameter, does automatic glossterm
+ linking only apply to firstterms?
+
+ <xsl:param name="firstterm.only.link">1</xsl:param>
+ -->
+
+ <!--
+
+ permit wrapping of long lines of code
+
+ <xsl:attribute-set name="monospace.verbatim.properties"
+ use-attribute-sets="verbatim.properties monospace.properties">
+
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
+ </xsl:attribute-set>
+ -->
+
+ <!-- INCORPORATING DOCBOOK PAGES INTO WEBSITE -->
+
+ <!--
+ make sure there's a DOCTYPE in the html output (otherwise, some css renders strangely
+ -->
+ <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
+ <xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/html4/loose.dtd'"/>
+ <!-- add elements to the HEAD tag -->
+
+ <xsl:template name="user.head.content">
+ <link href="../css/style1col.css" rel="stylesheet" type="text/css" />
+ </xsl:template>
+
+ <!-- add an attribute to the BODY tag -->
+
+ <xsl:template name="body.attributes">
+ <xsl:attribute name="class">section-3</xsl:attribute>
+ </xsl:template>
+
+ <!--
+ pull in 'website' with this code by modifying chunk-element-content from html/chunk-common.xsl
+ -->
+
+ <xsl:template name="chunk-element-content">
+ <xsl:param name="prev"/>
+ <xsl:param name="next"/>
+ <xsl:param name="nav.context"/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:call-template name="user.preroot"/>
+
+ <html>
+
+ <xsl:call-template name="html.head">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+
+ <body>
+ <xsl:call-template name="body.attributes"/>
+
+ <xsl:call-template name="user.header.navigation"/>
+
+ <xsl:call-template name="user.header.content"/>
+
+ <xsl:copy-of select="$content"/>
+
+ <xsl:call-template name="user.footer.content"/>
+
+ <xsl:call-template name="user.footer.navigation"/>
+
+ <!-- for google analytics -->
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {var pageTracker = _gat._getTracker("UA-106257-5");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+
+
+ </body>
+ </html>
+ </xsl:template>
+
+ <!--
+ prevent h1 and h2 using clear: both - want to control in css, instead
+ -->
+
+ <xsl:template name="section.heading">
+ <xsl:param name="section" select="."/>
+ <xsl:param name="level" select="'1'"/>
+ <xsl:param name="title"/>
+
+ <xsl:element name="h{$level+1}">
+ <xsl:attribute name="class">title</xsl:attribute>
+
+ <a>
+ <xsl:attribute name="name">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$section"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </a>
+
+ <xsl:copy-of select="$title"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template name="user.header.content">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+
+ <!-- entire page container -->
+ <div id="container">
+ <!-- header -->
+ <div id="header">
+ <?php require('../inc/header.php') ?>
+ </div>
+ <!-- end header -->
+ <!-- nav -->
+ <div id="nav">
+ <?php require('../inc/nav.php') ?>
+ </div>
+ <!-- end nav -->
+ <!-- content container -->
+ <div id="content">
+ ]]>
+ </xsl:text>
+ </xsl:template>
+
+ <xsl:template name="user.footer.content">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+ </div>
+ <!-- end content container-->
+ <!-- footer -->
+ <div id="footer"><?php require('../inc/footer.php') ?></div>
+ <!-- end footer -->
+
+ </div>
+ <!-- end entire page container -->
+ ]]>
+ </xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
Added: docs/docbook/formatting/swiftsh_html.xsl
===================================================================
--- docs/docbook/formatting/swiftsh_html.xsl (rev 0)
+++ docs/docbook/formatting/swiftsh_html.xsl 2010-04-29 19:16:17 UTC (rev 51)
@@ -0,0 +1,260 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <!-- Which DocBook standard xsl file should we use as the default? -->
+ <!-- Well, xsltproc doesn't cache the xsl files fetched over the web, so better use a local copy -->
+ <xsl:import href="docbook/html/chunk.xsl"/>
+ <!--<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>-->
+ <!--
+
+ testing: if you want to generate your own html without installing
+ stylesheets, substitute the following url for the import href above:
+ http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
+
+ -->
+ <!-- speed up the chunking process? -->
+ <xsl:param name="chunk.fast">1</xsl:param>
+
+ <!--
+ Use graphics in admonitions? like 'warnings' 'important' 'note' etc
+ -->
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <!-- Set path to admonition graphics -->
+ <xsl:param name="admon.graphics.path">/docbook-images/</xsl:param>
+ <!--
+
+ Set path to docbook graphics (testing)
+ <xsl:param name="admon.graphics.path">file:///Z:/testing/alliance/docbook-images/</xsl:param>
+
+ -->
+ <!--
+ Again, if 1 above, what is the filename extension for admon graphics?
+ -->
+ <xsl:param name="admon.graphics.extension" select="'.gif'"/>
+ <!-- Set path to callout graphics -->
+
+ <xsl:param name="callout.graphics.path">/docbook-images/</xsl:param>
+ <!-- Depth to which sections should be chunked -->
+ <xsl:param name="chunk.section.depth">0</xsl:param>
+
+ <!--
+
+ Are parts automatically enumerated?
+ <xsl:param name="part.autolabel">0</xsl:param>
+
+ -->
+ <!-- Are chapters automatically enumerated? -->
+ <xsl:param name="chapter.autolabel">0</xsl:param>
+ <!-- Are sections enumerated? -->
+ <xsl:param name="section.autolabel">1</xsl:param>
+ <!-- how deep should each toc be? (how many levels?) -->
+ <xsl:param name="toc.max.depth">2</xsl:param>
+ <!--
+ How deep should recursive sections appear in the TOC for chapters?
+ -->
+ <xsl:param name="toc.section.depth">4</xsl:param>
+ <!--
+ Should the first section be chunked separately from its parent? > 0 = yes
+ -->
+ <xsl:param name="chunk.first.sections">1</xsl:param>
+ <!--
+
+ Instead of using default filenames, use ids for filenames (dbhtml
+ directives take precedence) taking this out to avoid breaking any
+ current bookmarks
+
+ <xsl:param name="use.id.as.filename">1</xsl:param>
+
+ -->
+ <!-- custom toc - book only shows chapter -->
+ <xsl:template match="preface|chapter|appendix|article" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="local-name($toc-context) = 'book'">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="foo"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="section|sect1|glossary|bibliography|index |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- INDEX PARAMETERS -->
+ <!-- do you want an index? -->
+ <xsl:param name="generate.index">1</xsl:param>
+ <!-- Select indexterms based on type attribute value -->
+ <xsl:param name="index.on.type">1</xsl:param>
+ <!-- GLOSSARY PARAMETERS -->
+ <!-- Display glossentry acronyms? -->
+ <xsl:param name="glossentry.show.acronym">yes</xsl:param>
+
+ <!--
+
+ Name of the glossary collection file
+
+ <xsl:param name="glossary.collection" select="'glossary.xml'"></xsl:param>
+
+ -->
+
+ <!--
+ Generate links from glossterm to glossentry automatically?
+
+ <xsl:param name="glossterm.auto.link">1</xsl:param>
+
+ -->
+
+ <!--
+
+ if non-zero value for previous parameter, does automatic glossterm
+ linking only apply to firstterms?
+
+ <xsl:param name="firstterm.only.link">1</xsl:param>
+ -->
+
+ <!--
+
+ permit wrapping of long lines of code
+
+ <xsl:attribute-set name="monospace.verbatim.properties"
+ use-attribute-sets="verbatim.properties monospace.properties">
+
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
+ </xsl:attribute-set>
+ -->
+
+ <!-- INCORPORATING DOCBOOK PAGES INTO WEBSITE -->
+
+ <!--
+ make sure there's a DOCTYPE in the html output (otherwise, some css renders strangely
+ -->
+ <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
+ <xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/html4/loose.dtd'"/>
+ <!-- add elements to the HEAD tag -->
+
+ <xsl:template name="user.head.content">
+ <link href="http://www.ci.uchicago.edu/swift/css/style1col.css" rel="stylesheet" type="text/css"/>
+ <script type="text/javascript" src="http://www.ci.uchicago.edu/swift/dhtml.js"></script>
+ <script type="text/javascript" src="http://www.ci.uchicago.edu/swift/shCoreu.js"></script>
+ <script type="text/javascript" src="http://www.ci.uchicago.edu/swift/shBrushVDL2.js"></script>
+ </xsl:template>
+
+ <!-- add an attribute to the BODY tag -->
+
+ <xsl:template name="body.attributes">
+ <xsl:attribute name="class">section-3</xsl:attribute>
+ </xsl:template>
+
+ <!--
+ pull in 'website' with this code by modifying chunk-element-content from html/chunk-common.xsl
+ -->
+
+ <xsl:template name="chunk-element-content">
+ <xsl:param name="prev"/>
+ <xsl:param name="next"/>
+ <xsl:param name="nav.context"/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:call-template name="user.preroot"/>
+
+ <html>
+
+ <xsl:call-template name="html.head">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+
+ <body onLoad="initjs();sh();">
+ <xsl:call-template name="body.attributes"/>
+
+ <xsl:call-template name="user.header.navigation"/>
+
+ <xsl:call-template name="user.header.content"/>
+
+ <xsl:copy-of select="$content"/>
+
+ <xsl:call-template name="user.footer.content"/>
+
+ <xsl:call-template name="user.footer.navigation"/>
+
+ <!-- for google analytics -->
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-106257-5");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+
+ </body>
+ </html>
+ </xsl:template>
+
+ <!--
+ prevent h1 and h2 using clear: both - want to control in css, instead
+ -->
+
+ <xsl:template name="section.heading">
+ <xsl:param name="section" select="."/>
+ <xsl:param name="level" select="'1'"/>
+ <xsl:param name="title"/>
+
+ <xsl:element name="h{$level+1}">
+ <xsl:attribute name="class">title</xsl:attribute>
+
+ <a>
+ <xsl:attribute name="name">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$section"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </a>
+
+ <xsl:copy-of select="$title"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template name="user.header.content">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+
+ <!-- entire page container -->
+ <div id="container">
+ <!-- header -->
+ <div id="header">
+ <?php require('/ci/www/projects/swift/inc/header.php') ?>
+ </div>
+ <!-- end header -->
+ <!-- nav -->
+ <div id="nav">
+ <?php require('/ci/www/projects/swift/inc/nav.php') ?>
+ </div>
+ <!-- end nav -->
+ <!-- content container -->
+ <div id="content">
+ ]]>
+ </xsl:text>
+ </xsl:template>
+
+ <xsl:template name="user.footer.content">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+ </div>
+ <!-- end content container-->
+ <!-- footer -->
+ <div id="footer"><?php require('/ci/www/projects/swift/inc/footer.php') ?></div>
+ <!-- end footer -->
+
+ </div>
+ <!-- end entire page container -->
+
+ ]]>
+ </xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
Added: docs/docbook/formatting/swiftsh_html_chunked.xsl
===================================================================
--- docs/docbook/formatting/swiftsh_html_chunked.xsl (rev 0)
+++ docs/docbook/formatting/swiftsh_html_chunked.xsl 2010-04-29 19:16:17 UTC (rev 51)
@@ -0,0 +1,298 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <!-- Which DocBook standard xsl file should we use as the default? -->
+ <!-- Well, xsltproc doesn't cache the xsl files fetched over the web, so better use a local copy -->
+ <xsl:import href="docbook/html/chunk.xsl"/>
+ <xsl:param name="chunk.section.depth" select="1"></xsl:param>
+ <xsl:param name="use.id.as.filename" select="1"/>
+ <xsl:param name="html.ext">.php</xsl:param>
+
+
+ <!--<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>-->
+ <!--
+
+ testing: if you want to generate your own html without installing
+ stylesheets, substitute the following url for the import href above:
+ http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
+
+ -->
+ <!-- speed up the chunking process? -->
+ <xsl:param name="chunk.fast">1</xsl:param>
+
+ <!--
+ Use graphics in admonitions? like 'warnings' 'important' 'note' etc
+ -->
+ <xsl:param name="admon.graphics">1</xsl:param>
+ <!-- Set path to admonition graphics -->
+ <xsl:param name="admon.graphics.path">/docbook-images/</xsl:param>
+ <!--
+
+ Set path to docbook graphics (testing)
+ <xsl:param name="admon.graphics.path">file:///Z:/testing/alliance/docbook-images/</xsl:param>
+
+ -->
+ <!--
+ Again, if 1 above, what is the filename extension for admon graphics?
+ -->
+ <xsl:param name="admon.graphics.extension" select="'.gif'"/>
+ <!-- Set path to callout graphics -->
+
+ <xsl:param name="callout.graphics.path">/docbook-images/</xsl:param>
+ <!-- Depth to which sections should be chunked -->
+ <xsl:param name="chunk.section.depth">0</xsl:param>
+
+ <!--
+
+ Are parts automatically enumerated?
+ <xsl:param name="part.autolabel">0</xsl:param>
+
+ -->
+ <!-- Are chapters automatically enumerated? -->
+ <xsl:param name="chapter.autolabel">0</xsl:param>
+ <!-- Are sections enumerated? -->
+ <xsl:param name="section.autolabel">1</xsl:param>
+ <!-- how deep should each toc be? (how many levels?) -->
+ <xsl:param name="toc.max.depth">2</xsl:param>
+ <!--
+ How deep should recursive sections appear in the TOC for chapters?
+ -->
+ <xsl:param name="toc.section.depth">4</xsl:param>
+ <!--
+ Should the first section be chunked separately from its parent? > 0 = yes
+ -->
+ <xsl:param name="chunk.first.sections">1</xsl:param>
+ <!--
+
+ Instead of using default filenames, use ids for filenames (dbhtml
+ directives take precedence) taking this out to avoid breaking any
+ current bookmarks
+
+ <xsl:param name="use.id.as.filename">1</xsl:param>
+
+ -->
+ <!-- custom toc - book only shows chapter -->
+ <xsl:template match="preface|chapter|appendix|article" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="local-name($toc-context) = 'book'">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="foo"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="section|sect1|glossary|bibliography|index |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!-- INDEX PARAMETERS -->
+ <!-- do you want an index? -->
+ <xsl:param name="generate.index">1</xsl:param>
+ <!-- Select indexterms based on type attribute value -->
+ <xsl:param name="index.on.type">1</xsl:param>
+ <!-- GLOSSARY PARAMETERS -->
+ <!-- Display glossentry acronyms? -->
+ <xsl:param name="glossentry.show.acronym">yes</xsl:param>
+
+ <!--
+
+ Name of the glossary collection file
+
+ <xsl:param name="glossary.collection" select="'glossary.xml'"></xsl:param>
+
+ -->
+
+ <!--
+ Generate links from glossterm to glossentry automatically?
+
+ <xsl:param name="glossterm.auto.link">1</xsl:param>
+
+ -->
+
+ <!--
+
+ if non-zero value for previous parameter, does automatic glossterm
+ linking only apply to firstterms?
+
+ <xsl:param name="firstterm.only.link">1</xsl:param>
+ -->
+
+ <!--
+
+ permit wrapping of long lines of code
+
+ <xsl:attribute-set name="monospace.verbatim.properties"
+ use-attribute-sets="verbatim.properties monospace.properties">
+
+ <xsl:attribute name="wrap-option">wrap</xsl:attribute>
+ </xsl:attribute-set>
+ -->
+
+ <!-- INCORPORATING DOCBOOK PAGES INTO WEBSITE -->
+
+ <!--
+ make sure there's a DOCTYPE in the html output (otherwise, some css renders strangely
+ -->
+ <xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
+ <xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/html4/loose.dtd'"/>
+ <!-- add elements to the HEAD tag -->
+
+ <xsl:template name="user.head.content">
+ <link href="http://www.ci.uchicago.edu/swift/css/style1col.css" rel="stylesheet" type="text/css"/>
+ <script type="text/javascript" src="http://www.ci.uchicago.edu/swift/dhtml.js"></script>
+ <script type="text/javascript" src="http://www.ci.uchicago.edu/swift/shCoreu.js"></script>
+ <script type="text/javascript" src="http://www.ci.uchicago.edu/swift/shBrushVDL2.js"></script>
+ </xsl:template>
+
+ <!-- add an attribute to the BODY tag -->
+
+ <xsl:template name="body.attributes">
+ <xsl:attribute name="class">section-3</xsl:attribute>
+ </xsl:template>
+
+ <!--
+ pull in 'website' with this code by modifying chunk-element-content from html/chunk-common.xsl
+ -->
+
+ <xsl:template name="chunk-element-content">
+ <xsl:param name="prev"/>
+ <xsl:param name="next"/>
+ <xsl:param name="nav.context"/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:call-template name="user.preroot"/>
+
+ <html>
+
+ <xsl:call-template name="html.head">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+
+ <body onLoad="initjs();sh();">
+ <xsl:call-template name="body.attributes"/>
+
+ <xsl:call-template name="user.header.navigation"/>
+ <xsl:call-template name="header.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="user.header.content"/>
+ <xsl:call-template name="breadcrumbs" />
+ <xsl:copy-of select="$content"/>
+
+ <xsl:call-template name="user.footer.content"/>
+
+ <xsl:call-template name="footer.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="user.footer.navigation"/>
+ <!-- for google analytics -->
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {var pageTracker = _gat._getTracker("UA-106257-5");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+
+ </body>
+ </html>
+ </xsl:template>
+
+ <!--
+ prevent h1 and h2 using clear: both - want to control in css, instead
+ -->
+
+ <xsl:template name="section.heading">
+ <xsl:param name="section" select="."/>
+ <xsl:param name="level" select="'1'"/>
+ <xsl:param name="title"/>
+
+ <xsl:element name="h{$level+1}">
+ <xsl:attribute name="class">title</xsl:attribute>
+
+ <a>
+ <xsl:attribute name="name">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$section"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </a>
+
+ <xsl:copy-of select="$title"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template name="user.header.navigation">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+
+ <!-- entire page container -->
+ <div id="container">
+ <!-- header -->
+ <div id="header">
+ <?php require('../../inc/header.php') ?>
+ </div>
+ <!-- end header -->
+ <!-- nav -->
+ <div id="nav">
+ <?php require('../../inc/nav.php') ?>
+ </div>
+ <!-- end nav -->
+ <!-- content container -->
+ <div id="content">
+ ]]>
+ </xsl:text>
+ </xsl:template>
+
+ <xsl:template name="user.footer.content">
+ <xsl:text disable-output-escaping="yes"><![CDATA[
+ </div>
+ <!-- end content container-->
+ <!-- footer -->
+ <div id="footer"><?php require('../../inc/footer.php') ?></div>
+ <!-- end footer -->
+
+ </div>
+ <!-- end entire page container -->
+
+ ]]>
+ </xsl:text>
+ </xsl:template>
+
+<xsl:template name="breadcrumbs">
+ <xsl:param name="this.node" select="."/>
+ <div class="breadcrumbs">
+ <xsl:for-each select="$this.node/ancestor::*">
+ <span class="breadcrumb-link">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ <xsl:with-param name="context" select="$this.node"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </a>
+ </span>
+ <xsl:text> > </xsl:text>
+ </xsl:for-each>
+ <!-- And display the current node, but not as a link -->
+ <span class="breadcrumb-node">
+ <xsl:apply-templates select="$this.node" mode="title.markup"/>
+ </span>
+ </div>
+</xsl:template>
+</xsl:stylesheet>
Added: docs/docbook/formatting/vdl2_fo.xsl
===================================================================
--- docs/docbook/formatting/vdl2_fo.xsl (rev 0)
+++ docs/docbook/formatting/vdl2_fo.xsl 2010-04-29 19:16:17 UTC (rev 51)
@@ -0,0 +1,111 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!--
+ now replace all these settings with those specific for use with the fo stylesheet (for pdf output)
+-->
+ <!--
+ just realized both html and fo can share many parameters - need to create common.xsl that gets imported to both so i can single source
+ those variables
+-->
+<!-- which stylesheet to use? -->
+<!--
+<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl"/>
+-->
+<xsl:import href="docbook/fo/docbook.xsl"/>
+
+<!-- enable extensions -->
+<xsl:param name="use.extensions" select="'0'"/>
+<xsl:param name="xep.extensions" select="0"/>
+ <!--
+ turn off table column extensions (unless you use xalan or saxon - it's a java thing
+-->
+<xsl:param name="tablecolumns.extension" select="'0'"/>
+<!-- should output be in draft mode? -->
+<xsl:param name="draft.mode" select="'no'"/>
+<!-- ALIGNMENT -->
+<xsl:param name="alignment">left</xsl:param>
+<!-- GRAPHICS -->
+ <!--
+ Use graphics in admonitions? like 'warnings' 'important' 'note' etc COMMON
+-->
+<xsl:param name="admon.graphics">1</xsl:param>
+<!-- Set path to admonition graphics COMMON -->
+<xsl:param name="admon.graphics.path">/www/www-unix.globus.org/docbook-images/</xsl:param>
+ <!--
+ Set path to docbook graphics (testing)
+ <xsl:param name="admon.graphics.path">file:///Z:/testing/alliance/docbook-images/</xsl:param>
+-->
+ <!--
+ Again, if 1 above, what is the filename extension for admon graphics?
+-->
+<xsl:param name="admon.graphics.extension" select="'.png'"/>
+ <!--
+ for some reason, xep makes the admon graphics too large, this scales them back down
+-->
+<xsl:template match="*" mode="admon.graphic.width">14pt</xsl:template>
+ <!--
+ Set path to callout graphics COMMON
+ <xsl:param name="callout.graphics.path">/www/www-unix.globus.org/docbook-images/callouts/</xsl:param>
+-->
+ <!--
+ callouts look fuzzy in print - using the following two parameters to force unicode
+-->
+<xsl:param name="callout.graphics" select="'0'"/>
+<xsl:param name="callout.unicode" select="1"/>
+<!-- NUMBERING -->
+ <!--
+ are parts enumerated? COMMON
+ <xsl:param name="part.autolabel">1</xsl:param>
+-->
+<!-- Are chapters automatically enumerated? COMMON-->
+<xsl:param name="chapter.autolabel">1</xsl:param>
+<!-- Are sections enumerated? COMMON -->
+<xsl:param name="section.autolabel">1</xsl:param>
+ <!--
+ how deep should each toc be? (how many levels?) COMMON
+-->
+<xsl:param name="toc.max.depth">2</xsl:param>
+ <!--
+ How deep should recursive sections appear in the TOC? COMMON
+-->
+<xsl:param name="toc.section.depth">1</xsl:param>
+<!-- LINKS -->
+<!-- display ulinks as footnotes at bottom of page? -->
+<xsl:param name="ulink.footnotes" select="1"/>
+<!-- display xref links with underline? -->
+ <xsl:attribute-set name="xref.properties">
+<xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+<!-- TABLES -->
+<xsl:param name="default.table.width" select="'6in'"/>
+<!-- INDEX -->
+<!-- do you want an index? COMMON -->
+<xsl:param name="generate.index">1</xsl:param>
+<!-- index attributes for xep -->
+ <xsl:attribute-set name="xep.index.item.properties">
+<xsl:attribute name="merge-subsequent-page-numbers">true</xsl:attribute>
+<xsl:attribute name="link-back">true</xsl:attribute>
+</xsl:attribute-set>
+<!-- GLOSSARY -->
+<!-- Display glossentry acronyms? COMMON> -->
+<xsl:param name="glossentry.show.acronym">yes</xsl:param>
+<!-- Name of the glossary collection file COMMON -->
+ <xsl:param name="glossary.collection">
+/www/www-unix.globus.org/toolkit/docs/development/4.2-drafts/glossary.xml
+</xsl:param>
+ <!--
+ Generate links from glossterm to glossentry automatically? COMMON
+-->
+<xsl:param name="glossterm.auto.link">1</xsl:param>
+ <!--
+ if non-zero value for previous parameter, does automatic glossterm linking only apply to firstterms? COMMON
+ <xsl:param name="firstterm.only.link">1</xsl:param>
+-->
+<!-- reduce 'indentation' of body text -->
+ <xsl:param name="body.start.indent">
+ <xsl:choose>
+<xsl:when test="$fop.extensions != 0">0pt</xsl:when>
+<xsl:when test="$passivetex.extensions != 0">0pt</xsl:when>
+<xsl:otherwise>0pc</xsl:otherwise>
+</xsl:choose>
+</xsl:param>
+</xsl:stylesheet>
\ No newline at end of file
Added: docs/docbook/manual.xml
===================================================================
--- docs/docbook/manual.xml (rev 0)
+++ docs/docbook/manual.xml 2010-04-29 19:16:17 UTC (rev 51)
@@ -0,0 +1,371 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [] >
+
+<article>
+ <articleinfo revision="0.1">
+ <title>C-MPI User Guide</title>
+ <subtitle>Content-MPI</subtitle>
+ </articleinfo>
+
+ <section id="overview">
+ <title>Overview</title>
+ <para>
+ This manual provides reference material for the Content-MPI
+ (C-MPI) DHT.
+ </para>
+ <para>
+ C-MPI provides a key/value store for distributed computing
+ over MPI.
+ </para>
+ </section>
+
+ <section id="usecases">
+ <title>Use Cases</title>
+ <section><title>MPI Library</title>
+ <para>
+ C-MPI can be used as an MPI library:
+ </para>
+
+ <programlisting> <![CDATA[
+
+ #include <cmpi.h>
+
+ int main(int argc, char* argv[])
+ {
+ int mpi_rank;
+ int mpi_size;
+ char key[10];
+ char value[30];
+ int length;
+ char* result;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+ cmpi_init();
+
+ sprintf(key, "key_%i", mpi_rank);
+ sprintf(value, "value_%i", mpi_rank);
+ cmpi_put(key, value, strlen(value)+1);
+
+ rank = (mpi_rank+1)%mpi_size;
+ sprintf(key, "key_%i", rank);
+ cmpi_get(key, &result, &length);
+ printf("result(%i): %s\n", length, result);
+
+ MPI_Finalize();
+
+ cmpi_cleanup();
+ }
+ ]]>
+ </programlisting>
+ </section>
+ </section>
+
+ <section id="mpirpc">
+ <title>MPI-RPC</title>
+
+ <section><title>Overview</title>
+ <para>
+ The MPIRPC component is used to allow the user to
+ issue multiple asynchronous requests in one thread
+ from a higher-level, RPC, event-driven model.
+ </para>
+ </section>
+
+ <section><title>Definitions</title>
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term>MPIRPC object</term>
+ <listitem><para>Created by an MPIRPC call.
+ Can be waited on.
+ On call completion, this is passed to the proceed-function.
+ Contains the result of the call on completion.
+ Must be freed by the user with MPIRPC_Free().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>proceed-function</term>
+ <listitem><para>A user function pointer passed
+ into an MPIRPC call.
+ Called by MPIRPC on call completion with the MPIRPC object.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+
+ <section><title>MPIRPC_Call</title>
+ <para>
+ MPIRPC_Call() creates an MPIRPC object and starts performing
+ the RPC asynchronously. The MPIRPC object will contain the results
+ of the call when complete.
+
+ The arguments are:
+
+ <variablelist>
+ <varlistentry>
+ <term>MPIRPC_Node target</term>
+ <listitem><para>
+ The target MPIRPC_Node.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>char* name</term>
+ <listitem><para>
+ Remote function name
+ Copied into the MPIRPC object.
+ Limited to MPIRPC_MAX_NAME (128) characters.
+ May not be NULL.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>char* args</term>
+ <listitem><para>
+ Short NULL-terminated string for user
+ control data arguments.
+ Copied into the MPIRPC object.
+ Limited to MPIRPC_MAX_ARGS (256) characters.
+ May be NULL.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void* extras</term>
+ <listitem><para>
+ Extra user state accessible by the proceed-function.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void (*proceed)(MPIRPC*)</term>
+ <listitem><para>
+ The proceed-function.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+
+ <section><title>The MPIRPC Object</title>
+ <para>
+ The MPIRPC object contains:
+ <variablelist>
+ <varlistentry>
+ <term>MPIRPC_Node target</term>
+ <listitem><para>
+ The target MPIRPC_Node
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>status</term>
+ <listitem><para>
+ The status of the call:
+ MPIRPC_STATUS_PROTO, MPIRPC_STATUS_CALLED,
+ or MPIRPC_STATUS_RETURNED.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>char[] name</term>
+ <listitem><para>
+ Copy of the remote procedure name.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>char[] args</term>
+ <listitem><para>
+ Copy of the user argument string.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>char* blob</term>
+ <listitem><para>
+ Pointer to the user data blob.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int blob_length</term>
+ <listitem><para>
+ Length of the user data blob.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void* result</term>
+ <listitem><para>
+ Pointer to result data returned by remote procedure
+ in fresh storage.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int result_length</term>
+ <listitem><para>
+ Length of result data.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void* extras</term>
+ <listitem><para>
+ Extra user pointer useful for proceed-function.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int unique</term>
+ <listitem><para>
+ Internal uniquifier.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>bool cancelled</term>
+ <listitem><para>
+ Not yet used.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>MPIRPC_Node target</term>
+ <listitem><para>
+ The target MPIRPC_Node
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>MPI_Request request[]</term>
+ <listitem><para>
+ Internal MPI objects.
+ Released by MPIRPC_Free().
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+ </section>
+
+ <section id="cmpi">
+ <title>C-MPI</title>
+
+ <section><title>Overview</title>
+ <para>
+ C-MPI is intended to be an easy to use MPI-based
+ distributed key/value store.
+ </para>
+ </section>
+
+ <section><title>API</title>
+ <para>
+ The C-MPI API:
+
+ <variablelist>
+ <varlistentry>
+ <term>cmpi_init()</term>
+ <listitem><para>
+ Initialize C-MPI.
+ The user must first call MPI_Init() and MPIRPC_Init().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cmpi_put()</term>
+ <listitem><para>
+ Post a key/value pair in C-MPI.
+ </para>
+ <para>
+ Arguments:
+ <variablelist>
+ <varlistentry>
+ <term>char* key</term>
+ <listitem><para>
+ NULL-terminated string key.
+ Passed as the args argument to MPIRPC_Call_blob().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void* value</term>
+ <listitem><para>
+ Variable-length user data.
+ Passed as the blob argument to MPIRPC_Call_blob().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int length</term>
+ <listitem><para>
+ Byte-length of value.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cmpi_update()</term>
+ <listitem><para>
+ Update the value of a key/value pair in C-MPI.
+ </para>
+ <para>
+ Arguments:
+ <variablelist>
+ <varlistentry>
+ <term>char* key</term>
+ <listitem><para>
+ NULL-terminated string key.
+ Passed as the args argument to MPIRPC_Call_blob().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void* value</term>
+ <listitem><para>
+ Variable-length user data.
+ Passed as the blob argument to MPIRPC_Call_blob().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int length</term>
+ <listitem><para>
+ Byte-length of value.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int offset</term>
+ <listitem><para>
+ At which point to begin overwrite.
+ Offset+length may exceed the original value length.
+ The key/value pair need not originally exist,
+ but if it does not, the offset must be 0.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>cmpi_get()</term>
+ <listitem><para>
+ Extract the value of a key/value pair into fresh storage.
+ </para>
+ <para>
+ Arguments:
+ <variablelist>
+ <varlistentry>
+ <term>char* key</term>
+ <listitem><para>
+ NULL-terminated string key.
+ Passed as the args argument to MPIRPC_Call_blob().
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>void** result</term>
+ <listitem><para>
+ Will be set to the location of the extracted data in
+ fresh storage.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>int* length</term>
+ <listitem><para>
+ Will be set to the length of the extracted data.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+ </section>
+</article>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|