Altova Mailing List Archives

Semantic vs XML Rules (was XRules: Mind your own business rules)

From: "Waleed Abdulla" <Waleed_Abdulla@------.--->
To: "'Bill de hÓra'" <bill.dehora@--------.--->, <xml-dev@-----.---.--->
Date: 3/17/2005 4:41:00 PM
> >> 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
> rules
> >> 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:ruleset context="/PurchaseOrder">
    <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.



These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.