88 |
|
|
89 |
<!-- Dispatch all "XUpdate Services" here. --> |
<!-- Dispatch all "XUpdate Services" here. --> |
90 |
<!-- FIXME: Actually implement action = "CREATE|RETRIEVE|UPDATE|DELETE"!!! --> |
<!-- FIXME: Actually implement action = "CREATE|RETRIEVE|UPDATE|DELETE"!!! --> |
91 |
|
|
92 |
|
<!-- |
93 |
|
xsl for XUpdate Services [2 XUpdate Syntax] [2.3 Modifications] |
94 |
|
--> |
95 |
|
|
96 |
|
<!-- xsl for [2.4 Inserts] --> |
97 |
<xsl:template match="xupdate:insert-after"> |
<xsl:template match="xupdate:insert-after"> |
98 |
<!-- <xsl:variable name="select" select="@select">Hello World!</xsl:variable> --> |
<!-- <xsl:variable name="select" select="@select">Hello World!</xsl:variable> --> |
99 |
<xsl:call-template name="findcontext"> |
<xsl:call-template name="findcontext"> |
102 |
</xsl:call-template> |
</xsl:call-template> |
103 |
</xsl:template> |
</xsl:template> |
104 |
|
|
105 |
|
<!-- xsl for [2.4 Inserts] --> |
106 |
<xsl:template match="xupdate:insert-before"> |
<xsl:template match="xupdate:insert-before"> |
107 |
<xsl:call-template name="findcontext"> |
<xsl:call-template name="findcontext"> |
108 |
<xsl:with-param name="service">Insert</xsl:with-param> |
<xsl:with-param name="service">Insert</xsl:with-param> |
110 |
</xsl:call-template> |
</xsl:call-template> |
111 |
</xsl:template> |
</xsl:template> |
112 |
|
|
113 |
|
<!-- xsl for [2.5 Append] --> |
114 |
<xsl:template match="xupdate:append"> |
<xsl:template match="xupdate:append"> |
115 |
<xsl:call-template name="findcontext"> |
<xsl:call-template name="findcontext"> |
116 |
<xsl:with-param name="service">Append</xsl:with-param> |
<xsl:with-param name="service">Append</xsl:with-param> |
119 |
</xsl:call-template> |
</xsl:call-template> |
120 |
</xsl:template> |
</xsl:template> |
121 |
|
|
122 |
|
<!-- xsl for [2.6 Update] --> |
123 |
<xsl:template match="xupdate:update"> |
<xsl:template match="xupdate:update"> |
124 |
<xsl:call-template name="findcontext"> |
<xsl:call-template name="findcontext"> |
125 |
<xsl:with-param name="service">Update</xsl:with-param> |
<xsl:with-param name="service">Update</xsl:with-param> |
128 |
</xsl:call-template> |
</xsl:call-template> |
129 |
</xsl:template> |
</xsl:template> |
130 |
|
|
131 |
|
<!-- xsl for [2.7 Remove] --> |
132 |
<xsl:template match="xupdate:remove"> |
<xsl:template match="xupdate:remove"> |
133 |
<xsl:call-template name="findcontext"> |
<xsl:call-template name="findcontext"> |
134 |
<xsl:with-param name="service">Remove</xsl:with-param> |
<xsl:with-param name="service">Remove</xsl:with-param> |
137 |
</xsl:call-template> |
</xsl:call-template> |
138 |
</xsl:template> |
</xsl:template> |
139 |
|
|
140 |
|
<!-- xsl for [2.8 Rename] --> |
141 |
<xsl:template match="xupdate:rename"> |
<xsl:template match="xupdate:rename"> |
142 |
<xsl:call-template name="findcontext"> |
<xsl:call-template name="findcontext"> |
143 |
<xsl:with-param name="service">Rename</xsl:with-param> |
<xsl:with-param name="service">Rename</xsl:with-param> |
309 |
element type seems dummy. Could this be stripped |
element type seems dummy. Could this be stripped |
310 |
shorter somehow sometimes? |
shorter somehow sometimes? |
311 |
--> |
--> |
312 |
|
|
313 |
|
<!-- |
314 |
|
xsl for [2.4 Inserts] |
315 |
|
--> |
316 |
|
|
317 |
|
<!-- xsl for [2.4.1 Creating Elements] --> |
318 |
<xsl:template match="xupdate:element"> |
<xsl:template match="xupdate:element"> |
319 |
<xsl:comment> 3.a. vivify generic node </xsl:comment> |
<xsl:comment> 3.a. vivify generic node </xsl:comment> |
320 |
<xsl:element name="xsl:element"> |
<xsl:element name="xsl:element"> |
323 |
</xsl:element> |
</xsl:element> |
324 |
</xsl:template> |
</xsl:template> |
325 |
|
|
326 |
|
<!-- xsl for [2.4.2 Creating Attributes] --> |
327 |
<xsl:template match="xupdate:attribute"> |
<xsl:template match="xupdate:attribute"> |
328 |
<xsl:comment> 3.b. vivify node attributes </xsl:comment> |
<xsl:comment> 3.b. vivify node attributes </xsl:comment> |
329 |
<xsl:element name="xsl:attribute"> |
<xsl:element name="xsl:attribute"> |
332 |
</xsl:element> |
</xsl:element> |
333 |
</xsl:template> |
</xsl:template> |
334 |
|
|
335 |
|
<!-- xsl for [2.4.3 Creating Text] --> |
336 |
<xsl:template match="xupdate:text"> |
<xsl:template match="xupdate:text"> |
337 |
<xsl:comment> 4.a. vivify text node </xsl:comment> |
<xsl:comment> 4.a. vivify text node </xsl:comment> |
338 |
<xsl:element name="xsl:text"> |
<xsl:element name="xsl:text"> |
341 |
</xsl:element> |
</xsl:element> |
342 |
</xsl:template> |
</xsl:template> |
343 |
|
|
344 |
|
<!-- xsl for [2.4.4 Creating Processing Instructions] --> |
345 |
<xsl:template match="xupdate:processing-instruction"> |
<xsl:template match="xupdate:processing-instruction"> |
346 |
<xsl:comment> 4.b. vivify PI node </xsl:comment> |
<xsl:comment> 4.b. vivify PI node </xsl:comment> |
347 |
<xsl:element name="xsl:processing-instruction"> |
<xsl:element name="xsl:processing-instruction"> |
350 |
</xsl:element> |
</xsl:element> |
351 |
</xsl:template> |
</xsl:template> |
352 |
|
|
353 |
|
<!-- xsl for [2.4.5 Creating Comments] --> |
354 |
<xsl:template match="xupdate:comment"> |
<xsl:template match="xupdate:comment"> |
355 |
<xsl:comment> 4.c. vivify comment node </xsl:comment> |
<xsl:comment> 4.c. vivify comment node </xsl:comment> |
356 |
<xsl:element name="xsl:comment"> |
<xsl:element name="xsl:comment"> |
359 |
</xsl:element> |
</xsl:element> |
360 |
</xsl:template> |
</xsl:template> |
361 |
|
|
362 |
|
|
363 |
<!-- |
<!-- |
364 |
xsl for [2.9 Variables and Values of Variables] |
xsl for [2.9 Variables and Values of Variables] |
365 |
Encapsulates block payload into a named template. |
Encapsulates block payload into a named template. |
375 |
<xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> |
<xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> |
376 |
--> |
--> |
377 |
|
|
378 |
<xsl:element name="xsl:apply-templates"> |
<xsl:choose> |
|
<xsl:attribute name="select"><xsl:value-of select="@select" /></xsl:attribute> |
|
|
</xsl:element> |
|
379 |
|
|
380 |
<!-- <xsl:value-of select="@select" /> --> |
<!-- Mode 1 [spec]: just evaluate as (sub-)selection if "select"-attribute is not empty --> |
381 |
<xsl:value-of select="." /> |
<xsl:when test="@select!="> |
382 |
|
<xsl:element name="xsl:apply-templates"> |
383 |
|
<xsl:attribute name="select"><xsl:value-of select="@select" /></xsl:attribute> |
384 |
|
</xsl:element> |
385 |
|
</xsl:when> |
386 |
|
|
387 |
|
<!-- Mode 2 [feature]: in other cases: pass thru the current node w/o any operation(s) on it --> |
388 |
|
<xsl:otherwise> |
389 |
|
<xsl:value-of select="." /> |
390 |
|
</xsl:otherwise> |
391 |
|
|
392 |
|
</xsl:choose> |
393 |
|
|
394 |
<!-- |
<!-- |
395 |
</xsl:element> |
</xsl:element> |
396 |
--> |
--> |
397 |
|
|
398 |
</xsl:element> |
</xsl:element> |
399 |
|
|
400 |
</xsl:template> |
</xsl:template> |
401 |
|
|
402 |
|
<!-- |
403 |
|
xsl for [2.9 Variables and Values of Variables] |
404 |
|
Calls encapsulated named template "Variables" |
405 |
|
for each occourance of an "xupdate:value-of" element. |
406 |
|
--> |
407 |
<xsl:template match="xupdate:value-of"> |
<xsl:template match="xupdate:value-of"> |
408 |
<xsl:comment> 5.b. vivify xsl-element "value-of" </xsl:comment> |
<xsl:comment> 5.b. vivify xsl-element "value-of" </xsl:comment> |
409 |
<xsl:element name="xsl:call-template"> |
<xsl:element name="xsl:call-template"> |
410 |
<xsl:attribute name="name">Variables</xsl:attribute> |
<xsl:attribute name="name">Variables</xsl:attribute> |
411 |
</xsl:element> |
</xsl:element> |
412 |
|
|
413 |
|
<!-- is this required any more??? --> |
414 |
<xsl:element name="xsl:value-of"> |
<xsl:element name="xsl:value-of"> |
415 |
<xsl:copy-of select="@*"/> |
<xsl:copy-of select="@*"/> |
416 |
<!-- <xsl:apply-templates /> --> |
<!-- <xsl:apply-templates /> --> |