Hi all -
I think that I weak grasp of the practical requirements, but I'm unable to find a reference in the spec to clarify what's happening in the following:
I have a constructor:
return(
for $item in $file-list
let $item-less := replace($item, '^\d{1,}-', '')
(: returns "missing" supplemental files :)
where ($item-less[(not(. = ($files-titles, $excludes)))])
or ($item-less[(. = $files-titles)])
return(
<relatedItem>
<title>{$item-less}</title>
<mimeType>
{if ($item-less = $files-titles)
then ($content/files/file/name[. = $item-less]/following-sibling::mimetype/text())
else (fetch:content-type(concat(file:parent(document-uri($doc)),$item)))}
</mimeType>
<uri>{file:parent(document-uri($doc))}</uri>
</relatedItem>
)
)
and it works fine so long at the <relatedItem> is not namespaced. As soon as the <relatedItem> is namespaced; e.g. <relatedItem xmlns="