20 Feb
2015
20 Feb
'15
11:54 a.m.
Hi Paul, In BaseX, validation is done on XQuery level. If you want to validate a document before updating it in the database, you can e.g. do something like.. let $db := 'database' let $path := 'collection/doc.xml' let $schema := 'path/to/schema.xsd' let $doc := db:open($db, $path) update ( delete node //text() ) return ( validate:xsd($doc, $schema), db:replace($db, $path, $doc) ) Hope this helps, Christian On Fri, Feb 20, 2015 at 3:33 AM, <pmenso57@comcast.net> wrote:
Hi all.
Is it possible to enforce schema validation on update in BaseX?
Regards, Paul Mensonides