xsd - Any schema language for XML that allows for specifying constraints like no cyclic references? -


Is there a schema language for XML that allows to specify a barrier that there is no cyclic reference between elements It is possible.

As a Toy Example:

will be valid, but

  & lt; Animal Name = "A" Accounts = "B" & gt; & Lt; Animal Name = "B" Accounts = "C" & gt; & Lt; Animal name = "c" accounts = "d" & gt; & Lt; The name of the animal = "D" eats = "A" & gt;  

will not be valid.

As there, I do not know any schema language, to implement this kind of compulsion Are designed. If this is possible in the schema language, then schemata will probably not be the schema beautiful.

For me, it says that you should not try to do this using the schema language. Collect any programming language that you can easily and easily obstruct the code to read. This will be shorter and wiser than any schema-based version.


Comments