Version Validation
Posted: Fri Jul 24, 2020 3:54 pm
Hi Team,
I have a requirement to validate an XML using Xpath Schematron based on the Version.
Posting a sample below.
<root>
<Node1 version="1">
<Element1>Value1</Element1>
<Type>123456</Type>
</Node1>
<Node1 version="2">
<Element1>Value1</Element1>
<Type>123456</Type>
</Node1>
<Node1 version="3">
<Element1>Value1</Element1>
<Type>1234567</Type>
</Node1>
</root>
I have a requirement to fetch the min value of the version element and then fetch the Value of Type Element for the min version and need to validate as the Type element Value should be the same for remaining versions.
So Technically value of Version 3 should fail and the Type Element value does not equals the one with Version 1 element.
I am new to Xpath Schematron, Can you help me figure out a way.
Thanks in advance.
I have a requirement to validate an XML using Xpath Schematron based on the Version.
Posting a sample below.
<root>
<Node1 version="1">
<Element1>Value1</Element1>
<Type>123456</Type>
</Node1>
<Node1 version="2">
<Element1>Value1</Element1>
<Type>123456</Type>
</Node1>
<Node1 version="3">
<Element1>Value1</Element1>
<Type>1234567</Type>
</Node1>
</root>
I have a requirement to fetch the min value of the version element and then fetch the Value of Type Element for the min version and need to validate as the Type element Value should be the same for remaining versions.
So Technically value of Version 3 should fail and the Type Element value does not equals the one with Version 1 element.
I am new to Xpath Schematron, Can you help me figure out a way.
Thanks in advance.