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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Semantic vs XML Rules (was XRules: Mind your own businessr

[ Lists Home | Date Index | Thread Index ]

this is very close in concept to unibase rules.

i prefer to think of it as "if you need tax amount here's how to 
calculate it". then it really is a rule. and can be changed at will.

a rule is an expression (even the ai rules are at the end of the day 
just expressions - as noted).

there is however a big difference between the idea that if subtotal or 
taxpercent change then recalculate taxamount and what i outlined. in the 
latter there is an implication that taxamount exists somewhere and has 
to be maintained. in the former taxamount doesn't exist unless you need 
it. this late binding means that if the definition of tax amount changes 
between use, the so does the value.

there's a whole new world of perma threads here involving is it more 
efficient to store and change or calculate as needed ;) we've argued 
this one in the dbms world for so long i think there is a sort of uneasy 
truce between camps. we use late binding mostly so we can add/subtract 
rules as required, but that's our position.

once i work out the yahoo groups thing, i'll contribute directly.


Waleed Abdulla wrote:

>>-----Original Message-----
>>From: Jonathan Borden [mailto:jonathan@openhealth.org]
>>  <xr:ruleset context="/PurchaseOrder">
>>    <xr:calculate target="TaxAmount" value="SubTotal * TaxPercent" />
>>  </xr:ruleset>
>>What makes this a rule? It looks like a variable declaration, or simply an
>Think of it like:
>	If 
>	   Value of SubTotal changes
>	 OR
>	   Value of TaxPercent changes
>	Then
> 	   Recalculate TaxAmount = SubTotal * TaxPercent
>This is how the XRules processor (the DynamicDOM) handles it. The syntax is
>simplified to make the language easier to edit and maintain. I've seen some
>rules engines express the same rule as:
>	If True		(to indicate that the rule always apply)
>	Then TaxAmount = SubTotal * TaxPercent
>Which accomplishes the same thing, but with a different syntax.
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://www.oasis-open.org/mlmanage/index.php>

fn:Rick  Marshall
tel;cell:+61 411 287 530


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

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