xquery

I would like to replace only element different from something…

update replace input()/myelement//el_to_replace[different from value] with <el_to_replace>newvalue</el_to_replace>

How can i express different from value in this query?
Eg.

ckdjfk
hello
bye
i wold like to replace all element DIFFERENT from hello
so that it results
newvalue
hello
newvalue

BRGS,
@nto

Hello,
you can use

update replace input()/myelement//el_to_replace[. = “oldvalue”] with <el_to_replace>newvalue</el_to_replace>

or better

update
for $i in input()/myelement//el_to_replace
where $i eq "oldvalue"
do replace $i with <el_to_replace>newvalue</el_to_replace>

Best regards
Walter

Hello @nto, Hello Walter,

here is an update query that I cooked up from both of your postings:

   declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
   update 
   for $i in input()/d/*/text()
   where $i ne "hello"
   do replace $i with tf:createTextNode("newvalue")</pre><BR>I used a document which looked like this before the update:<BR><pre class="ip-ubbcode-code-pre">   <d>
      <a>ckdjfk</a>
      <b>hello</b>
      <c>bye</c>
   </d></pre><BR>After the update it was:<BR><pre class="ip-ubbcode-code-pre">   <d>
      <a>newvalue</a> 
      <b>hello</b>
      <c>newvalue</c> 
   </d>


Greetings,
Trevor.