Matthias Brantner has proposed merging
lp:~zorba-coders/zorba/bug-978722_data-cleaning into
lp:zorba/data-cleaning-module.
Requested reviews:
Matthias Brantner (matthias-brantner)
William Candillon (wcandillon)
Related bugs:
Bug #978722 in Zorba: "change annotation prefix from "ann" to "an""
https://bugs.launchpad.net/zorba/+bug/978722
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-978722_data-cleaning/+merge/101532
fix for bug #978722 (change annotation prefix from "ann" to "an")
--
https://code.launchpad.net/~zorba-coders/zorba/bug-978722_data-cleaning/+merge/101532
Your team Zorba Coders is subscribed to branch lp:zorba/data-cleaning-module.
=== modified file 'src/com/zorba-xquery/www/modules/data-cleaning/conversion.xq'
--- src/com/zorba-xquery/www/modules/data-cleaning/conversion.xq 2011-11-16 18:41:39 +
+++ src/com/zorba-xquery/www/modules/data-cleaning/conversion.xq 2012-04-11 10:14:19 +
@@ -29,7 +29,7 @@
module namespace conversion = "http://www.zorba-xquery.com/modules/data-cleaning/conversion";;
declare namespace exref = "http://www.ecb.int/vocabulary/2002-08-01/eurofxref";;
-declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
import schema namespace wp = 'http://api.whitepages.com/schema/';
@@ -52,7 +52,7 @@
: @return A sequence of strings for the phone numbers associated to the name.
: @example test/Queries/data-cleaning/conversion/phone-from-user.xq
:)
-declare %ann:nondeterministic function conversion:phone-from-user ( $name as xs:string) as xs:string*{
+declare %an:nondeterministic function conversion:phone-from-user ( $name as xs:string) as xs:string*{
let $name-value := replace($name, " ", "%20")
let $url := concat("http://api.whitepages.com/find_person/1.0/?name=",$name-value,";api_key=",$conversion:key)
let $doc := http:get-node($url)[2]
@@ -69,7 +69,7 @@
: @return A sequence of strings for the addresses associated to the name.
: @example test/Queries/data-cleaning/conversion/address-from-user.xq
:)
-declare %ann:nondeterministic function conversion:address-from-user ( $name as xs:string) as xs:string*{
+declare %an:nondeterministic function conversion:address-from-user ( $name as xs:string) as xs:string*{
let $name-value := replace($name, " ", "%20")
let $url := concat("http://api.whitepages.com/find_person/1.0/?name=",$name-value,";api_key=",$conversion:key)
let $doc := http:get-node($url)[2]
@@ -91,7 +91,7 @@
: @return A sequence of strings for the person or organization's name associated to the phone number.
: @example test/Queries/data-cleaning/conversion/user-from-phone.xq
:)
-declare %ann:nondeterministic function conversion:user-from-phone ( $phone-number as xs:string) as xs:string*{
+declare %an:nondeterministic function conversion:user-from-phone ( $phone-number as xs:string) as xs:string*{
let $url := concat("http://api.whitepages.com/reverse_phone/1.0/?phone=",$phone-number,";api_key=",$conversion:key)
let $doc := http:get-node($url)[2]
return $doc/wp:wp/wp:listings/wp:listing/wp:displayname/text()
@@ -106,7 +106,7 @@
: @return A string for the addresses associated to the phone number.
: @example test/Queries/data-cleaning/conversion/address-from-phone.xq
:)
-declare %ann:nondeterministic function conversion:address-from-phone ( $phone-number as xs:string) as xs:string*{
+declare %an:nondeterministic function conversion:address-from-phone ( $phone-number as xs:string) as xs:string*{
let $url := concat("http://api.whitepages.com/reverse_phone/1.0/?phone=",$phone-number,";api_key=",$conversion:key)
let $doc := http:get-node($url)[2]
let $addresses :=
@@ -128,7 +128,7 @@
: @return A sequence of strings for the person or organization's names associated to the address.
: @example test/Queries/data-cleaning/conversion/user-from-address.xq
:)
-declare %ann:nondeterministic function conversion:user-from-address ( $address as xs:string) as xs:string*{
+declare %an:nondeterministic function conversion:user-from-address ( $address as xs:string) as xs:string*{
let $tokens := tokenize ($address, ",")
let $token-full-street := $tokens[position()=1]
let $state :=
@@ -154,7 +154,7 @@
: @return A sequence of strings for the phone number or organization's names associated to the address.
: @example test/Queries/data-cleaning/conversion/phone-from-address.xq
:)
-declare %ann:nondeterministic function conversion:phone-from-address ( $address as xs:string) as xs:string*{
+declare %an:nondeterministic function conversion:phone-from-address ( $address as xs:string) as xs:string*{
let $tokens := tokenize ($address, ",")
let $token-full-street := $tokens[position()=1]
let $state :=
@@ -191,7 +191,7 @@
: @return The value resulting from the conversion
: @example test/Queries/data-cleaning/conversion/unit-convert.xq
:)
-declare %ann:nondeterministic function conversion:unit-convert (