grim/guifications3
Clone
Summary
Browse
Changes
Graph
moved guifications-daemon to the new GFLIB_PROJECT macro
cmake
2010-12-14, Gary Kramlich
81b6eb60b38d
moved guifications-daemon to the new GFLIB_PROJECT macro
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version=
"1.1"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
>
<xsl:import
href=
"common.xsl"
/>
<!-- node attribute template -->
<xsl:template
name=
"node_attribute"
>
<xsl:param
name=
"key"
/>
<xsl:param
name=
"value"
/>
<xsl:text
>
</xsl:text>
<xsl:value-of
select=
"$key"
/>
<xsl:text
>
="
</xsl:text>
<xsl:value-of
select=
"$value"
/>
<xsl:text
>
"
</xsl:text>
</xsl:template>
<!-- color template -->
<xsl:template
name=
"color"
>
<xsl:param
name=
"color"
/>
<xsl:call-template
name=
"node_attribute"
>
<xsl:with-param
name=
"key"
>
fillcolor
</xsl:with-param>
<xsl:with-param
name=
"value"
select=
"$color"
/>
</xsl:call-template>
</xsl:template>
<!-- shape template -->
<xsl:template
name=
"shape"
>
<xsl:param
name=
"shape"
/>
<xsl:call-template
name=
"node_attribute"
>
<xsl:with-param
name=
"key"
>
shape
</xsl:with-param>
<xsl:with-param
name=
"value"
select=
"$shape"
/>
</xsl:call-template>
</xsl:template>
<!-- style template -->
<xsl:template
name=
"style"
>
<xsl:param
name=
"style"
/>
<xsl:call-template
name=
"node_attribute"
>
<xsl:with-param
name=
"key"
>
style
</xsl:with-param>
<xsl:with-param
name=
"value"
select=
"$style"
/>
</xsl:call-template>
</xsl:template>
<!-- object template -->
<xsl:template
name=
"object"
>
<xsl:value-of
select=
"@name"
/>
<xsl:text
>
[
</xsl:text>
<!-- check for label -->
<xsl:if
test=
"@label"
>
<xsl:call-template
name=
"node_attribute"
>
<xsl:with-param
name=
"key"
>
label
</xsl:with-param>
<xsl:with-param
name=
"value"
select=
"@label"
/>
</xsl:call-template>
</xsl:if>
<!-- handle the color attribute -->
<xsl:if
test=
"@color"
>
<xsl:call-template
name=
"color"
>
<xsl:with-param
name=
"color"
select=
"@color"
/>
</xsl:call-template>
</xsl:if>
<!-- handle the shape attribute -->
<xsl:if
test=
"@shape"
>
<xsl:call-template
name=
"shape"
>
<xsl:with-param
name=
"shape"
select=
"@shape"
/>
</xsl:call-template>
</xsl:if>
<!-- handle the style attribute -->
<xsl:if
test=
"@style"
>
<xsl:call-template
name=
"style"
>
<xsl:with-param
name=
"style"
select=
"@style"
/>
</xsl:call-template>
</xsl:if>
<xsl:text
>
];
</xsl:text>
<xsl:value-of
select=
"$newline-tab"
/>
</xsl:template>
<!-- relation template -->
<xsl:template
name=
"relation"
>
<xsl:value-of
select=
"@start"
/>
<xsl:text
>
-
>
</xsl:text>
<xsl:value-of
select=
"@end"
/>
<xsl:if
test=
"@label"
>
<xsl:text
>
[label="
</xsl:text>
<xsl:value-of
select=
"@label"
/>
<xsl:text
>
"]
</xsl:text>
</xsl:if>
<xsl:text
>
;
</xsl:text>
<xsl:value-of
select=
"$newline-tab"
/>
</xsl:template>
<!-- objects template, this allows us to use multiple objects tags -->
<xsl:template
name=
"objects"
>
<!-- set our global node settings -->
<xsl:text
>
node[fontname="sans",
fontsize="9",
style="filled"
</xsl:text>
<!-- handle the color attribute -->
<xsl:if
test=
"@color"
>
<xsl:call-template
name=
"color"
>
<xsl:with-param
name=
"color"
select=
"@color"
/>
</xsl:call-template>
</xsl:if>
<!-- handle the shape attribute -->
<xsl:if
test=
"@shape"
>
<xsl:call-template
name=
"shape"
>
<xsl:with-param
name=
"shape"
select=
"@shape"
/>
</xsl:call-template>
</xsl:if>
<!-- handle the style attribute -->
<xsl:if
test=
"@style"
>
<xsl:call-template
name=
"style"
>
<xsl:with-param
name=
"style"
select=
"@style"
/>
</xsl:call-template>
</xsl:if>
<!-- close off our line -->
<xsl:text
>
];
</xsl:text>
<xsl:value-of
select=
"$newline"
/>
<xsl:value-of
select=
"$newline-tab"
/>
<xsl:for-each
select=
"object"
>
<xsl:call-template
name=
"object"
/>
</xsl:for-each>
</xsl:template>
<!-- main template -->
<xsl:template
match=
"digraph"
>
<!-- start the diagram -->
<xsl:text
>
digraph
{
</xsl:text>
<xsl:value-of
select=
"$newline-tab"
/>
<!-- output some basic stuff -->
<!-- don't set a label if we don't have one -->
<xsl:if
test=
"@name"
>
<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:if>
<xsl:text
>
concentrate=true;
</xsl:text>
<xsl:value-of
select=
"$newline-tab"
/>
<xsl:text
>
splines=true;
</xsl:text>
<xsl:value-of
select=
"$newline-tab"
/>
<xsl:text
>
overlap=false;
</xsl:text>
<xsl:value-of
select=
"$newline-tab"
/>
<xsl:text
>
rankdir="tb";
</xsl:text>
<xsl:value-of
select=
"$newline"
/>
<xsl:value-of
select=
"$newline-tab"
/>
<!-- run through our objects -->
<xsl:for-each
select=
"objects"
>
<xsl:call-template
name=
"objects"
/>
</xsl:for-each>
<xsl:value-of
select=
"$newline-tab"
/>
<!-- run through our relations -->
<xsl:for-each
select=
"relations/relation"
>
<xsl:call-template
name=
"relation"
/>
</xsl:for-each>
<!-- finish up -->
<xsl:value-of
select=
"$newline"
/>
<xsl:text
>
}
</xsl:text>
<xsl:value-of
select=
"$newline"
/>
</xsl:template>
</xsl:stylesheet>