Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-978722_data-converters into lp:zorba/data-converters-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-converters/+merge/101524 fix for bug #978722 (change annotation prefix from "ann" to "an") -- https://code.launchpad.net/~zorba-coders/zorba/bug-978722_data-converters/+merge/101524 Your team Zorba Coders is subscribed to branch lp:zorba/data-converters-module.
=== modified file 'test/Queries/converters/base64/binaryReadWrite.xq' --- test/Queries/converters/base64/binaryReadWrite.xq 2011-07-03 23:37:48 +0000 +++ test/Queries/converters/base64/binaryReadWrite.xq 2012-04-11 10:08:22 +0000 @@ -5,13 +5,13 @@ import schema namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; -declare namespace ann = "http://www.zorba-xquery.com/annotations"; +declare namespace an = "http://www.zorba-xquery.com/annotations"; declare variable $inFile as xs:string := fn:concat(file:dir-name(fn:static-base-uri()), "/../image/images/bird.gif"); declare variable $testDir as xs:string := fn:concat(file:dir-name(fn:static-base-uri()),"/tmpBinaryReadWrite"); declare variable $outFile as xs:string := fn:concat($testDir, file:directory-separator(), "bird.gif"); -declare %ann:nondeterministic %ann:sequential function local:thisTest() as xs:string* { +declare %an:nondeterministic %an:sequential function local:thisTest() as xs:string* { (: ==================================================================== :) (: read the image file (binary) :) (: ========= :) @@ -31,7 +31,7 @@ }; -declare %ann:nondeterministic %ann:sequential function local:main() as xs:string* +declare %an:nondeterministic %an:sequential function local:main() as xs:string* { (: ========================= :) === modified file 'test/Queries/converters/base64/common.xqlib' --- test/Queries/converters/base64/common.xqlib 2011-08-02 19:41:35 +0000 +++ test/Queries/converters/base64/common.xqlib 2012-04-11 10:08:22 +0000 @@ -4,7 +4,7 @@ import schema namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; -declare namespace ann = "http://www.zorba-xquery.com/annotations"; +declare namespace an = "http://www.zorba-xquery.com/annotations"; declare function commons:error($messages as xs:string*) as xs:string* { " @@ -20,14 +20,14 @@ (: ******************************** SIMPLE TESTS ******************************** :) -declare %ann:nondeterministic %ann:sequential function commons:testExists($path as xs:string) as xs:string* { +declare %an:nondeterministic %an:sequential function commons:testExists($path as xs:string) as xs:string* { if (file:exists($path)) then "SUCCESS" else ("testExists failed for path:", $path) }; -declare %ann:sequential function commons:testCreateDirectory($path as xs:string) as xs:string* { +declare %an:sequential function commons:testCreateDirectory($path as xs:string) as xs:string* { try { file:create-directory($path); exit returning "SUCCESS"; @@ -36,12 +36,12 @@ } }; -declare %ann:sequential function commons:testWriteXml($path as xs:string, $xml as item()) as xs:string* { +declare %an:sequential function commons:testWriteXml($path as xs:string, $xml as item()) as xs:string* { file:write($path, $xml, ()); "SUCCESS" }; -declare %ann:nondeterministic %ann:sequential function commons:testReadAndCompareXml($path as xs:string, $xml as item()) as xs:string* { +declare %an:nondeterministic %an:sequential function commons:testReadAndCompareXml($path as xs:string, $xml as item()) as xs:string* { let $x := fn:parse-xml(file:read-text($path)) return if($x eq $xml) then @@ -51,11 +51,11 @@ ", fn:serialize($xml)) }; -declare %ann:nondeterministic function commons:testReadBinary($path as xs:string) as xs:base64Binary { +declare %an:nondeterministic function commons:testReadBinary($path as xs:string) as xs:base64Binary { file:read-binary($path) }; -declare %ann:nondeterministic %ann:sequential function commons:testDelete($path as xs:string) as xs:string* { +declare %an:nondeterministic %an:sequential function commons:testDelete($path as xs:string) as xs:string* { try { file:delete($path); "SUCCESS"; @@ -64,7 +64,7 @@ } }; -declare %ann:sequential function commons:testWriteSerializeXml($path as xs:string, $xml as item()) as xs:string* { +declare %an:sequential function commons:testWriteSerializeXml($path as xs:string, $xml as item()) as xs:string* { file:write( $path, $xml, @@ -78,7 +78,7 @@ (: ****************************** COMPOSITE TESTS ******************************* :) -declare %ann:nondeterministic %ann:sequential function commons:testInitDir($dir as xs:string) as xs:string* { +declare %an:nondeterministic %an:sequential function commons:testInitDir($dir as xs:string) as xs:string* { (: ==================================================================== :) (: the test directory must not exist :) (: ========= :) @@ -109,7 +109,7 @@ }; -declare %ann:nondeterministic %ann:sequential function commons:testUnInitDir($dir as xs:string) as xs:string* +declare %an:nondeterministic %an:sequential function commons:testUnInitDir($dir as xs:string) as xs:string* { (: ==================================================================== :) (: delete the directory :) === modified file 'test_html/Queries/converters/html/link_crawler2.xq2' --- test_html/Queries/converters/html/link_crawler2.xq2 2012-02-28 21:05:01 +0000 +++ test_html/Queries/converters/html/link_crawler2.xq2 2012-04-11 10:08:22 +0000 @@ -20,7 +20,7 @@ import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml"; import module namespace file = "http://expath.org/ns/file"; -declare namespace ann = "http://www.zorba-xquery.com/annotations"; +declare namespace an = "http://www.zorba-xquery.com/annotations"; declare namespace xhtml="http://www.w3.org/1999/xhtml"; declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization"; declare namespace err="http://www.w3.org/2005/xqt-errors"; @@ -45,13 +45,13 @@ -declare %ann:sequential function local:create-containers() +declare %an:sequential function local:create-containers() { map:create($local:processed-internal-links, xs:QName("xs:string")); map:create($local:processed-external-links, xs:QName("xs:string")); }; -declare %ann:sequential function local:delete-containers(){ +declare %an:sequential function local:delete-containers(){ for $x in map:available-maps() return map:delete($x); }; @@ -67,7 +67,7 @@ return if($sb = "") then $s1 else $sb }; -declare %ann:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string? +declare %an:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string? { variable $absuri; try{ @@ -103,7 +103,7 @@ }; -declare %ann:sequential function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string* +declare %an:sequential function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string* { distinct-values( for $y in ($content//*:a/string(@href), $content//*:link/string(@href), $content//*:script/string(@src), @@ -114,7 +114,7 @@ }; -declare %ann:sequential function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{ +declare %an:sequential function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{ distinct-values( let $search := fn:analyze-string($content, "(<|&lt;|<)(((a|link|area).+?href)|((script|img).+?src))=([""'])(.*?)\7") @@ -124,7 +124,7 @@ }; -declare %ann:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string, $http-result as item()*) +declare %an:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string, $http-result as item()*) { if(count($http-result) ge 1) then @@ -142,14 +142,14 @@ else {} }; -declare %ann:sequential function local:process-link($x as xs:string, $baseUri as xs:string, $n as xs:integer) as item()*{ +declare %an:sequential function local:process-link($x as xs:string, $baseUri as xs:string, $n as xs:integer) as item()*{ if(local:is-internal($x)) then local:process-internal-link($x, $baseUri, $n); else local:process-external-link($x, $baseUri); }; -declare %ann:sequential function local:process-external-link($x as xs:string, $baseUri as xs:string){ +declare %an:sequential function local:process-external-link($x as xs:string, $baseUri as xs:string){ if(not(empty(map:get($local:processed-external-links, $x)))) then exit returning false(); else {} @@ -178,7 +178,7 @@ }; -declare %ann:sequential function local:process-internal-link($x as xs:string, $baseUri as xs:string, $n as xs:integer){ +declare %an:sequential function local:process-internal-link($x as xs:string, $baseUri as xs:string, $n as xs:integer){ (: if($n=3) then exit returning (); else {} :) if(not(empty(map:get($local:processed-internal-links, $x)))) then exit returning false();
-- Mailing list: https://launchpad.net/~zorba-coders Post to : [email protected] Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp

