1.0.0 Holger Knublauch A library of SPIN functions for currency conversion. The base function (currencies:getRateByCode) uses a SPARQLMotion script with to fetch the current exchange rates using a Web Service. newLiteral fromCurrency rate fromValue newValue The qud:CurrencyUnit to convert to. The literal to convert. Must have a qud:CurrencyUnit as datatype. Converts a given currency literal (?arg1) to a literal in another currency (?arg2). The input literal must have a qud:CurrencyUnit as datatype, e.g. "4.2"^^unit:USDollar. convert literal A collection of SPIN/SPARQLMotion functions to convert between currencies true Functions value rate The code of the target unit (e.g., "EUR"). The code of the value's source unit (e.g., "USD"). The numeric value to convert. Converts a numeric currency value (?arg1) from one unit (?arg2) to another (?arg3). convert by codes code1 rate 432 231 Return rate 301 double/text() result 193 Get result using XPath http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency={?arg1}&ToCurrency={?arg2} 164 204 xml Call web service code2 31 311 The code of the currency to convert to. The currency to convert to. The currency to convert from. Fetches the current exchange rate from one currency (?arg1) to another (?arg2). Both arguments must be instances of qud:CurrencyUnit. get rate by currencies 32 47 The code of the currency to convert from. get rate by codes Fetches the current exchange rate from one currency (?arg1) to another (?arg2). An external web service is used, based on a SPARQLMotion script. The arguments must be the 3-letter currency abbreviations such as USD.