[EMAIL PROTECTED] 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-
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.