[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: The Einstein Puzzle
Nice to see this! One angle I would say is that the SAT terminology "constraint" is somewhat different from the schema terminology of "constraint". Schemas don't say that the Englishman lives in the red house, they say that all Englishmen we are interested in live in red houses. For example, take this asertion: <sch:rule context="house[owner=' <sch:assert test="pet='quoll'">Every Australian has a quoll for a pet</sch:assert> </sch:rule> We might say this is semantically equivalent to < but not <lastPersonISaw nationality="Australian" pet="quoll"/> So Schematron lets us use attribute values and element data content in assertions, but only to express the invariant qualities of all possible documents. When you start to have assertions on data, you from schema languages to unit test languages. So I would say that when "it is not obvious what instances satisfy the constraints" it is a sign that you are not working in the schema domain, but in the data domain. For Schematron, you notionally *start* with a natural language description of the constraint. If you cannot formulate a natural language description, you are hamstrung from the start: you are hacking (in the bad sense). So model-checking (for Schematron) should be an exercise in debugging not search (though coverage-checking may not fit this sweeping statement). In Schematron, the assertion is the natural language statement, not just the assertion test (in XPath or whatever): the entire design of Schematron is to encourage explicit statements of intent, not just to have formula in isolation. Regards Rick On Tue, Jan 16, 2018 at 12:59 AM, Costello, Roger L. <costello@mitre.org> wrote:
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|