Wednesday, January 21, 2004
He mentions my Schematron implementation called Schematron.NET, which allows many business rules to be expressed simply in terms of standard XPath expressions. I believe such an XPath-based language is good enough to express almost every business rule.
Udi Dahan commented as an example, a rule "only a bank manager can authorize a loan above X" which he said couldn't be expressed with Don's idea. It could, indeed, with something along these lines (XPath-like):
<assert test="sec:principal-role('BankManager') and po:Loan/@Amount < 1000"> Only a BankManager can place a loan of more than $1000. </assert>
Note that XPath extensibility allows for more domain-specific extensions to be active, which can even check against databases, etc. For example, something like this:
<assert test="crm:customer-id(po:CustomerId)" />