Hi Gerrit,
Are you sure that the @target attributes are supposed to be identical to the IDs?
Yes, they should be. If they are not, I need to find them so I can fix them to be identical.
Don’t you prepend a pound sign to @target attributes when they point to IDs within the same document?
They are not in the same document. The @target attributes live spread out in the other documents while the IDs all live in the same document.
So you probably need to say
where not(substring($title/@target,2) = $biblStruct) and not(substring($title/@target,2) = $biblFull)
I will give this a shot tomorrow when I am not as tired.
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]
This is the other half of the problem which I did not state here. I am to find all titles that do not have target attributes then give them a target attribute based on some rules. I have done so in a few files (and I explicitly testing one of them in the query in my previous email) and I will roll out the fix in all other files once I have everything else tested and working.
I will give your suggestion a try tomorrow. Thanks!
All the best, Chris