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] Expressing mathematical relationships?

[ Lists Home | Date Index | Thread Index ]

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 <robin.berjon@expway.fr>
Research Engineer, Expway        http://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488


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

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