Lists Home |
Date Index |
I read your examples and here are the problems that I found.
1) Not declarative style
2) Not really XML style
3) it's difficult to adapt to use rule engine
Check this out (MathML Fundamentals):
Letís take a look at the very simple example of (a + b)2. Here we see how the principles discussed above play out in practice. One form of presentation markup for this example is:
This example demonstrates a number of presentation elements. The first element, one that is used a great deal is mrow. This element is used to denote a row of horizontally aligned material. The material contained between the <mrow> and </mrow> tags is considered to be an argument to the mrow element. Thus the whole expression here is contained in an mrow element. As previously noted, almost all mathematical expressions decompose into subexpressions. These subexpressions can, in turn, also be contained in an mrow element. For example, a + b is also contained in an mrow.
The mfenced element is used to provide fences (braces, brackets, and parentheses) around formula material. It defaults to using parentheses.
Note the use of the mi element for displaying the variables a and b and the mo element for marking the + operator.
Check this out (RuleML):
<!-- Imp 1
The discount for a customer buying a product is 5.0 percent
if the customer is premium and the product is regular.
Notice that an individual constant can syntactically be an entire phrase
like "5.0 percent". It will unify only with variables and with individuals
having exactly the same spelling (incl. spaces). One could refine this markup
by introducing a constructor term for "percent[5.0]", thus leaving Datalog
towards full Horn logic.
We need shared XML Rule Markup Language and nobody have it yet in complete form!!!
> Roger L. Costello wrote:
> > Is there any XML technology that is intended for declaratively
> > expressing mathematical relationships, e.g.,
> > Din = 2.54*Dcm (Din = distance in inches
> > Dcm = distance in centimeters)
> > Tc = (5/9)*(Tf-32); (Tc = temperature in degrees Celsius,
> > Tf = temperature in degrees Fahrenheit)
> > etc.
> > Is MathML intended for this? How about RuleML?
> I don't know about RuleML. MathML should be able to specify such things, however
> you may be introducing complexity beyond that which you would like to have (it
> all depends on what your needs are).
> Seeing your other more detailed post on this topic, I thought that you might
> want to base some solution on XPath. For instance:
> <foo:PropertyEquivalence from='measure:inch'
> convert='$in_1 * 2.54'/>
> <foo:PropertyEquivalence from='measure:cm'
> convert='$in_1 div 2.54'/>
> would allow you to declare that the following are euquivalent:
> You could allow for multiple inputs to your binding:
> from='size:width/measure:meter size:length/measure:meter'
> convert='$in_1 * $in_2'/>
> and perhaps equivalentize, depending on whether it makes sense in that context:
> so that given the first you could still query for flat:Bedrooms that are larger
> than 20sqm.
> You may need to throw in stuff from EXSLT Math if you want more than XPath provides.
> Robin Berjon <firstname.lastname@example.org>
> Research Engineer, Expway http://expway.fr/
> 7FC0 6F5F D864 EFB8 08CE 8E74 58E6 D5DB 4889 2488
> 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://lists.xml.org/ob/adm.pl>