Martin Bjorklund <[email protected]> writes: > Ladislav Lhotka <[email protected]> wrote: >> Hi, >> >> I can't find any text in 6020bis that deals with the following issue: >> >> leaf foo { >> when "false()"; >> mandatory true; >> type empty; >> } >> >> Now, sec. 7.6.5 (The leaf's mandatory Statement) says: >> >> o Otherwise, the leaf MUST exist if the ancestor node exists in the >> data tree. >> >> So, if we assume the ancestor node exists in the data tree, the leaf MUST >> exist. >> >> But sec. 8.1 (Constraints on Data) says: >> >> The following properties are true in all data trees: >> >> … >> >> o There MUST be no nodes tagged with "when" present if the "when" >> condition evaluates to "false" in the data tree. >> >> The "mandatory" and "when" statements contradict each other. How is >> this resolved? > > The idea is that a false when works like if-feature - if the when > evaluates to false then the mandatory constraint doesn't apply.
I would personally prefer if "mandatory" was harder than "when" because it is a schema constraint that can be determined upfront (so is "if-feature"), whereas "when" needs in principle a complete data tree to perform the evaluation. But either way, there should be a text that states that false "when" wins over mandatory, or the other way around. I can't find any in -08, section 8 doesn't mention "mandatory" at all. Lada > > > /martin -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
