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 business

[ Lists Home | Date Index | Thread Index ]


> -----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
> expression.
> 

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.

Regards,
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