Progressive (dynamic) validation of XML

This should cover W3C XML Schema, Relax NG and DTD related problems.
sorush12
Posts: 3
Joined: Thu Dec 18, 2014 3:35 pm

Progressive (dynamic) validation of XML

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Progressive (dynamic) validation of XML

Post 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
George Cristian Bina
sorush12
Posts: 3
Joined: Thu Dec 18, 2014 3:35 pm

Re: Progressive (dynamic) validation of XML

Post 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.
Post Reply