Re: [Zorba-coders] [Merge] lp:~fcavalieri/zorba/structuralrelationships2 into lp:zorba
Renamed the module and function to node-position. How should I replace structural information in the functions comments? node position uri? -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/updrevalidate into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions. -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/updrevalidate into lp:zorba has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/updrevalidate into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/updrevalidate-2011-10-14T08-10-00.964Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/updrevalidate into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/updrevalidate into lp:zorba has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~fcavalieri/zorba/structuralrelationships2 into lp:zorba
Renamed the module and function to node-position. How should I replace structural information in the functions comments? node position uri? I rewrote somewhat the introductory comment in node-position.xq. Here is the new version: (:~ : This module provides a function (np:node-position) that, given a node, : returns positional information about the node in the form of an xs:anyURI : item. The module also defines functions that use such positional information : to determine: (1) positional relationships between two nodes (e.g. if one : is the ancestor of another) and (2) positional properties of a single node : (e.g. its level in the tree). : : Within this module, the term node position will be used to refer to an : xs:anyURI item that is returned by the np:node-position function. : : @author Federico Cavalieri :) If everybody agrees with my rewrite, then the answer to your question is node position. -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba
Federico, I don't think it is necessary to put the position uris into the uri pool because they are not likely to be shared by multiple data items so you won't really be saving much space (you may be actually end-up wasting space because the uri pool storage has some overhead by itself). Do you agree? -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~danielturcanu/zorba/my_conv_module into lp:zorba/data-converters-module
Daniel Turcanu has proposed merging lp:~danielturcanu/zorba/my_conv_module into lp:zorba/data-converters-module. Requested reviews: Zorba Coders (zorba-coders) For more details, see: https://code.launchpad.net/~danielturcanu/zorba/my_conv_module/+merge/79390 Updated link_crawler to display FROM, STATUS, RESULT for each link -- https://code.launchpad.net/~danielturcanu/zorba/my_conv_module/+merge/79390 Your team Zorba Coders is requested to review the proposed merge of lp:~danielturcanu/zorba/my_conv_module into lp:zorba/data-converters-module. === modified file 'test_html/Queries/converters/html/link_crawler2.xq2' --- test_html/Queries/converters/html/link_crawler2.xq2 2011-10-06 07:40:17 + +++ test_html/Queries/converters/html/link_crawler2.xq2 2011-10-14 10:56:25 + @@ -18,6 +18,7 @@ import module namespace map = http://www.zorba-xquery.com/modules/store/data-structures/unordered-map;; import module namespace html = http://www.zorba-xquery.com/modules/converters/html;; 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 xhtml=http://www.w3.org/1999/xhtml;; @@ -26,15 +27,12 @@ declare namespace httpsch = http://expath.org/ns/http-client;; declare variable $top-uri as xs:string := http://www.zorba-xquery.com/site2/html/index.html;; -declare variable $uri-host as xs:string := http://www.zorba-xquery.com/site2/;; - - -declare variable $supported-media-types as xs:string+ := (text/xml, application/xml, text/xml-external-parsed-entity, application/xml-external-parsed-entity, - application/atom+xml, text/html); - - -declare variable $local:processed-internal-links:=xs:QName(processed-internal-links); -declare variable $local:processed-external-links :=xs:QName(processed-external-links); +declare variable $uri-host as xs:string := http://www.zorba-xquery.com;; + + + +declare variable $local:processed-internal-links := xs:QName(processed-internal-links); +declare variable $local:processed-external-links := xs:QName(processed-external-links); declare %ann:sequential function local:create-containers() @@ -59,9 +57,19 @@ return if($sb = ) then $s1 else $sb }; -declare function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string +declare %ann:sequential function local:get-real-link($href as xs:string, $start-uri as xs:string) as xs:string? { - local:my-substring-before(resolve-uri($href, $start-uri), #) + variable $absuri; + try{ +$absuri := local:my-substring-before(resolve-uri(fn:normalize-space($href), $start-uri), #); + } + catch * + { + map:insert($local:processed-external-links, (FROM{$start-uri}/FROM, + MESSAGEmalformed/MESSAGE, + RESULTbroken/RESULT), $href); + } + $absuri }; @@ -70,13 +78,15 @@ local:my-substring-before($http-call/httpsch:header[@name = 'Content-Type'][1]/string(@value), ;) }; -declare function local:alive($http-call as node()*) as xs:boolean +declare function local:alive($http-call as item()*) as xs:boolean { - if(($http-call[1]/@status eq 200)) then true() else false() + if((count($http-call) ge 1) and +($http-call[1]/@status eq 200)) + then true() else fn:trace(false(), alive) }; -declare function local:get-out-links-parsed($content as node()*, $uri as xs:string) as xs:string* +declare %ann: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), @@ -87,30 +97,50 @@ }; -declare function local:get-out-links-unparsed($content as xs:string, $uri as xs:string) as xs:string*{ +declare %ann: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;|amp;lt;|)(((a|link|area).+?href)|((script|img).+?src))=(['])(.*?)\7) for $other-uri2 in $search//group[@nr=8]/string() - let $y:= fn:normalize-space($other-uri2) - return local:get-real-link($y, $uri) + return local:get-real-link($other-uri2, $uri) ) }; - -declare %ann:sequential function local:process-external-link($x as xs:string){ +declare %ann: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 + map:insert($map-name, (STATUS{fn:string($http-result[1]/@status)}/STATUS, + MESSAGE{fn:string($http-result[1]/@message)}/MESSAGE, + RESULT{if(local:alive($http-result)) then Ok
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba
Should StructuralAnyUriItem::isDescendant() check that the other node is not an attribute? -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba
Should StructuralAnyUriItem::isDescendant() check that the other node is not an attribute? Yes, you are right! Descendant doesn't include attributes. May I add a in-subtree-of function with the same semantics as the current descendant? Thanks Federico -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba
Federico, I don't think it is necessary to put the position uris into the uri pool because they are not likely to be shared by multiple data items so you won't really be saving much space (you may be actually end-up wasting space because the uri pool storage has some overhead by itself). Do you agree? I agree. Fixing it. Thanks Federico -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~gabipetrovay/zorba/expath_file_added_missing_write-2 into lp:zorba
Gabriel Petrovay has proposed merging lp:~gabipetrovay/zorba/expath_file_added_missing_write-2 into lp:zorba. Requested reviews: Gabriel Petrovay (gabipetrovay) Matthias Brantner (matthias-brantner) For more details, see: https://code.launchpad.net/~gabipetrovay/zorba/expath_file_added_missing_write-2/+merge/79395 Added the missing write#2 function to the EXPath file API. -- https://code.launchpad.net/~gabipetrovay/zorba/expath_file_added_missing_write-2/+merge/79395 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'modules/org/expath/ns/file.xq' --- modules/org/expath/ns/file.xq 2011-08-17 23:28:19 + +++ modules/org/expath/ns/file.xq 2011-10-14 11:57:26 + @@ -486,6 +486,26 @@ }; (:~ + : Writes a sequence of items to a file. + : + : The operation is equivalent to calling: + : prefile:write($file, $content, ())/pre. + : + : @param $file The path/URI of the file to write the content to. + : @param $content The content to be serialized to the file. + : @return The empty sequence. + : @error file:FOFL0004 If pre$file/pre points to a directory. + : @error file:FOFL If any other error occurs. + :) +declare %ann:sequential function file:write( + $file as xs:string, + $content as item()* +) as empty-sequence() +{ + file:write-text($file, fn:serialize($content)) +}; + +(:~ : Writes a sequence of Base64 items as binary to a file. : : The operation is equivalent to calling: -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~gabipetrovay/zorba/expath_file_added_missing_write-2 into lp:zorba
Review: Approve Default review -- https://code.launchpad.net/~gabipetrovay/zorba/expath_file_added_missing_write-2/+merge/79395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/structuralrelationships2 into lp:zorba
Should StructuralAnyUriItem::isDescendant() check that the other node is not an attribute? Yes, you are right! Descendant doesn't include attributes. May I add a in-subtree-of function with the same semantics as the current descendant? Thanks Federico It's ok with me, if it is something that you need in your module. -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867103] Re: K-DocumentURIFunc-2.xq
** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867103 Title: K-DocumentURIFunc-2.xq Status in Zorba - The XQuery Processor: New Bug description: test fails in XQuery 3.0 To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867103/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867125] Re: xqdoc does no dependency checking on inputs
This can not be implemented in the suggested way: - even if the XQuery module did not change, if anything in the XQDoc style has changed, the XHTML output *has to* change, thus the XQDoc documentation page for all modules have to be regenerated. We should however try to squeeze more performance out of the XQDoc generatator such that we can remove the 3 templates for the following modules: - http://www.w3.org/2005/xpath-functions - http://www.w3.org/2005/xpath-functions/math - http://www.functx.com/ ** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867125 Title: xqdoc does no dependency checking on inputs Status in Zorba - The XQuery Processor: New Bug description: Every time you type make doc it re-does the whole process, even if none of the inputs has changed. Until this is corrected, it is not reasonable to make the documentation part of the normal build process. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867125/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867198] Re: JSON converter module not proccesing strings with ''
** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867198 Title: JSON converter module not proccesing strings with '' Status in Zorba - The XQuery Processor: New Bug description: I run the next query: import module namespace json=http://www.zorba-xquery.com/modules/converters/json;; declare variable $json-value = '{html:bbold/b}'; json:parse($json-value) And I get then next error: converters\json.xq:158,3: dynamic error [err:FODC0006]: invalid content passed to fn:parse-xml(): loader parsing error: StartTag: invalid element name I've noticed that this problem occurs with any string containing '' so for example if we change the second line for declare variable $json-value := '{html:1 2}' it still crashes in the same way. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867198/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867278] Re: missing serialization options
** Changed in: zorba Assignee: Sorin Marian Nasoi (sorin.marian.nasoi) = Nicolae Brinza (nbrinza) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867278 Title: missing serialization options Status in Zorba - The XQuery Processor: New Bug description: The following serialization parameters seem to be missing: - escape_uri_attributes - normalization_form To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867278/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867344] Re: Implementation of fn:parse and fn:serialize planned?
** Changed in: zorba Assignee: nobody (nobody-users) = Nicolae Brinza (nbrinza) ** Changed in: zorba Assignee: Nicolae Brinza (nbrinza) = (unassigned) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867344 Title: Implementation of fn:parse and fn:serialize planned? Status in Zorba - The XQuery Processor: New Bug description: Are there plans to implement functions to parse and serialize XML according to the W3C standard? That would be great! http://www.w3.org/TR/xpath-functions-11/#func-parse http://www.w3.org/TR/xpath-functions-11/#func-serialize Best regards Mike To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867344/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~danielturcanu/zorba/web_crawler_tutorial into lp:zorba
Daniel Turcanu has proposed merging lp:~danielturcanu/zorba/web_crawler_tutorial into lp:zorba. Requested reviews: Sorin Marian Nasoi (sorin.marian.nasoi) For more details, see: https://code.launchpad.net/~danielturcanu/zorba/web_crawler_tutorial/+merge/79407 Updated the web crawler tutorial with the latest updates in link_crawler2.xq -- https://code.launchpad.net/~danielturcanu/zorba/web_crawler_tutorial/+merge/79407 Your team Zorba Coders is subscribed to branch lp:zorba. === added file 'doc/zorba/link_crawler2.dox' --- doc/zorba/link_crawler2.dox 1970-01-01 00:00:00 + +++ doc/zorba/link_crawler2.dox 2011-10-14 15:00:48 + @@ -0,0 +1,238 @@ +/** +\page link_crawler2 Web Crawler example in XQuery +\code +(: + : Copyright 2006-2011 The FLWOR Foundation. + : + : Licensed under the Apache License, Version 2.0 (the License); + : you may not use this file except in compliance with the License. + : You may obtain a copy of the License at + : + : http://www.apache.org/licenses/LICENSE-2.0 + : + : Unless required by applicable law or agreed to in writing, software + : distributed under the License is distributed on an AS IS BASIS, + : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + : See the License for the specific language governing permissions and + : limitations under the License. +:) + +import module namespace http = http://www.zorba-xquery.com/modules/http-client;; +import module namespace map = http://www.zorba-xquery.com/modules/store/data-structures/unordered-map;; +import module namespace html = http://www.zorba-xquery.com/modules/converters/html;; +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 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;; +declare namespace httpsch = http://expath.org/ns/http-client;; + +declare variable $top-uri as xs:string := http://www.zorba-xquery.com/site2/html/index.html;; +declare variable $uri-host as xs:string := http://www.zorba-xquery.com;; + + + +declare variable $local:processed-internal-links := xs:QName(processed-internal-links); +declare variable $local:processed-external-links := xs:QName(processed-external-links); + + +declare %ann: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(){ + for $x in map:available-maps() + return map:delete($x); +}; + +declare function local:is-internal($x as xs:string) as xs:boolean +{ + starts-with($x, $uri-host) +}; + +declare function local:my-substring-before($s1 as xs:string, $s2 as xs:string) as xs:string +{ +let $sb := fn:substring-before($s1, $s2) +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? +{ + variable $absuri; + try{ +$absuri := local:my-substring-before(resolve-uri(fn:normalize-space($href), $start-uri), #); + } + catch * + { + map:insert($local:processed-external-links, (FROM{$start-uri}/FROM, + MESSAGEmalformed/MESSAGE, + RESULTbroken/RESULT), $href); + } + $absuri +}; + + +declare function local:get-media-type ($http-call as node()) as xs:string +{ + local:my-substring-before($http-call/httpsch:header[@name = 'Content-Type'][1]/string(@value), ;) +}; + +declare function local:alive($http-call as item()*) as xs:boolean +{ + if((count($http-call) ge 1) and +($http-call[1]/@status eq 200)) + then true() else fn:trace(false(), alive) +}; + + +declare %ann: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), + $content//*:img/string(@src), + $content//*:area/string(@href) + ) +return local:get-real-link($y, $uri)) +}; + + +declare %ann: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;|amp;lt;|)(((a|link|area).+?href)|((script|img).+?src))=(['])(.*?)\7) + for $other-uri2 in $search//group[@nr=8]/string() + return local:get-real-link($other-uri2, $uri) + ) +}; + + +declare %ann:sequential function local:map-insert-result($map-name as xs:QName, $url as xs:string,
[Zorba-coders] [Bug 867344] Re: Implementation of fn:parse and fn:serialize planned?
Gabriel, can you please verify and close this bug if this is fixed? The fn:parse-xml seems to be implemented according to the spec. I have attached a working example for fn:serialize. The only difference between the spec: http://www.w3.org/TR/xpath-functions-30/#func-serialize and the implementation in Zorba is the way the parameters are set: In the spec they are suppose to be set with: output:serialization-parameters output:omit-xml-declarationyes/output:omit-xml-declaration /output:serialization-parameters While in Zorba they are set like this: output:serialization-parameters output:omit-xml-declaration value=yes / /output:serialization-parameters If Zorba is correct than it means the W3C spec is wrong and we should raise a bug against the spec, right? ** Attachment added: This is a fn:serialize example taht works in Zorba https://bugs.launchpad.net/zorba/+bug/867344/+attachment/2543989/+files/fn_serialize_example.xq ** Changed in: zorba Assignee: (unassigned) = Gabriel Petrovay (gabipetrovay) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867344 Title: Implementation of fn:parse and fn:serialize planned? Status in Zorba - The XQuery Processor: New Bug description: Are there plans to implement functions to parse and serialize XML according to the W3C standard? That would be great! http://www.w3.org/TR/xpath-functions-11/#func-parse http://www.w3.org/TR/xpath-functions-11/#func-serialize Best regards Mike To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867344/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867350] Re: mess of serialization params
Marked the bug as Fixed released because it was fixed a while ago in the trunk. -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867350 Title: mess of serialization params Status in Zorba - The XQuery Processor: Fix Released Bug description: please, add a few examples in the documentation of http://www.zorba-xquery.com/doc/zorba-latest/zorba/xqdoc/xhtml/com/zorba-xquery/www/modules/serialize.html#serialize-2 that would make the users life more easier. Also, there are 3 different ways of setting serialization parameters: ser:serialize( $items, output indent=yes omit-xml-declaration=yes / ) fs:write( $file, $content, indentyes/indent ) zu:tidy( $item, 'indent=yes') as far as it is possible according to standardization and backwards compatibility issues it would be great if they were interchangable. for example: zu:tidy( $item, indentyes/indent ) zu:tidy( $item, output indent=yes omit-xml-declaration=yes /) should be valid. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867350/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867230] Re: unit-convert test should not hit the web
** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867230 Title: unit-convert test should not hit the web Status in Zorba - The XQuery Processor: New Bug description: The unit-conversion data-cleaning library uses a web service. Currently that web service isn't responding, leading to remote queue delays and failures, so I have disabled the test on the remote queue. IMHO this library should not require the web, at least for a decent set of well-known units (the test case in question is converting miles to kilometers). To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867230/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867149] Re: Built target cxxdocs hangs
** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867149 Title: Built target cxxdocs hangs Status in Zorba - The XQuery Processor: New Bug description: I did a clean build, make, then make doc and it gets to: Patching output file 132/132 finished... [100%] Built target cxxdocs and the running zorba process hangs with 90%+ CPU. It didn't use to do this. The reason for the high priority is that zorba hanging is serious. This is on Mac OS X (if it matters). To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867149/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867231] Re: geocode-from-address results change
** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867231 Title: geocode-from-address results change Status in Zorba - The XQuery Processor: New Bug description: Test case zorba_data-cleaning_module/data-cleaning/conversion/geocode- from-address.xq - the results have changed; apparently the geocode for Lisbon is a few feet away from where it was. I've marked this as an expected failure. Changing the expected results is easy enough, but I'd like a little idea of how likely changes like this are in the future - is there any way to change the test to make it more stable? To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867231/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 872732] Re: K2-NamespaceURIForPrefixFunc-2 test fails
** Changed in: zorba Milestone: None = 2.1 ** Changed in: zorba Importance: Undecided = Medium -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/872732 Title: K2-NamespaceURIForPrefixFunc-2 test fails Status in Zorba - The XQuery Processor: New Bug description: this is the ctest output: test w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2 === Query: === (:***:) (: Test: K2-NamespaceURIForPrefixFunc-2 :) (: Written by: Frans Englich :) (: Date: 2007-11-22T11:31:21+01:00 :) (: Purpose: Test that the correct default namespace is picked up(#2). :) (:***:) namespace-uri-for-prefix(, exactly-one(e xmlns=http://www.example.com/A; xmlns:A=http://www.example.com/C; b xmlns:B=http://www.example.com/C; xmlns=/ /e/b)) eq === end of Query === === Result: === true === end of result === testdriver: non-canonical result for reference result # 1 doesn't match. Actual and Reference canonical results are not identical Actual Canonical Result: roottrue/root Reference Canonical Result: root/root See line 1, col 6 of expected result. Actual: roottrue/root Expected: root/root testdriver: canonical result for reference result # 1 doesn't match. testdriver: none of the reference results matched To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/872732/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 874400] [NEW] bug in the XQDoc visitor in Zorba
Public bug reported: This was reported by Dana: If inside a module you have a function signature like this: declare function fn:map($f as function(item()) as item()*, $seq as item()*) as item()* external; The XQDoc XML resulted is this: xqdoc:function arity=2 [...] xqdoc:signaturedeclare function fn:map($f as , $seq as item()*) as item()* external/xqdoc:signature /xqdoc:function instead of this: xqdoc:function arity=2 [...] xqdoc:signaturedeclare function fn:map($f as function(item()) as item()*, $seq as item()*) as item()* external/xqdoc:signature /xqdoc:function ** Affects: zorba Importance: Medium Assignee: Sorin Marian Nasoi (sorin.marian.nasoi) Status: New ** Changed in: zorba Assignee: (unassigned) = Sorin Marian Nasoi (sorin.marian.nasoi) ** Changed in: zorba Importance: Undecided = Medium ** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/874400 Title: bug in the XQDoc visitor in Zorba Status in Zorba - The XQuery Processor: New Bug description: This was reported by Dana: If inside a module you have a function signature like this: declare function fn:map($f as function(item()) as item()*, $seq as item()*) as item()* external; The XQDoc XML resulted is this: xqdoc:function arity=2 [...] xqdoc:signaturedeclare function fn:map($f as , $seq as item()*) as item()* external/xqdoc:signature /xqdoc:function instead of this: xqdoc:function arity=2 [...] xqdoc:signaturedeclare function fn:map($f as function(item()) as item()*, $seq as item()*) as item()* external/xqdoc:signature /xqdoc:function To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/874400/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867094] Re: XQTS failures due to W3C bugs
** Changed in: zorba Milestone: None = 2.1 ** Changed in: zorba Importance: Low = Medium -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867094 Title: XQTS failures due to W3C bugs Status in Zorba - The XQuery Processor: New Bug description: The following XQTS are marked as expected failures due to W3C bugs: test/rbkt/w3c_testsuite/XQueryX/Construct/ComputeCon/ComputeConAttr/K2-ComputeConAttr-35 test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes011 test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes012 test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes013 test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes014 test/rbkt/w3c_testsuite/XQueryX/StaticTyping/STPathExpr/STSteps/STAxes/ST-Axes015 This is a tracking bug so that we can mark them as expected failures in our system. When/if the corresponding W3C bugs are resolved, this bug should be updated. Assigning to Sorin as the master of W3C conformance. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867094/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 871051] Re: 3 data-cleaning tests failing
** Changed in: zorba Assignee: (unassigned) = Sorin Marian Nasoi (sorin.marian.nasoi) ** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/871051 Title: 3 data-cleaning tests failing Status in Zorba - The XQuery Processor: New Bug description: Reported also by Markos on the list in the dicussion: URGENT 3 data- cleaning tests failing zorba_data-cleaning_module/data-cleaning/conversion/address-from-user.xq zorba_data-cleaning_module/data-cleaning/conversion/phone-from-user.xq zorba_data-cleaning_module/data-cleaning/conversion/user-from-phone.xq The tests have been disabled in: http://bazaar.launchpad.net/~zorba-coders/zorba/data-cleaning-module/view/head:/CMakeLists.txt To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/871051/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/itemfactory into lp:zorba
Rodolfo - it looks from the diffs like maybe the files XQuery.i and Zorba.i have Windows line endings, or something? The whole files are showing up as one big diff, even though it doesn't look like everything changed. Any idea what's going on there? I think it's the file encoding, I had this problem before, Windows default is ANSI and *nix is UTF-8, can you convert them from ANSI to UTF-8? -- https://code.launchpad.net/~zorba-coders/zorba/itemfactory/+merge/79181 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 874676] [NEW] Remove SET_CMAKE_MODULE_PATH
Public bug reported: This macro wasn't in Zorba 2.0. Therefore, using it in modules means that those modules require Zorba 2.1 for building, even though they (as far as I know) don't need it for running. There will probably be cases in the future where such dependencies are un-avoidable, but in this case SET_CMAKE_MODULE_PATH is at best a small convenience, so I don't think it's worth the cost. In fact, I think it's actually kind of a bad idea, because it enforces a directory naming convention on module authors. ** Affects: zorba Importance: Medium Assignee: Gabriel Petrovay (gabipetrovay) Status: New ** Changed in: zorba Importance: Undecided = Medium ** Changed in: zorba Assignee: (unassigned) = Gabriel Petrovay (gabipetrovay) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/874676 Title: Remove SET_CMAKE_MODULE_PATH Status in Zorba - The XQuery Processor: New Bug description: This macro wasn't in Zorba 2.0. Therefore, using it in modules means that those modules require Zorba 2.1 for building, even though they (as far as I know) don't need it for running. There will probably be cases in the future where such dependencies are un-avoidable, but in this case SET_CMAKE_MODULE_PATH is at best a small convenience, so I don't think it's worth the cost. In fact, I think it's actually kind of a bad idea, because it enforces a directory naming convention on module authors. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/874676/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867125] Re: xqdoc does no dependency checking on inputs
It's actually easily possible in CMake to introduce dependencies on any files. So it would be easy to ensure that the doc target also depends on the stylesheets and so forth. -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867125 Title: xqdoc does no dependency checking on inputs Status in Zorba - The XQuery Processor: New Bug description: Every time you type make doc it re-does the whole process, even if none of the inputs has changed. Until this is corrected, it is not reasonable to make the documentation part of the normal build process. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867125/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 874679] [NEW] Clean up second arg to ADD_TEST_DIRECTORY()
Public bug reported: The second (optional) argument to ADD_TEST_DIRECTORY() contains a list of test cases that should be skipped (ie, not created at all). This is extremely dangerous. By bypassing them entirely, there is no way of detecting when the bug is fixed. We have already had serious problems caused by test removal hiding the introduction of new bugs in the past. I understand that removing a test that segfaults is necessary on Windows in order for the tests to run unattended. However, it should never be done on other platforms. So ADD_TEST_DIRECTORY() should instead mark the bugs as EXPECTED_FAILURE()s on other platforms. (I realize that *currently* all places that pass a list of segfaulting tests to ADD_TEST_DIRECTORY() are inside an IF(WIN32), but this is not sufficient - ADD_TEST_DIRECTORY() itself must enforce that the tests are skipped only on Windows, or else sooner or later someone will accidentally do it wrong. There's currently no documentation either, making this much more likely.) In order to do this, ADD_TEST_DIRECTORY() needs to either accept a list of pairs of the form (testname, bug ID), or else accept two parallel lists (testnames and bug IDs), so it can pass the bug number to EXPECTED_FAILURE(). A slightly more difficult approach would be to introduce a new KNOWN_SEGFAULT() macro that handled this in conjunction with ADD_TEST_DIRECTORY(). I'm not totally sure this is a good idea, though, because it would (silently) not do anything for tests added by any means other than ADD_TEST_DIRECTORY(). ** Affects: zorba Importance: High Assignee: Gabriel Petrovay (gabipetrovay) Status: New ** Changed in: zorba Importance: Undecided = High ** Changed in: zorba Assignee: (unassigned) = Gabriel Petrovay (gabipetrovay) ** Changed in: zorba Milestone: None = 2.1 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/874679 Title: Clean up second arg to ADD_TEST_DIRECTORY() Status in Zorba - The XQuery Processor: New Bug description: The second (optional) argument to ADD_TEST_DIRECTORY() contains a list of test cases that should be skipped (ie, not created at all). This is extremely dangerous. By bypassing them entirely, there is no way of detecting when the bug is fixed. We have already had serious problems caused by test removal hiding the introduction of new bugs in the past. I understand that removing a test that segfaults is necessary on Windows in order for the tests to run unattended. However, it should never be done on other platforms. So ADD_TEST_DIRECTORY() should instead mark the bugs as EXPECTED_FAILURE()s on other platforms. (I realize that *currently* all places that pass a list of segfaulting tests to ADD_TEST_DIRECTORY() are inside an IF(WIN32), but this is not sufficient - ADD_TEST_DIRECTORY() itself must enforce that the tests are skipped only on Windows, or else sooner or later someone will accidentally do it wrong. There's currently no documentation either, making this much more likely.) In order to do this, ADD_TEST_DIRECTORY() needs to either accept a list of pairs of the form (testname, bug ID), or else accept two parallel lists (testnames and bug IDs), so it can pass the bug number to EXPECTED_FAILURE(). A slightly more difficult approach would be to introduce a new KNOWN_SEGFAULT() macro that handled this in conjunction with ADD_TEST_DIRECTORY(). I'm not totally sure this is a good idea, though, because it would (silently) not do anything for tests added by any means other than ADD_TEST_DIRECTORY(). To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/874679/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867125] Re: xqdoc does no dependency checking on inputs
Chris I was not talking about a stylesheet I am talking about changes in what we display, meaniing changes in the xqdoc2xhtml module that impact all XQDoc generated XHTML pages. If for instance - we decide it's better to show another section between the module description and function summary (like it was the case with the annotations section) - or we decide that one of the sections should look different (like it was the case with the variables section) Then, all XQDoc pages change. One can not know that something has changed until one generates all the new XQDoc pages. So you see why I say that the CMake way does not help in this case? The solution is to have 'make xqdoc' even quicker and generate all the pages every time: do you agree? -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867125 Title: xqdoc does no dependency checking on inputs Status in Zorba - The XQuery Processor: New Bug description: Every time you type make doc it re-does the whole process, even if none of the inputs has changed. Until this is corrected, it is not reasonable to make the documentation part of the normal build process. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867125/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Bug 867125] Re: xqdoc does no dependency checking on inputs
If 'make xqdoc' only took a template and put content in some sections, then one could have implemented your suggestion and regenerate XHTML pages only for the modules that changed, or for all modules if the template has changed. But this is not the case: most of the last changes were in xqdoc2xhtml module itself. So one can not know when the changes in xqdoc2xhtml module impact all XHTML generated documentation or only some pages. So the solution IMHO is to generate all XHTML pages for all modules as quick as possible. -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/867125 Title: xqdoc does no dependency checking on inputs Status in Zorba - The XQuery Processor: New Bug description: Every time you type make doc it re-does the whole process, even if none of the inputs has changed. Until this is corrected, it is not reasonable to make the documentation part of the normal build process. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/867125/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp