Thanks for that. I'm stll struggling though (perhaps cause I'm not a coder but eager to learn).
So I've created a script filter with argument required, selected php as the script language and put this (adapted from another workflow):
require_once('extension_utils.php');
$utils = new ExtensionUtils();
$query = "{query}";
$item = array(
'uid' => 'suggest ',
'arg' => 'jffk',
'title' => 'kdfkjd',
'subtitle' => 'Search Amazon UK for ',
'icon' => 'icon.png',
'valid' => 'yes'
);
echo $utils->arrayToXml($item);
If my understanding is right then the above creates the $item array and passes it to extension utils to create xml.
Then I'm linking this to output {query} to clipboard.
So when I open alfred and type "test myquery" and press enter nothing happens. From all the other examples I've looked at I should be seeing a list of the static elements inside $item, shouldn't I?
Thanks