You operate with full rights, usually that's dangerously too much.
Id:
Right:
You operate with full rights, usually that's dangerously too much.
|
|
<xsl:stylesheet 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" version="1.0" xml:space="default">
<persons>
<person id="mue">
<mind:id>A00000000000000000000000000000011</mind:id>
<name>Müller</name>
<firstname>Frank</firstname>
<rights>
<mind:right>
<mind:id>A00000000000000000000000000000000</mind:id>
</mind:right>
</rights>
</person>
</persons>
<roles>
<role id="private">
<mind:right>
<mind:id>A00000000000000000000000000000000</mind:id>
</mind:right>
<description>Always unreadable except for me.</description>
</role>
</roles>
<xsl:variable name="role-schema">
<role id="none">
<mind:right></mind:right>
<description></description>
</role>
</xsl:variable>
<xsl:variable name="schema">
<person id="none">
<mind:id></mind:id>
<name></name>
<firstname></firstname>
<rights></rights>
</person>
</xsl:variable>
<xsl:variable name="persons">
<dsssl:copy-of select="
(children
(select-elements (children (grove-root (current-node))) 'persons)) "></dsssl:copy-of>
</xsl:variable>
<xsl:variable name="roles">
<dsssl:copy-of select="
(children
(select-elements (children (grove-root (current-node))) 'roles)) "></dsssl:copy-of>
</xsl:variable>
<xsl:template match="*[@type="read"]">
<xsl:choose>
<dsssl:when test="(and (is-meta-form? msg) (service-level))">
<!--
TODO granted, this MUST be hidden! -->
<dsssl:copy-of select="(cdr (assq 'body/parsed-xml (car (metaview me msg))))"></dsssl:copy-of>
</dsssl:when>
<dsssl:when test="(and (pair? (msg 'destination))
(equal? (car (msg 'destination))
"roles"))">@RoleForm</dsssl:when>
<xsl:otherwise>@GCAIForm</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*[@type="write"]">
<xsl:choose>
<dsssl:when test="(and (service-level) (is-meta-form? msg))">
<xsl:choose>@ChangeCtrl@ProtectCtrl</xsl:choose>
</dsssl:when>
<dsssl:when test="
(and (service-level (me 'get 'id))
(equal? (data (form-field 'action (current-node)))
"change-entry"))">@GCAICtrl</dsssl:when>
<dsssl:when test="
(and (service-level (me 'get 'id))
(equal? (data (form-field 'action (current-node)))
"change-role"))">@RoleCtrl</dsssl:when>
<xsl:otherwise>
<dsssl:copy-of select="(error "request not understood")"></dsssl:copy-of>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
;;; Local Variables: ***
;;; mode: dsssl ***
;;; End: ***
-->
</xsl:stylesheet>
Diese Seite findet man von: overview, .