Hi,
let $db := app:open-db($lang)
let $topic-validation := <ul>{for $x in $db/*[name()='topic' or name()='media']
return try {validate:dtd($x, $app:dtd-topic)
} catch BXVA0001 {
<li>File $x/base-uri() doesn't validate.</li>
}
}
</ul>
return $topic-validation
When everything works fine, when the content validates against the dtd, I get an empty <ul/> as expected.
However, if there is an error, the whole process stops, returns an error on the html page that indicates what the error is (but with the wrong filename(??)). Note that the filename changes everytime I run the process).
Regards,