| Some question to the write-template | 18. August 2004 |
| I have some question to the work with the write-template. For example: I have a form on my document where the user can fill in some data. Now i will generate a xml-tree in my document with this data, similar to the Forum here to save a article with all needed data What is all necesary? At first a dsssl:when where i ask where the data came from, is this correct? Now i need a mind:reply>-block? in this block is a dsssl:copy-of select="#content"-block with my Scheme-code to generate that what i want. But here is the Probleme i understand only the half of the code from the forum-code. What is nesaccray when i will at a simply xml-tree + data like the state-element for example. Here is some code i dont understand completely:
(make element gi: 'new attributes:
`((action ,(oid->string (me 'mind-action-document)))
(protection ,(right->string (me 'protection))))
(let* ((this-root (document-element (grove-root (current-node))))
(state (node-list-first (xsl-variable "state")))
(lang (or (attribute-string 'lang (node-list-first state)) "en")))
(make element
gi: (gi this-root) ns: (ns this-root)
attributes: (copy-attributes this-root)
(node-list
(make element gi: 'state ns: 'urn:editor
attributes: `((lang ,lang))
(node-list-map
(lambda (node)
(case (gi node)
((body subject content-type)
(form-field (gi node) (current-node)))...i understand only the second part wich begin at (node-list (make element gi: 'state ns: 'urn:editor but the first part is a little mystery for me. Can somebody get me out of trouble. Raphael | |
| One day with play around the write-template and i become smarter... | 19. August 2004 | |||||||