Page 1 of 1

Progressive (dynamic) validation of XML

Posted: Thu Dec 18, 2014 4:07 pm
by sorush12
Hello all!
I am working on validation of an XML vocabulary which requires dynamic validation and I wonder if it can be handled by existing schemas (schematron and NVDL).
Initially the file is created and validated, then it is passed to the MODIFIER who makes the changes (updating values, adding content, etc.). So there are number of constrains for these changes that are conditioned by the file before the changes; for instance if the modifier has updated a certain attribute, he must update the second attribute as well, otherwise the file is not valid.
So is there any way check this rule, by maybe feeding two files to schematron and using it's phase element or any other way of comparing the file before and after the modification?
I hope I was clear and thank you all in advance for your answers.

Re: Progressive (dynamic) validation of XML

Posted: Thu Dec 18, 2014 5:57 pm
by george
Hi,

From Schematron you can use the document function to access a different file. So you can validate your changed file and use document to access content from the original.

Best Regards,
George

Re: Progressive (dynamic) validation of XML

Posted: Thu Dec 18, 2014 6:16 pm
by sorush12
Thank you very much George! It seems that working on Schematron without decent knowledge of XPath and XSLT stays only at a primitive level.