validate XML files in eXist collection

Hi, I've setup a connection with eXist in oXygen 9.0. I can open files, edit them, run xqueries, etc. However, I was wondering: it is possible to validate all XML documents in a collection? Preferably against an external XML Schema. Thanks in advance, Joris

Dear Joris, Thank you for contacting us. Unfortunately batch validation of all XML documents in a collection is not yet possible. We will add a feature request. However you can use XQuery to perform a batch validation in eXist. Here is an example to get you started: xquery version "1.0"; declare namespace validation="http://exist-db.org/xquery/validation"; <validationReport>{ let $parentPath := "/db/test/" let $schemaPath := "/db/test/personal.xsd" let $childrenPaths := xmldb:get-child-resources($parentPath) for $child in $childrenPaths let $path := fn:concat($parentPath, $child) where fn:ends-with($child, ".xml") return <validate name="{$path}"> {validation:validate-report(xs:anyURI($path), xs:anyURI($schemaPath))} </validate> } </validationReport> Regards, Radu -- Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Graaumans, Joris wrote:
Hi,
I've setup a connection with eXist in oXygen 9.0. I can open files, edit them, run xqueries, etc. However, I was wondering: it is possible to validate all XML documents in a collection? Preferably against an external XML Schema.
Thanks in advance,
Joris
------------------------------------------------------------------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (2)
-
Graaumans, Joris
-
Radu Coravu