grim/purple-objects-docbook
moved all of the stylesheets to sheets/
updated Makefile to create images from dot input thats created by the new stylesheets
--- a/Makefile Fri Apr 17 22:55:04 2009 -0500
+++ b/Makefile Fri Apr 17 23:03:55 2009 -0500
@@ -1,9 +1,13 @@
TRANSFORM_OPTS=--nonet --xinclude
-SHEET=purple-objects.xsl
+ sheets/purple-objects.xsl @@ -12,12 +16,13 @@
plugin-loader-objects.png \
-all: book.stamp images.stamp
+all: book.stamp images.stamp $(SHEETS) fdp -Tpng -o $(OUTPUT)$@ $<
@@ -25,8 +30,14 @@
dot -Tpng -o $(OUTPUT)$@ $<
-book.stamp: $(BOOK_SOURCES) $(SHEET)
- $(TRANSFORM) $(TRANSFORM_OPTS) -o $(OUTPUT) $(SHEET) $(BOOK)
+ $(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/enum.xsl $< + $(TRANSFORM) $(TRANSFORM_OPTS) -o $@ sheets/class.xsl $< +book.stamp: $(BOOK_SOURCES) sheets/purple-objects.xsl + $(TRANSFORM) $(TRANSFORM_OPTS) -o $(OUTPUT) sheets/purple-objects.xsl $(BOOK) --- a/class.xsl Fri Apr 17 22:55:04 2009 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text"/>
- <xsl:strip-space elements="*"/>
- <xsl:variable name="newline" select="' '"/>
- <xsl:variable name="tab" select="'	'"/>
- <xsl:variable name="newline-tab">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$tab"/>
- <!-- scope template -->
- <xsl:template name="scope">
- <xsl:when test="@scope = 'private'">
- <xsl:when test="@scope = 'public'">
- <xsl:when test="@scope = 'protected'">
- <!-- the actual matching -->
- <xsl:template match="class">
- <!-- start the diagram -->
- <xsl:text>digraph {</xsl:text>
- <xsl:value-of select="$newline-tab"/>
- <!-- set our node settings -->
- <xsl:text>node[fontname="sans", fontsize="9", shape="record", style="filled", fillcolor="lightyellow"];</xsl:text>
- <xsl:value-of select="$newline-tab"/>
- <!-- handle the beginning of the class node -->
- <xsl:text>class[label="{</xsl:text>
- <xsl:value-of select="@name"/>
- <!-- if the class is abstract, mark it as such -->
- <xsl:if test="@abstract">
- <xsl:text>\n\<\< abstract \>\></xsl:text>
- <!-- run through the properties -->
- <xsl:for-each select="properties/property">
- <xsl:call-template name="scope"/>
- <!-- now the rest of the property -->
- <xsl:value-of select="@name"/>
- <xsl:text> : </xsl:text>
- <xsl:value-of select="@type"/>
- <xsl:text>\l</xsl:text>
- <!-- run through the methods -->
- <xsl:for-each select="methods/method">
- <xsl:call-template name="scope"/>
- <!-- start the method -->
- <xsl:value-of select="@name"/>
- <!-- start the arguments -->
- <!-- run through the arguments -->
- <xsl:for-each select="argument">
- <!-- put a comment at the end of the last text if this isn't
- <xsl:if test="position() > 1">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text> : </xsl:text>
- <xsl:value-of select="@type"/>
- <!-- finish the arguments -->
- <xsl:text>\l</xsl:text>
- <!-- finish off the class node -->
- <xsl:text>}"];</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
--- a/enum.xsl Fri Apr 17 22:55:04 2009 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text"/>
- <xsl:strip-space elements="*"/>
- <xsl:variable name="newline" select="' '"/>
- <xsl:variable name="tab" select="'	'"/>
- <xsl:variable name="newline-tab">
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$tab"/>
- <xsl:template match="enumeration">
- <!-- start the diagram -->
- <xsl:text>digraph {</xsl:text>
- <xsl:value-of select="$newline-tab"/>
- <!-- set our node settings -->
- <xsl:text>node[fontname="sans", fontsize="9", shape="record", style="filled", fillcolor="lightyellow"];</xsl:text>
- <xsl:value-of select="$newline-tab"/>
- <!-- handle the beginning of the enum node -->
- <xsl:text>enum[label="{</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>\n\<\< enumeration \>\></xsl:text>
- <!-- run through all the items -->
- <xsl:for-each select="item">
- <xsl:value-of select="@name"/>
- <!-- check if we have a value and output it -->
- <xsl:text> : </xsl:text>
- <xsl:value-of select="@value"/>
- <!-- left align the item -->
- <xsl:text>\l</xsl:text>
- <!-- finish off the enum node -->
- <xsl:text>}"];</xsl:text>
- <xsl:value-of select="$newline"/>
- <xsl:value-of select="$newline"/>
--- a/purple-objects.xsl Fri Apr 17 22:55:04 2009 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <!-- import the chunked XSL stylesheet -->
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
- <!-- change some parameters -->
- <xsl:param name="chunker.ouput.indent" select="'yes'"/>
- <xsl:param name="html.ext" select="'.html'"/>
- <xsl:param name="refentry.generate.name" select="0"/>
- <xsl:param name="refentry.generate.title" select="1"/>
- <xsl:param name="use.id.as.filename" select="1"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sheets/class.xsl Fri Apr 17 23:03:55 2009 -0500
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:output method="text"/> + <xsl:strip-space elements="*"/> + <xsl:variable name="newline" select="' '"/> + <xsl:variable name="tab" select="'	'"/> + <xsl:variable name="newline-tab"> + <xsl:value-of select="$newline"/> + <xsl:value-of select="$tab"/> + <!-- scope template --> + <xsl:template name="scope"> + <xsl:when test="@scope = 'private'"> + <xsl:when test="@scope = 'public'"> + <xsl:when test="@scope = 'protected'"> + <!-- the actual matching --> + <xsl:template match="class"> + <!-- start the diagram --> + <xsl:text>digraph {</xsl:text> + <xsl:value-of select="$newline-tab"/> + <!-- set our node settings --> + <xsl:text>node[fontname="sans", fontsize="9", shape="record", style="filled", fillcolor="lightyellow"];</xsl:text> + <xsl:value-of select="$newline-tab"/> + <!-- handle the beginning of the class node --> + <xsl:text>class[label="{</xsl:text> + <xsl:value-of select="@name"/> + <!-- if the class is abstract, mark it as such --> + <xsl:if test="@abstract"> + <xsl:text>\n\<\< abstract \>\></xsl:text> + <!-- run through the properties --> + <xsl:for-each select="properties/property"> + <xsl:call-template name="scope"/> + <!-- now the rest of the property --> + <xsl:value-of select="@name"/> + <xsl:text> : </xsl:text> + <xsl:value-of select="@type"/> + <xsl:text>\l</xsl:text> + <!-- run through the methods --> + <xsl:for-each select="methods/method"> + <xsl:call-template name="scope"/> + <!-- start the method --> + <xsl:value-of select="@name"/> + <!-- start the arguments --> + <!-- run through the arguments --> + <xsl:for-each select="argument"> + <!-- put a comment at the end of the last text if this isn't + <xsl:if test="position() > 1"> + <xsl:text>, </xsl:text> + <xsl:value-of select="@name"/> + <xsl:text> : </xsl:text> + <xsl:value-of select="@type"/> + <!-- finish the arguments --> + <xsl:text>\l</xsl:text> + <!-- finish off the class node --> + <xsl:text>}"];</xsl:text> + <xsl:value-of select="$newline"/> + <xsl:value-of select="$newline"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sheets/enum.xsl Fri Apr 17 23:03:55 2009 -0500
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:output method="text"/> + <xsl:strip-space elements="*"/> + <xsl:variable name="newline" select="' '"/> + <xsl:variable name="tab" select="'	'"/> + <xsl:variable name="newline-tab"> + <xsl:value-of select="$newline"/> + <xsl:value-of select="$tab"/> + <xsl:template match="enumeration"> + <!-- start the diagram --> + <xsl:text>digraph {</xsl:text> + <xsl:value-of select="$newline-tab"/> + <!-- set our node settings --> + <xsl:text>node[fontname="sans", fontsize="9", shape="record", style="filled", fillcolor="lightyellow"];</xsl:text> + <xsl:value-of select="$newline-tab"/> + <!-- handle the beginning of the enum node --> + <xsl:text>enum[label="{</xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>\n\<\< enumeration \>\></xsl:text> + <!-- run through all the items --> + <xsl:for-each select="item"> + <xsl:value-of select="@name"/> + <!-- check if we have a value and output it --> + <xsl:text> : </xsl:text> + <xsl:value-of select="@value"/> + <!-- left align the item --> + <xsl:text>\l</xsl:text> + <!-- finish off the enum node --> + <xsl:text>}"];</xsl:text> + <xsl:value-of select="$newline"/> + <xsl:value-of select="$newline"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sheets/purple-objects.xsl Fri Apr 17 23:03:55 2009 -0500
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <!-- import the chunked XSL stylesheet --> + <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/> + <!-- change some parameters --> + <xsl:param name="chunker.ouput.indent" select="'yes'"/> + <xsl:param name="html.ext" select="'.html'"/> + <xsl:param name="refentry.generate.name" select="0"/> + <xsl:param name="refentry.generate.title" select="1"/> + <xsl:param name="use.id.as.filename" select="1"/>