Are you sure that the @target attributes are supposed to be identical to the IDs? Don’t you prepend a pound sign to @target attributes when they point to IDs within the same document? So you probably need to say where not(substring($title/@target,2) = $biblStruct) and not(substring($title/@target,2) = $biblFull) And maybe you need to restrict the titles that you search to those with a @target attribute, like so: for $title in collection('edil_target/eDIL-A.xml')//entry//title[@target] Otherwise also non-@target-bearing titles will match the where clause, which may be unintended. Gerrit On 25.03.2019 23:32, Chris Yocum wrote:
Hi Markus,
try
for $title in collection('edil_target/eDIL-A.xml')//entry//title where not($title/@target = $biblStruct) and not($title/@target = $biblFull) return $title
Thank you for the quick reply at such a late hour! However, I am getting the same results sadly. These results I can open the files and find the targets that are being return in either of the two lists.
All the best, Chris