Sorry, forget it, but I'm not gonna show you that.
<!--
This control is somewhat semi-optimal. See GCAICtrl for the DSSSL way
of doing the same thing shorter way. That style sheet also uses
normal xml element to store state, while this here uses xsl variables,
which are evaluated.
This control rebuilds the currently executed style sheet
-->
<dsssl:when xmlns:dsssl="http://www.askemos.org/2000/NameSpaceDSSSL" xmlns:mind="http://www.askemos.org/2000/CoreAPI" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="
(and (eq? (me 'get 'id) (msg 'dc-creator))
(equal? (data (form-field "action" (current-node)))
"change-variable"))" version="1.0" xml:space="default">
<mind:reply>
<xsl:variable name="cn">
<dsssl:copy-of select="(current-node)"></dsssl:copy-of>
</xsl:variable>
<xsl:variable name="new-variable">
<dsssl:for-each select="
(xsl-variable (data (form-field "varnam" (current-node))))">
<dsssl:copy-of select="
(make element gi:(gi (current-node))
attributes:
(let loop ((atts (named-node-list-names
(attributes (current-node)))))
(if (null? atts)
'()
(let* ((name (car atts))
(nspace (attribute-ns name (current-node)))
(value (attribute-string name (current-node))))
(cons (list nspace name value)
(loop (cdr atts))))))
(literal (data (form-field (symbol->string (gi
(current-node)))
(xsl-variable "cn")))))"></dsssl:copy-of>
</dsssl:for-each>
</xsl:variable>
<xsl:element xmlns:nu="nu" name="stylesheet" namespace="http://www.w3.org/1999/XSL/Transform">
<xsl:attribute name="version">1.0</xsl:attribute>
<xsl:attribute name="xsl" namespace="xmlns">
<nu:q>http://www.w3.org/1999/XSL/Transform</nu:q>
</xsl:attribute>
<xsl:attribute name="rdf" namespace="xmlns">
<nu:q>http://www.w3.org/1999/02/22-rdf-syntax-ns#</nu:q>
</xsl:attribute>
<xsl:attribute name="mind" namespace="xmlns">
<nu:q>http://www.askemos.org/2000/CoreAPI</nu:q>
</xsl:attribute>
<xsl:attribute name="dsssl" namespace="xmlns">
<nu:q>http://www.askemos.org/2000/NameSpaceDSSSL</nu:q>
</xsl:attribute>
<dsssl:for-each select="
(children (document-element (grove-root (current-node))))">
<xsl:choose>
<dsssl:when test="(and
(eq? (gi (current-node)) (string->symbol "variable"))
(equal? (attribute-string "name" (current-node))
(data (form-field "varnam" (xsl-variable "cn")))))">
<xsl:element name="variable" namespace="http://www.w3.org/1999/XSL/Transform">
<xsl:attribute name="name">
<dsssl:copy-of select="
(data (form-field "varnam" (xsl-variable "cn")))"></dsssl:copy-of>
</xsl:attribute>
<dsssl:copy-of select="(xsl-variable "new-variable")"></dsssl:copy-of>
</xsl:element>
</dsssl:when>
<xsl:otherwise>
<dsssl:copy-of select="(current-node)"></dsssl:copy-of>
</xsl:otherwise>
</xsl:choose>
</dsssl:for-each>
</xsl:element>
<mind:output>
<body>
<p>Sorry, forget it, but I'm not gonna show you that.</p>
</body>
</mind:output>
</mind:reply>
</dsssl:when>
Diese Seite findet man von: overview, .