TakeoverCtrl

;; Low level API operation here. (This is a comment. BTW?.) ;; We send a "set this protection" request to the object. (let ((target (owner me find (parsed-locator (data (form-field "what" (current-node))))))) ;; The above way we can get the object id, if we can read along the path. ;; Once we have the id, we can send a direct message, even if we can't ;; write along the given path. This implements the most usual situation, ;; where the path goes through a public channel. ((me 'get 'sender) to: target type: 'write 'location '() 'body/parsed-xml (make element gi: 'form ns: 'mind attributes: '() (node-list (make element gi: 'action ns: 'mind attributes: '() (literal "protect")) (make element gi: 'challenge ns: 'mind attributes: '() (literal (oid->string (me 'get 'id))))))) (oid->string target))

Source code:

<mind:reply xmlns:dsssl="http://www.askemos.org/2000/NameSpaceDSSSL" xmlns:mind="http://www.askemos.org/2000/CoreAPI" xmlns:nu="nu" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <dsssl:copy-of select="(grove-root (current-node))"></dsssl:copy-of>
<!--  no change  -->
 <mind:link name="last">
  <mind:id>
<!-- 

 If your're here trying to learn how this should be done: shut your
 eyes.  This KLUDGE is to be replaced and will become impossible.
 What you can learn here is, how the escape route into to the basic API
 looks alike.  Never assume this route beeing working for quality code.

  -->
   <dsssl:copy-of select="#CONTENT">
;; Low level API operation here.  (This is a comment. BTW.)
;; We send a "set this protection" request to the object.
(let ((target (owner me find (parsed-locator
                              (data (form-field "what" (current-node)))))))
;; The above way we can get the object id, if we can read along the path.
;; Once we have the id, we can send a direct message, even if we can't
;; write along the given path.  This implements the most usual situation,
;; where the path goes through a public channel.
   ((me 'get 'sender)
    to: target type: 'write
    'location '()
    'body/parsed-xml
    (make element gi: 'form ns: 'mind attributes: '()
      (node-list
       (make element gi: 'action ns: 'mind attributes: '() (literal "protect"))
       (make element gi: 'challenge ns: 'mind attributes: '()
        (literal (oid-&gt;string (me 'get 'id)))))))
   (oid-&gt;string target))
      </dsssl:copy-of>
  </mind:id>
 </mind:link>
 <mind:output method="text/xml"></mind:output>
</mind:reply>

Diese Seite findet man von: MetaCtrl, overview, .




Letzte Modifikation: Fri, 07 Feb 2003 15:29:24 +0100

Autor(en): jfw,

Dokument Nummer A67bb0753e1676f81983e0ecf3a15b391 geliefert an public um Fri, 22 Aug 2008 00:05:06 +0200