-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocbook.local.xslt
108 lines (103 loc) · 3.52 KB
/
docbook.local.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='2.0'
xmlns:html="http://www.w3.org/TR/xhtml1/transitional"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:zenta="http://magwas.rulez.org/zenta">
<!--exclude-result-prefixes="#default" -->
<xsl:output method="xml" version="1.0" encoding="utf-8"
indent="yes" omit-xml-declaration="yes" />
<xsl:template
match="element[@xsi:type='Ada:varlistentry']" mode="elementTitle">
<xsl:value-of select="@name" />
</xsl:template>
<xsl:template
match="element[@id='basicobject']|connection[@id='basicrelation']"
mode="varlistentry" priority="4">
</xsl:template>
<!--xsl:template match="element[@xsi:type!='zenta:ZentaDiagramModel' and
@xsi:type!='zenta:SketchModel']" mode="varlistentry" priority="5"/ -->
<xsl:template
match="folder[property[@key='display']/@value='hidden']"
mode="varlist" />
<xsl:template
match="element[@xsi:type!='zenta:ZentaDiagramModel' and @xsi:type!='zenta:SketchModel']"
mode="elementDetails" priority="5">
<para>
<xsl:value-of
select="concat('Is ', zenta:articledName(//element[@id=current()/@ancestor],'no'),'.')" />
</para>
<para>
<xsl:copy-of select="documentation/(*|text())" />
</para>
<para>
<xsl:if test="value">
connections:
<itemizedlist>
<xsl:for-each select="value">
<listitem>
<xsl:variable name="atleast">
<xsl:if test="number(@minOccurs) > 0">
<xsl:value-of
select="if (number(@minOccurs) > 0) then concat('at least ',@minOccurs,' ') else ''" />
</xsl:if>
</xsl:variable>
<xsl:variable name="atmost">
<xsl:value-of
select="if (number(@maxOccurs) > 0) then concat('at most ',@maxOccurs,' ') else '' " />
</xsl:variable>
<xsl:variable name="numbers"
select="if ($atmost!='' and $atleast!='') then concat($atleast,'and ',$atmost) else concat(
$atleast,$atmost)" />
<!--xsl:value-of select="../@name"/ -->
It
<xsl:choose>
<xsl:when test="@ancestor='parameter'">
<xsl:choose>
<xsl:when test="@direction=1">
have parameter
<xsl:value-of select="@relationName" />
as
</xsl:when>
<xsl:otherwise>
is the type of parameter
<xsl:value-of select="@relationName" />
in
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when
test="@ancestor='application_component_contains' and not(@relationName='') and ../@ancestor='object'">
<xsl:choose>
<xsl:when test="@direction=1">
have field
<xsl:value-of select="@relationName" />
as
</xsl:when>
<xsl:otherwise>
is the type of field
<xsl:value-of select="@relationName" />
in
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="concat(' ',
zenta:relationName(.),' ',
if (@template='true') then $numbers else ''
)" />
</xsl:otherwise>
</xsl:choose>
<link linkend="{@target}">
<xsl:value-of select="@name" />
</link>
</listitem>
</xsl:for-each>
</itemizedlist>
</xsl:if>
</para>
</xsl:template>
</xsl:stylesheet>