Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: disappearing data?

From: joel::neely::fedex::com at: 13-Nov-2000 4:42

[rebol-bounce--rebol--com] wrote:
> Why is the translate-message/markup-data function "reusable" in the > following code.... >
Because the first thing that Markup-Data does is reset Xml-Tags to the beginning of the literal block that follows.
> translate-message: make object! [ > > markup-data: func [ > data [object!] > ][ > xml-tags: [ > ["author" "/author"] > ["subject" "/subject"] > ["date" "/date"] > ["content" "/content"] > ["messageID" "/messageID"] > ] > data-object: make data [] > object-data: next first data-object > output: "" > for x 1 (length? xml-tags) 1 [ > item: reform [rejoin ["data-object" "/" (first object-data)]] > made-tag: rejoin ["" (build-tag [(xml-tags/1/1)]) (do item) > (build-tag [(xml-tags/1/2)])] > xml-tags: next xml-tags > object-data: next object-data > append output made-tag > output > ] > ] > ] > > BUT not in the following code... >
See previous message. The object! version is not causing Xml-Tags to be reset to the beginning of the series. It is initialized at object creation, modified the first time through the function, and then never reset to the beginning. -jn-