diff options
author | Mike Gerwitz <gerwitm@lovullo.com> | 2016-07-05 15:36:41 -0400 |
---|---|---|
committer | Mike Gerwitz <gerwitm@lovullo.com> | 2016-07-06 00:16:11 -0400 |
commit | bcf1e0457fc3f8a41d9c8e7692228b33649d777a (patch) | |
tree | 53b91859f7c8d12b7b438b78a683efbad929b0e5 /src | |
parent | 551e489c5fdbee5057b27d665ed0a3ab1751b901 (diff) | |
download | tame-bcf1e0457fc3f8a41d9c8e7692228b33649d777a.tar.gz tame-bcf1e0457fc3f8a41d9c8e7692228b33649d777a.tar.bz2 tame-bcf1e0457fc3f8a41d9c8e7692228b33649d777a.zip |
Move graph:dep-lookup into Package Subgraphs subsection
* src/graph.xsl (graph:dep-lookup): Moved into subsection with
introductory paragraph.
Diffstat (limited to 'src')
-rw-r--r-- | src/graph.xsl | 88 |
1 files changed, 56 insertions, 32 deletions
diff --git a/src/graph.xsl b/src/graph.xsl index 387d183..0a80861 100644 --- a/src/graph.xsl +++ b/src/graph.xsl @@ -52,38 +52,6 @@ --> <!-- - Retrieve dependenices for @var{$symbol} on the @var{$graph}, - using the lookup function @var{$lookup} to resolve external - subgraphs. - @var{$lookup} will be used only if the symbol cannot be - found in @var{$graph}, - in which case the result of @var{$lookup} will used used in a - recursive call as the new @var{$graph}. - - From a graph perspective, - the dependencies are edges on the @var{$symbol} vertex. ---> -<function name="graph:dep-lookup" as="element( preproc:sym-dep )?"> - <param name="symbol" as="element( preproc:sym )" /> - <param name="graph" as="element( preproc:sym-deps )" /> - <param name="lookup" /> - - <variable name="deps" as="element( preproc:sym-dep )?" - select="$graph/preproc:sym-dep - [ @name = $symbol/@name ]" /> - - <sequence select="if ( exists( $deps ) ) then - $deps - else if ( $lookup ) then - graph:dep-lookup( $symbol, - f:apply( $lookup, $symbol ), - $lookup ) - else - ()" /> -</function> - - -<!-- Produce a new graph that is the transpose of @var{$graph}@mdash{}that is, the graph @var{$graph} with the direction of all of its edges @@ -190,4 +158,60 @@ </preproc:sym-deps> </function> + +<!-- +@menu +* Package Subgraphs:: Managing package dependencies +@end menu +--> + +<!-- + @node Package Subgraphs + @subsection Package Subgraphs + + Each package has its own independent dependency graph. + These vertices may have @dfn{virtual edges} to other packages' + graphs@mdash{}edges that will be formed once combined the + referenced graph; + these edges are indicated with @code{preproc:sym-ref/@@src}. + + Graph operations are usually performed on single packages, + but it is occionally necessary to traverse packages to recurisvely + resolve dependencies. + @ref{graph:dep-lookup} makes this easy: + + TODO: Generic graph functions. +--> + +<!-- + Retrieve dependenices for @var{$symbol} on the @var{$graph}, + using the lookup function @var{$lookup} to resolve external + subgraphs. + @var{$lookup} will be used only if the symbol cannot be found in + @var{$graph}, + in which case the result of @var{$lookup} will used used in a + recursive call as the new @var{$graph}. + + From a graph perspective, + the dependencies are edges on the @var{$symbol} vertex. +--> +<function name="graph:dep-lookup" as="element( preproc:sym-dep )?"> + <param name="symbol" as="element( preproc:sym )" /> + <param name="graph" as="element( preproc:sym-deps )" /> + <param name="lookup" /> + + <variable name="deps" as="element( preproc:sym-dep )?" + select="$graph/preproc:sym-dep + [ @name = $symbol/@name ]" /> + + <sequence select="if ( exists( $deps ) ) then + $deps + else if ( $lookup ) then + graph:dep-lookup( $symbol, + f:apply( $lookup, $symbol ), + $lookup ) + else + ()" /> +</function> + </stylesheet> |