Forum Discussion

globus1987's avatar
globus1987
Occasional Contributor
13 years ago

xquery match bug and no find/replace in response

- no find/replace in response xml view
- Xquery match doesn't work
declare function local:sortAttributes($elem as node()) as node()
{
element{name($elem)} {
for $attr in $elem/@*
order by name($attr)
return
if (ends-with(string($attr),'.0'))
then attribute {name($attr)} {substring-before(string($attr),'.')}
else $attr,
for $subelem in $elem/*[name(.) != 'Attribute']
order by $subelem/@id
return local:sortAttributes($subelem),
for $a in $elem/Attribute
order by $a/@symbol
return local:sortAttributes($a),
if (count($elem/*) = 0)
then
if (ends-with(string($elem),'.0'))
then substring-before(string($elem), '.')
else string($elem)
else ()
}
};
declare function local:changeMessage($elem as node()) as node()
{
element{name($elem)} {
for $attr in $elem/@*
where name($attr) != 'line' and name($attr) != 'formula' and name($attr) != 'function'
order by name($attr)
return $attr,
string($elem)
}
};
<body>
{
for $s in //SalesProduct
order by $s/@brand
return local:sortAttributes($s),
for $m in //Message
order by $m/@object
return local:changeMessage($m)
}
</body>

It says it's valid but some parametres are different when I check old and new response in winmerge
-

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Regarding the find/replace in response xml view, we have fixed it in our internal builds and are just waiting for a few changes of our nightly build server.

    Regards

    Henrik
    SmartBear Software
  • globus1987's avatar
    globus1987
    Occasional Contributor
    Ok, nightly find option works.
    XQuery doesn't work even when I select only one value.
    It's like it compare expected value and result and it always is valid...
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    We are working on XQuery issue and we'll let you know when fix is available.

    robert
    /Smartbear
    [SOAPUI-3935]
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Please upcoming nightly build. Fix for this issue will be available there. Let us know does this work for you.

    Thanks for patience,
    robert
    /Smartbear