OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread 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
> 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:

  If 
    "John Doe" has "wife"
    and 
    "John Doe" has "girl friend"
  Then
    "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" />
  </xr:ruleset>


    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.


Waleed
http://www.xrules.org 







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS