Lists Home |
Date Index |
> >> And, I would suggest (warning: shameless promotion ahead) that
> >> XRules
> >> is a good starting point for such effort because it's designed
> >> specifically
> >> to be an independent rules language for XML (as opposed to semantic
> >> languages),
> What is the distinction between a semantic rules language and an
> independent rules language for XML?
The first, which I'm referring to as semantic rules, goes like this:
"John Doe" has "wife"
"John Doe" has "girl friend"
"John Doe" in "big trouble"
And, the second, which I'm referring to as XML rules, goes like this
(example in XRules, but could just as well be any other language):
<xr:calculate target="TaxAmount" value="SubTotal * TaxPercent" />
The first type, semantic rules, is commonly thought of as being related
to AI and expert systems (although its not limited to that), while the
second type, XML rules, is more down to earth and limits its scope to
dealing with XML.
The *aha* moment for me was when I realized that the "rules" themselves
are similar, and that the real difference is in the type of facts they deal
with. Both semantic and XML rules can generate new knowledge from existing
facts. The first example told us that John Doe was in big trouble, and the
second produced the value of TaxAmount; both facts were not known before.
However, the difference is: semantic rules deal with facts about the real
world, and XML rules deal with facts about "an XML representation" of the
real world. And, by "representation" I mean that in the example above, a
"tax amount" is also something that exists in the real world, but the XML
rule only cares about the TaxAmount node, not about what it represents.
I'm sure there is a better (formal?) classification of rules. This is
only my 2 cents.