--- a/graphs/objects.key Thu Apr 30 21:13:52 2009 -0500
+++ b/graphs/objects.key Thu Apr 30 21:27:58 2009 -0500
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hierarchy name="Object Key">
<object name="AbstractClass" type="abstract"/>
<object name="ConcreteClass" type="concrete"/>
--- a/graphs/relationships.key Thu Apr 30 21:13:52 2009 -0500
+++ b/graphs/relationships.key Thu Apr 30 21:27:58 2009 -0500
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hierarchy name="Relationship Key">
<object name="Abstract" type="abstract"/>
<object name="Concrete" type="concrete"/>
--- a/sheets/hierarchy.xsl Thu Apr 30 21:13:52 2009 -0500
+++ b/sheets/hierarchy.xsl Thu Apr 30 21:27:58 2009 -0500
@@ -6,11 +6,23 @@
<xsl:variable name="concrete-color" select="'lightpink'"/>
<xsl:variable name="interface-color" select="'powderblue'"/>
<xsl:variable name="boxed-color" select="'lightyellow'"/>
+ <!-- relation templates --> + <xsl:template name="relation.is-a"> + <xsl:text>[arrowhead="onormal"];</xsl:text> - <xsl:variable name="default-arrow" select="'normal'"/>
- <xsl:variable name="is-a-arrow" select="'onormal'"/>
- <xsl:variable name="has-a-arrow" select="'odiamond'"/>
- <xsl:variable name="implements-arrow" select="'odot'"/>
+ <xsl:template name="relation.has-a"> + <xsl:text>[arrowhead="odiamond"];</xsl:text> + <xsl:template name="relation.implements"> + <xsl:text>[arrowhead="odot"];</xsl:text> + <xsl:template name="relation.default"> + <xsl:text>[arrowhead="normal"];</xsl:text> <xsl:template name="object">
@@ -66,27 +78,22 @@
<xsl:value-of select="@end"/>
- <xsl:text>[arrowhead="</xsl:text>
<xsl:when test="@type = 'is-a'">
- <xsl:value-of select="$is-a-arrow"/>
+ <xsl:call-template name="relation.is-a"/> <xsl:when test="@type = 'has-a'">
- <xsl:value-of select="$has-a-arrow"/>
+ <xsl:call-template name="relation.has-a"/> <xsl:when test="@type = 'implements'">
- <xsl:value-of select="$implements-arrow"/>
+ <xsl:call-template name="relation.implements"/> - <xsl:value-of select="$default-arrow"/>
+ <xsl:call-template name="relation.default"/>
- <xsl:text>"]</xsl:text>
<xsl:value-of select="$newline-tab"/>
@@ -97,13 +104,17 @@
<xsl:value-of select="$newline-tab"/>
<!-- output some basic stuff -->
- <xsl:text>label="</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>";</xsl:text>
- <xsl:value-of select="$newline-tab"/>
- <xsl:text>labelloc="t";</xsl:text>
- <xsl:value-of select="$newline-tab"/>
+ <!-- don't set a label if we don't have one --> + <xsl:text>label="</xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>";</xsl:text> + <xsl:value-of select="$newline-tab"/> + <xsl:text>labelloc="t";</xsl:text> + <xsl:value-of select="$newline-tab"/> <xsl:text>splines=true;</xsl:text>
<xsl:value-of select="$newline-tab"/>
--- a/xml/graphs.xml Thu Apr 30 21:13:52 2009 -0500
+++ b/xml/graphs.xml Thu Apr 30 21:27:58 2009 -0500
@@ -2,44 +2,39 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
- <title>All about the graphs</title>
+ <title>About the graphs</title> There are many graphs in use in this document. All of the graphs
- are generated by the graphviz package.
+ are generated by the tools in the graphviz package.
+ All object and interfaces are represented by a rectangle. The color is + used to describe the type of object. We see that In + <xref linkend="key-objects"/> abstract classes are pale green, concrete + classes are light pink, and interfaces are powder blue. + <figure id="key-objects"> <title>Object Key</title>
- <imagedata fileref="graphs/objects.png"/>
+ <graphic fileref="graphs/objects.png"/>
- All object and interfaces are represented by a rectangle. The
- color is used to describe the type of object. In the key above
- we see that abstract classes are pale green, concrete classes
- are light pink, and interfaces are powder blue.
+ Similar to the object key, the <xref linkend="key-relationships"/> + shows how objects relate to one another. Subclasses point to their + parent class with an open arrow. Classes that implement interfaces + point to the interface they're implementing with an open circle. + Classes that have an instance of another class, are pointed to by that + class with an open diamond.
+ <figure id="key-relationships"> <title>Relationship Key</title>
- <imagedata fileref="graphs/relationships.png"/>
- Similar to the object key, the relationship key shows how
- objects relate to one another. Subclasses point to their
- parent class with a solid line with an open arrow. Classes
- that implement interfaces point to the interface they're
- implementing with a dotted line with an open circle. Classes
- that have an instance of another class, are pointed to by that
- class with an open diamond.
+ <graphic fileref="graphs/relationships.png"/>