Constraint and occurance check while working with Liquid XML Objects
Question asked by Matthias Folte - 5/28/2020 at 3:14 PM
Answered
Is there a way to have checks for foreign and unique keys aswell as checks for the correct amount of occurances for elements?

One solution would be to serialize my root element and put it into the validator.
However I'd like to have checks whenever an element is added/removed/edited to the structure and doing a validation after each action wouldn't be good perfiormance wise.

I'm just curious if I'm missing a feature here. Before I implement the logic myself to avoid inconsistencies I'd like to make sure theres no "out of the box way" of doing this with Liquid XML Objects.

1 Reply

Reply to Thread
0
Liquid Support Replied
Employee Post Marked As Answer
Hi,

We don't perform xs:key, xs:keyref checking within the generated model. If you are using XSD 1.0 then you can generate a validator class that will use the Microsoft .Net Framework to validate the XML document against your source XSD.

Please see the documentation for Validation using the original XML Schemas (XSDs)



Reply to Thread