source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/IHS BMX Framework/IndianHealthService.BMXNet.Doc/Help/Presentation/Shared/transforms/utilities_dduexml.xsl@ 1146

Last change on this file since 1146 was 1146, checked in by Sam Habiel, 13 years ago

Initial Import of BMX4

File size: 7.7 KB
Line 
1<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
3 xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:mshelp="http://msdn.microsoft.com/mshelp" >
6
7 <!-- sections -->
8
9 <xsl:template match="ddue:summary">
10 <div class="summary">
11 <xsl:apply-templates />
12 </div>
13 </xsl:template>
14
15 <xsl:template match="@address">
16 <a name="{string(.)}" />
17 </xsl:template>
18
19 <!-- block elements -->
20
21 <xsl:template match="ddue:para">
22 <p><xsl:apply-templates /></p>
23 </xsl:template>
24
25 <xsl:template match="ddue:list">
26 <xsl:choose>
27 <xsl:when test="@class='bullet'">
28 <ul>
29 <xsl:apply-templates select="ddue:listItem" />
30 </ul>
31 </xsl:when>
32 <xsl:when test="@class='ordered'">
33 <ol>
34 <xsl:apply-templates select="ddue:listItem" />
35 </ol>
36 </xsl:when>
37 <xsl:otherwise>
38 <span class="processingError">Unknown List Class</span>
39 </xsl:otherwise>
40 </xsl:choose>
41 </xsl:template>
42
43 <xsl:template match="ddue:listItem">
44 <li>
45 <xsl:apply-templates />
46 </li>
47 </xsl:template>
48
49 <!-- inline elements -->
50
51 <xsl:template match="ddue:parameterReference">
52 <xsl:if test="normalize-space(.)">
53 <span class="parameter" sdata="paramReference">
54 <xsl:value-of select="." />
55 </span>
56 </xsl:if> </xsl:template>
57
58 <xsl:template match="ddue:ui">
59 <xsl:if test="normalize-space(.)">
60 <span class="ui"><xsl:value-of select="." /></span>
61 </xsl:if>
62 </xsl:template>
63
64 <xsl:template match="ddue:userInput | ddue:userInputLocalizable">
65 <xsl:if test="normalize-space(.)">
66 <span class="input"><xsl:value-of select="." />
67 </span>
68 </xsl:if>
69 </xsl:template>
70
71 <xsl:template match="ddue:newTerm">
72 <xsl:if test="normalize-space(.)">
73 <span class="term"><xsl:value-of select="." /></span>
74 </xsl:if>
75 </xsl:template>
76
77 <xsl:template match="ddue:math">
78 <xsl:if test="normalize-space(.)">
79 <span class="math"><xsl:value-of select="." /></span>
80 </xsl:if>
81 </xsl:template>
82
83 <xsl:template match="ddue:codeInline">
84 <xsl:if test="normalize-space(.)">
85 <span class="code"><xsl:value-of select="." /></span>
86 </xsl:if>
87 </xsl:template>
88
89 <xsl:template match="ddue:subscript | ddue:subscriptType">
90 <xsl:if test="normalize-space(.)">
91 <sub><xsl:value-of select="." /></sub>
92 </xsl:if>
93 </xsl:template>
94
95 <xsl:template match="ddue:superscript | ddue:superscriptType">
96 <xsl:if test="normalize-space(.)">
97 <sup><xsl:value-of select="." /></sup>
98 </xsl:if>
99 </xsl:template>
100
101 <xsl:template match="ddue:legacyBold">
102 <xsl:if test="normalize-space(.)">
103 <b><xsl:apply-templates /></b>
104 </xsl:if>
105 </xsl:template>
106
107 <xsl:template match="ddue:legacyItalic">
108 <xsl:if test="normalize-space(.)">
109 <i><xsl:apply-templates /></i>
110 </xsl:if>
111 </xsl:template>
112
113 <xsl:template match="ddue:legacyUnderline">
114 <xsl:if test="normalize-space(.)">
115 <u><xsl:apply-templates /></u>
116 </xsl:if>
117 </xsl:template>
118
119 <xsl:template match="ddue:embeddedLabel">
120 <xsl:if test="normalize-space(.)">
121 <span class="label"><xsl:value-of select="." /></span>
122 </xsl:if>
123 </xsl:template>
124
125 <xsl:template match="ddue:quote">
126 <xsl:if test="normalize-space(.)">
127 <blockQuote><xsl:apply-templates/></blockQuote>
128 </xsl:if>
129 </xsl:template>
130
131 <xsl:template match="ddue:quoteInline">
132 <xsl:if test="normalize-space(.)">
133 <q><xsl:apply-templates/></q>
134 </xsl:if>
135 </xsl:template>
136
137 <xsl:template match="ddue:date">
138 <xsl:apply-templates/>
139 </xsl:template>
140
141 <xsl:template match="ddue:foreignPhrase">
142 <xsl:if test="normalize-space(.)">
143 <span class="foreignPhrase"><xsl:apply-templates/></span>
144 </xsl:if>
145 </xsl:template>
146
147 <xsl:template match="ddue:phrase">
148 <xsl:apply-templates/>
149 </xsl:template>
150
151 <xsl:template match="ddue:system">
152 <xsl:if test="normalize-space(.)">
153 <b><xsl:apply-templates/></b>
154 </xsl:if>
155 </xsl:template>
156
157 <xsl:template match="ddue:placeholder">
158 <xsl:if test="normalize-space(.)">
159 <span class="placeholder"><xsl:apply-templates/></span>
160 </xsl:if>
161 </xsl:template>
162
163 <xsl:template match="ddue:copyright">
164 <p>
165 &amp;copyright; <xsl:value-of select="holder"/> <xsl:value-of select="trademark"/>
166 <xsl:for-each select="year">
167 <xsl:value-of select="."/>
168 </xsl:for-each>
169 </p>
170 </xsl:template>
171
172 <xsl:template match="ddue:corporation">
173 <xsl:apply-templates/>
174 </xsl:template>
175
176 <xsl:template match="ddue:country">
177 <xsl:apply-templates/>
178 </xsl:template>
179
180 <xsl:template match="ddue:unmanagedCodeEntityReference">
181 <xsl:if test="normalize-space(.)">
182 <b><xsl:apply-templates/></b>
183 </xsl:if>
184 </xsl:template>
185
186 <xsl:template match="ddue:localizedText">
187 <xsl:apply-templates/>
188 </xsl:template>
189
190 <!-- links -->
191
192 <xsl:template match="ddue:externalLink">
193 <a>
194 <xsl:attribute name="href"><xsl:value-of select="ddue:linkUri" /></xsl:attribute>
195 <xsl:value-of select="ddue:linkText" />
196 </a>
197 </xsl:template>
198
199 <xsl:template match="ddue:link">
200 <span sdata="link">
201 <xsl:choose>
202 <xsl:when test="starts-with(@xlink:href,'#')">
203 <!-- in-page link -->
204 <a href="{@xlink:href}">
205 <xsl:apply-templates />
206 </a>
207 </xsl:when>
208 <xsl:otherwise>
209 <!-- verified, external link -->
210 <conceptualLink target="{@xlink:href}">
211 <xsl:apply-templates />
212 </conceptualLink>
213 </xsl:otherwise>
214 </xsl:choose>
215 </span>
216 </xsl:template>
217
218 <xsl:template match="ddue:legacyLink">
219 <xsl:choose>
220 <xsl:when test="starts-with(@xlink:href,'#')">
221 <!-- in-page link -->
222 <a href="{@xlink:href}">
223 <xsl:apply-templates />
224 </a>
225 </xsl:when>
226 <xsl:otherwise>
227 <!-- unverified, external link -->
228 <mshelp:link keywords="{@xlink:href}" tabindex="0">
229 <xsl:apply-templates />
230 </mshelp:link>
231 </xsl:otherwise>
232 </xsl:choose>
233 </xsl:template>
234
235 <xsl:template match="ddue:codeEntityReference">
236 <span sdata="cer" target="{string(.)}">
237 <referenceLink target="{string(.)}">
238 <xsl:if test="@qualifyHint">
239 <xsl:attribute name="show-container">
240 <xsl:value-of select="@qualifyHint" />
241 </xsl:attribute>
242 <xsl:attribute name="show-parameters">
243 <xsl:value-of select="@qualifyHint" />
244 </xsl:attribute>
245 </xsl:if>
246 <xsl:if test="@autoUpgrade">
247 <xsl:attribute name="prefer-overload">
248 <xsl:value-of select="@autoUpgrade" />
249 </xsl:attribute>
250 </xsl:if>
251 </referenceLink>
252 </span>
253 </xsl:template>
254 <!-- capture authored glossary <link> nodes -->
255 <!-- LEAVE THIS TEMPORARILY to support oldstyle GTMT link tagging -->
256 <xsl:template match="ddue:link[starts-with(.,'GTMT#')]">
257 <!-- not supporting popup definitions; just show the display text -->
258 <span sdata="link">
259 <xsl:value-of select="substring-after(.,'GTMT#')"/>
260 </span>
261 </xsl:template>
262
263 <!-- capture authored glossary <link> nodes -->
264 <!-- THIS IS THE NEW STYLE GTMT link tagging -->
265 <xsl:template match="ddue:legacyLink[starts-with(@xlink:href,'GTMT#')]">
266 <!-- not supporting popup definitions; just show the display text -->
267 <xsl:value-of select="."/>
268 </xsl:template>
269
270 <!-- fail if any unknown elements are encountered -->
271<!--
272 <xsl:template match="*">
273 <xsl:message terminate="yes">
274 <xsl:text>An unknown element was encountered.</xsl:text>
275 </xsl:message>
276 </xsl:template>
277-->
278
279
280</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.