ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: xpath query has no effect during copy
Date Mon, 20 Aug 2007 16:22:11 GMT
On 8/20/07, jbi joe <joe@daggerpoint.net> wrote:
>
>
> DID NOT work.  It does exact same as what I describe.
> Wipes out all the XML that existed and puts the value
> that I wanted to append in.
> SO my XML ends up like
> <msg>
> MY HARD CODED XML
> </msg>


As I mentioned in my previous e-mail, if you don't want the replace semantic
of assignment as defined in the BPEL spec, you can use XSL transformation.
That's mostly why the doXslTransform function has been introduced in BPEL
2.0 and that should cover your needs.

We're thinking of introducing a set of xpath functions or something along
these lines to simplify this task but for now, XSL is the solution.

Matthieu

Matthieu Riou-5 wrote:
> >
> > Hi,
> >
> > So yes, the assignment is a bit weird. First the insert attribute is not
> > part of BPEL. We've discussed of maybe implementing something along
> these
> > lines but we're still pondering other solutions so it may very well
> never
> > be
> > implemented.
> >
> > For the assignment itself, first your query element is outside of the
> <to>
> > (should be inside). Also if what you want is a literal assignment then
> you
> > should enclose your <from> in a <literal> element. So you would get
> > something like:
> >
> > <assign>
> >   <copy>
> >     <from><literal>'hardcode xml
> > value=<key>address</address>'<literal></from>
> >     <to variable="input" part="msg">
> >       <query>//*[node()='level1']</query>
> >     </to>
> >   </copy>
> > </assign>
> >
> > Note that this will still replace the content of the <level1> element.
> If
> > you want to iteratively fill up the element you'll have to use the
> > doXslTransform function with an XSL sheet. Could you also give us more
> > detail about your use case? Are you trying to add a set of elements from
> a
> > list into another set of elements? Or are your element coming one by one
> > from a service call for example?
> >
> > Thanks,
> > Matthieu
> >
> > On 8/17/07, Jackson, Douglas <djackso2@ugs.com> wrote:
> >>
> >>
> >> Hi!
> >> I don't know if what you were writing is some new 2.0 syntax or not,
> but
> >> in 1.0 you would write it like this:
> >>
> >> <to variable="input" part="msg" query="//*[node()='level1']"/>
> >> -Doug.
> >>
> >> -----Original Message-----
> >> From: jbi joe [mailto:joe@daggerpoint.net]
> >> Sent: Friday, August 17, 2007 5:21 AM
> >> To: user@ode.apache.org
> >> Subject: xpath query has no effect during copy
> >>
> >>
> >> MY XML INPUT TO BPEL
> >>
> >> <msg>
> >> <level1>
> >> <key>name</name>
> >> <value>foo</value>
> >> </level1>
> >> <level2>
> >> ...
> >> ..
> >> </level2>
> >> </msg>
> >>
> >> <assign>
> >> <copy insert="after">
> >> <from>'hardcode xml value=<key>address</address>'</from>
> >> <to variable="input" part="msg">
> >> </to>
> >> <query>//*[node()='level1']</query>
> >> </assign>
> >>
> >> ALWays clobbers my entire xml between the <msg> node and inserts the
> >> aboutve
> >> value.
> >> Anyone tell me what I have wroing?
> >> TIA
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/xpath-query-has-no-effect-during-copy-tf4284882.ht
> >> ml#a12197226
> >> Sent from the Apache Ode User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/xpath-query-has-no-effect-during-copy-tf4284882.html#a12232918
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message