Hi!
I am trying to create a complex element in an assignment without first creating 
a literal element and subsequently filling in values.

I tried an assignment like the following:

        <from>concat('&lt;c-info xmlns="http://xxx/yyy"&gt;',
                    '&lt;c-id&gt;', $unique-id, '&lt;/c-id&gt;',
                    '&lt;client-id&gt;', $client-id, '&lt;/client-id&gt;',
                    '&lt;type&gt;', 'Type', '&lt;/type&gt;',
                    '&lt;owner&gt;', $req-msg.req-part/p:r-info/p:user-name, 
'&lt;/owner&gt;',
                    '&lt;group&gt;',
                         $req-msg.req-part/p:r-info/p:group,
                    '&lt;/group&gt;',
                  '&lt;/process-info&gt;')</from>

But Ode interpreted it as:

<?xml version="1.0" encoding="UTF-8"?>
<c-info xmlns="http://xxx/yyy";>&lt;c-info 
xmlns="http://xxx/yyy"&gt;&lt;c-id&gt;1232736236359-63&lt;/c-id&gt;&lt;client-id&gt;cmid&lt;/client-id&gt;&lt;type&gt;Type&lt;/type&gt;&lt;owner&gt;fred&lt;/owner&gt;&lt;group&gt;cgroup&lt;/group&gt;&lt;/c-info&gt;</c-info>
This would expand to a lot of code with literal + replacement...

I guess I could write an extension function that would convert the string to a 
node...

Ode could add a new form of <from> like <literal-with-replacement> that allowed 
the variables to be substituted. :)
-Doug.


Reply via email to