Hi,
first of all: please do not use ft: functions, they are deprecated. Please use functions from the tf: namespace, in this case tf:containsText.
Concerning your question:
I changed the namespace, but in Tamino 4.4. this namespace is pre-declared, so you can also leave out the “declare namespace” line.
Your query is almost what you want to do, just iterate on the article level in acddition to the text node level, please see below:
declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"
for $article in input()/issue/article
for $text in $article//text
where tf:containsText($text, "politics")
return <Textfragment>{$article/@id,$text}</Textfragment>
Regards
Harald
#Tamino#webMethods#API-Management