[Zorba-coders] [Bug 867248] Re: smtp module: send() uses illegal encoding for subject

2012-07-16 Thread David Graf
** Changed in: zorba
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/867248

Title:
  smtp module: send() uses illegal encoding for subject

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  smtp:send() uses illegal encoding for subject/to/from if  a non-7bit
   character is used.

   please see rfc2047

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/867248/+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:~nbrinza/zorba/error-messages into lp:zorba

2012-07-16 Thread David Graf
Review: Approve

Very cool. It's just annoying that zorba needs parameters to execute a file. 
But it's already nice to be able to write scripts like this:

#!./bin/zorba -f -q 
   
1+2
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/error-messages into 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 1025197] [NEW] infinite loop in converters/html parse

2012-07-16 Thread Dennis Knochenwefel
Public bug reported:

the following query makes zorba hang forever:


import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;

let $text := lt;p#xd83d;lt;/p
return html:parse($text)

(not sure if chiller is you, chris?)

** Affects: zorba
 Importance: Undecided
 Assignee: Chris Hillery (ceejatec)
 Status: New


** Tags: improve-code-quality incorrect-result usability

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025197

Title:
  infinite loop in converters/html parse

Status in Zorba - The XQuery Processor:
  New

Bug description:
  the following query makes zorba hang forever:

  
  import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;

  let $text := lt;p#xd83d;lt;/p
  return html:parse($text)

  (not sure if chiller is you, chris?)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025197/+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 1025194] [NEW] in module converters/html function parse returns empty sequence on error

2012-07-16 Thread Dennis Knochenwefel
Public bug reported:

Consider the following example Query:

  import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
  import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
  declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
  let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
  return html:parse($text)

Problem:

this query raises an error in file src/com/zorba-
xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
createHtmlItem(...) and returns an empty sequence. Yet, html:parse ()
has return type document-node().


(not sure if chiller is you, chris?)

** Affects: zorba
 Importance: Undecided
 Assignee: Chris Hillery (ceejatec)
 Status: New


** Tags: improve-code-quality incorrect-result usability

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025194

Title:
  in module converters/html function parse returns empty sequence on
  error

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Consider the following example Query:

import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
return html:parse($text)

  Problem:

  this query raises an error in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) and returns an empty sequence. Yet, html:parse ()
  has return type document-node().

  
  (not sure if chiller is you, chris?)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025194/+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 1025193] [NEW] no error reporting in converters/html module

2012-07-16 Thread Dennis Knochenwefel
Public bug reported:

Consider the following example Query:

  import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
  import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
  declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
  let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
  return html:parse($text)

Problem:

in file src/com/zorba-
xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
createHtmlItem(...) doesn't throw a proper error message (discovered by
ghislain) which makes debugging really hard. In contrast, parse-xml
throws a very helpful error:

  dynamic error [err:FODC0006]: invalid content passed to fn:parse-
xml(): loader parsing error: Char 0xD83D out of allowed range;

Could html:parse report the same error?

(not sure if chiller is you, chris?)

** Affects: zorba
 Importance: Undecided
 Assignee: Chris Hillery (ceejatec)
 Status: New


** Tags: improve-code-quality incorrect-result usability

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025193

Title:
  no error reporting in converters/html module

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Consider the following example Query:

import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
return html:parse($text)

  Problem:

  in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) doesn't throw a proper error message (discovered
  by ghislain) which makes debugging really hard. In contrast, parse-xml
  throws a very helpful error:

dynamic error [err:FODC0006]: invalid content passed to fn:parse-
  xml(): loader parsing error: Char 0xD83D out of allowed range;

  Could html:parse report the same error?

  (not sure if chiller is you, chris?)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025193/+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 1024448] Re: data-converter module problems with non utf-8 characters

2012-07-16 Thread Dennis Knochenwefel
** Description changed:

  In public Json streams lots of non-utf8 character escapes can be found
  causing some problems when parsing json or tidying the contained html (
  as for example marketed here: http://www.charbase.com/1f44a-unicode-
  fisted-hand-sign ).
  
  The following example Query causes a whole bunch of problems:
  
-   import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
-   import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
-   declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
-   let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
-   return html:parse($text)
+   import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
+   import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
+   declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
+   let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
+   return html:parse($text)
  
  Problems:
  
  1. html:parse () has return type document-node(), but tries to return an
  empty-sequence in this example (discovered by ghislain)
  
- 2. in file 
src/com/zorba-xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function 
createHtmlItem(...) doesn't throw a proper error message (discovered by 
ghislain) which makes debugging really hard. In contrast, parse-xml throws a 
very helpful error:
-  
-   dynamic error [err:FODC0006]: invalid content passed to fn:parse-xml(): 
loader parsing error: Char 0xD83D out of allowed range;
+ * -- moved to bug #1025194 *
+ 
+ 2. in file src/com/zorba-
+ xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
+ createHtmlItem(...) doesn't throw a proper error message (discovered by
+ ghislain) which makes debugging really hard. In contrast, parse-xml
+ throws a very helpful error:
+ 
+   dynamic error [err:FODC0006]: invalid content passed to fn:parse-
+ xml(): loader parsing error: Char 0xD83D out of allowed range;
  
  Could html:parse report the same error?
+ 
+ * -- moved to bug #1025193 *
  
  3. json:parse() doesn't report an error here which is good in my
  opinion. Yet, as these utf-16 (?) encoded characters are used a lot in
  json, would it be possible to transform them into valid utf-8 (e.g.
  \ud83d\udc4a - #x1f44a;)?
  
  Maybe these findings are going to be a problem in Jsoniq as well?

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1024448

Title:
  data-converter module problems with non utf-8 characters

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  In public Json streams lots of non-utf8 character escapes can be found
  causing some problems when parsing json or tidying the contained html
  ( as for example marketed here: http://www.charbase.com/1f44a-unicode-
  fisted-hand-sign ).

  The following example Query causes a whole bunch of problems:

    import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
    import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
    declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
    let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
    return html:parse($text)

  Problems:

  1. html:parse () has return type document-node(), but tries to return
  an empty-sequence in this example (discovered by ghislain)

  * -- moved to bug #1025194 *

  2. in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) doesn't throw a proper error message (discovered
  by ghislain) which makes debugging really hard. In contrast, parse-xml
  throws a very helpful error:

    dynamic error [err:FODC0006]: invalid content passed to fn:parse-
  xml(): loader parsing error: Char 0xD83D out of allowed range;

  Could html:parse report the same error?

  * -- moved to bug #1025193 *

  3. json:parse() doesn't report an error here which is good in my
  opinion. Yet, as these utf-16 (?) encoded characters are used a lot in
  json, would it be possible to transform them into valid utf-8 (e.g.
  \ud83d\udc4a - #x1f44a;)?

  Maybe these findings are going to be a problem in Jsoniq as well?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1024448/+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 1024448] Re: data-converter module problems with non utf-8 characters

2012-07-16 Thread Dennis Knochenwefel
I'm not an encoding expert, so anything I say may potentially be wrong.

The string \ud83d\udc4a is an example containing a single javascript
escaped special character (cf http://www.charbase.com/1f44a-unicode-
fisted-hand-sign ). This is very common in JSON data as javascript
engines seem to use encodings utf-16 or ucs-2 internally.

I believe that the json parser attempts to parse \ud83d\udc4a as two
single utf-8 characters. As a result, it returns a string containing
invalid codepoints. This can be reproduced with the following query:

  import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
  declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
  json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text()

returns:

  dynamic error [err:FOCH0001]: 55357: 
  invalid code point; raised at 
runtime\zorba\src\api\serialization\serializer.cpp:204

Would it be possible for the json parser to detect utf-16 encoded
characters and convert them into valid utf-8 characters?

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1024448

Title:
  data-converter module problems with non utf-8 characters

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  In public Json streams lots of non-utf8 character escapes can be found
  causing some problems when parsing json or tidying the contained html
  ( as for example marketed here: http://www.charbase.com/1f44a-unicode-
  fisted-hand-sign ).

  The following example Query causes a whole bunch of problems:

    import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
    import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
    declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
    let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
    return html:parse($text)

  Problems:

  1. html:parse () has return type document-node(), but tries to return
  an empty-sequence in this example (discovered by ghislain)

  * -- moved to bug #1025194 *

  2. in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) doesn't throw a proper error message (discovered
  by ghislain) which makes debugging really hard. In contrast, parse-xml
  throws a very helpful error:

    dynamic error [err:FODC0006]: invalid content passed to fn:parse-
  xml(): loader parsing error: Char 0xD83D out of allowed range;

  Could html:parse report the same error?

  * -- moved to bug #1025193 *

  3. json:parse() doesn't report an error here which is good in my
  opinion. Yet, as these utf-16 (?) encoded characters are used a lot in
  json, would it be possible to transform them into valid utf-8 (e.g.
  \ud83d\udc4a - #x1f44a;)?

  Maybe these findings are going to be a problem in Jsoniq as well?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1024448/+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 1025194] Re: in module converters/html function parse returns empty sequence on error

2012-07-16 Thread Dennis Knochenwefel
** Description changed:

  Consider the following example Query:
  
-   import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
-   import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
-   declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
-   let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
-   return html:parse($text)
+   import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
+   import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
+   declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
+   let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
+   return html:parse($text)
  
  Problem:
  
  this query raises an error in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) and returns an empty sequence. Yet, html:parse ()
- has return type document-node().
- 
+ has return type document-node() (not document-node()?). Therefore, it is
+ not allowed to return an empty-sequence.
  
  (not sure if chiller is you, chris?)

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025194

Title:
  in module converters/html function parse returns empty sequence on
  error

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Consider the following example Query:

    import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
    import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
    declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
    let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
    return html:parse($text)

  Problem:

  this query raises an error in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) and returns an empty sequence. Yet, html:parse ()
  has return type document-node() (not document-node()?). Therefore, it
  is not allowed to return an empty-sequence.

  (not sure if chiller is you, chris?)

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025194/+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:~nbrinza/zorba/error-messages into lp:zorba

2012-07-16 Thread Nicolae Brinza
Review: Approve


-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
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:~nbrinza/zorba/error-messages into lp:zorba

2012-07-16 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/error-messages into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
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:~nbrinza/zorba/error-messages into lp:zorba

2012-07-16 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/error-messages-2012-07-16T12-06-02.175Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
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:~nbrinza/zorba/error-messages into lp:zorba

2012-07-16 Thread Zorba Build Bot
Validation queue job error-messages-2012-07-16T12-06-02.175Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
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:~nbrinza/zorba/error-messages into lp:zorba

2012-07-16 Thread noreply
The proposal to merge lp:~nbrinza/zorba/error-messages into lp:zorba has been 
updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/114935
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 891453] Re: XQuery grammar needs EQNames

2012-07-16 Thread Matthias Brantner
*** This bug is a duplicate of bug 997045 ***
https://bugs.launchpad.net/bugs/997045

the EQName issue was fixed with merging the branch at 
lp:~nbrinza/zorba/error-messages.
I also confirm that the AtomicOrUnionType production is there.

** Changed in: zorba
   Status: Confirmed = Fix Committed

** This bug has been marked a duplicate of bug 997045
   EQName regressions

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/891453

Title:
  XQuery grammar needs EQNames

Status in Zorba - The XQuery Processor:
  Fix Committed

Bug description:
  According to Matthias, the XQuery grammar needs to be extended to
  support EQNames.  There also needs to be an AtonicOrUntionType
  production.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/891453/+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 1024448] Re: data-converter module problems with non utf-8 characters

2012-07-16 Thread Matthias Brantner
I'm not sure I understand.

1. The default for JSON strings seems to be UTF-8.
2. If a JSON string uses an encoding other than UTF-8, the entire string should 
be transcoded. This needs to be done when the data its retrieve. For example, 
by passing an encoding parameter to file:read-text.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1024448

Title:
  data-converter module problems with non utf-8 characters

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  In public Json streams lots of non-utf8 character escapes can be found
  causing some problems when parsing json or tidying the contained html
  ( as for example marketed here: http://www.charbase.com/1f44a-unicode-
  fisted-hand-sign ).

  The following example Query causes a whole bunch of problems:

    import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
    import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
    declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
    let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
    return html:parse($text)

  Problems:

  1. html:parse () has return type document-node(), but tries to return
  an empty-sequence in this example (discovered by ghislain)

  * -- moved to bug #1025194 *

  2. in file src/com/zorba-
  xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
  createHtmlItem(...) doesn't throw a proper error message (discovered
  by ghislain) which makes debugging really hard. In contrast, parse-xml
  throws a very helpful error:

    dynamic error [err:FODC0006]: invalid content passed to fn:parse-
  xml(): loader parsing error: Char 0xD83D out of allowed range;

  Could html:parse report the same error?

  * -- moved to bug #1025193 *

  3. json:parse() doesn't report an error here which is good in my
  opinion. Yet, as these utf-16 (?) encoded characters are used a lot in
  json, would it be possible to transform them into valid utf-8 (e.g.
  \ud83d\udc4a - #x1f44a;)?

  Maybe these findings are going to be a problem in Jsoniq as well?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1024448/+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/bug1023120-schemaImport into lp:zorba

2012-07-16 Thread Cezar Andrei
The Xerces doc doesn't say what happens with the buffer, but I checked the 
source and they both (setSystemId and setPublicId) do make copies of the buffer.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1023120-schemaImport/+merge/114712
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 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.

2012-07-16 Thread Matthias Brantner
The problem is that the key expression in the index declaration accesses
a function of the module. However, this function doesn't seem to be
compiled, yet.

As a side-node, the example above should raise an error because the key
expression tries to access the dynamic context (because of fn:current-
dateTime) which is not allowed.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1024892

Title:
  Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Compiling the following query:
  module namespace guestbook = 
http://www.28msec.com/templates/guestbook/guestbook;;

  import module namespace functx = http://www.functx.com/;;

  import module namespace db = 
http://www.zorba-xquery.com/modules/store/static/collections/dml;;
  import module namespace idx = 
http://www.zorba-xquery.com/modules/store/static/indexes/dml;;

  declare namespace an = http://www.zorba-xquery.com/annotations;;

  declare collection guestbook:entries as node()*;
  declare variable $guestbook:entries as xs:QName := 
xs:QName(guestbook:entries);

  (: Access a document range :)
  declare %private %an:automatic %an:unique %an:value-range index 
guestbook:by-date
on nodes db:collection(xs:QName('guestbook:entries'))
by  guestbook:convert-dateTime(@datetime) as xs:dateTime;
  declare %private variable $guestbook:by-date as xs:QName := 
xs:QName('guestbook:by-date');

  declare function guestbook:convert-dateTime($dateTime as xs:string)
  as xs:dateTime {
current-dateTime()
  };

  Results in

  0   libzorba_simplestore.2.5.0.dylib0x00010932780a 
_ZN5zorba16assertion_failedEPKcS1_iS1_ + 74
  1   libzorba_simplestore.2.5.0.dylib0x000109488cbf 
_ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259
  2   libzorba_simplestore.2.5.0.dylib0x00010921ab66 
_ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150
  3   libzorba_simplestore.2.5.0.dylib0x00010920ab69 
_ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125
  4   libzorba_simplestore.2.5.0.dylib0x00010920bdc2 
_ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304
  5   libzorba_simplestore.2.5.0.dylib0x00010914d938 
_ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482
  6   libzorba_simplestore.2.5.0.dylib0x0001090f706c 
_ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78
  7   libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 
_ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64
  8   libzorba_simplestore.2.5.0.dylib0x0001090f5b12 
_ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78
  9   libzorba_simplestore.2.5.0.dylib0x0001090f5a9a 
_ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96
  10  libzorba_simplestore.2.5.0.dylib0x00010912afa9 
_ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE
 + 105
  11  libzorba_simplestore.2.5.0.dylib0x000109142381 
_ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243
  12  libzorba_simplestore.2.5.0.dylib0x0001090fd432 
_ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206
  13  libzorba_simplestore.2.5.0.dylib0x0001090f5b00 
_ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60
  14  libzorba_simplestore.2.5.0.dylib0x0001090f59fe 
_ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78
  15  libzorba_simplestore.2.5.0.dylib0x00010912afa9 
_ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE
 + 105
  16  libzorba_simplestore.2.5.0.dylib0x00010912ad3e 
_ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446
  17  libzorba_simplestore.2.5.0.dylib0x0001092344b6 
_ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34
  18  libzorba_simplestore.2.5.0.dylib0x0001092345cc 
_ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE
 + 130
  19  libzorba_simplestore.2.5.0.dylib0x0001092355a8 
_ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm
 + 534
  20  libzorba_simplestore.2.5.0.dylib0x000109065551 
_ZN5zorba10XQueryImpl9doCompileERSiRK19Zorba_CompilerHintsbRm + 861
  21  libzorba_simplestore.2.5.0.dylib0x000109065cce 
_ZN5zorba10XQueryImpl7compileERSiRKNS_8SmartPtrINS_13StaticContextEEERK19Zorba_CompilerHints
 + 518
  22  

Re: [Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.

2012-07-16 Thread William Candillon
Yes, you can replace current-dateTime() by 1 if it is easier to fix the problem.
In fact the real example wasn't using current-dateTime().

On Mon, Jul 16, 2012 at 6:48 PM, Matthias Brantner
1024...@bugs.launchpad.net wrote:
 The problem is that the key expression in the index declaration accesses
 a function of the module. However, this function doesn't seem to be
 compiled, yet.

 As a side-node, the example above should raise an error because the key
 expression tries to access the dynamic context (because of fn:current-
 dateTime) which is not allowed.

 --
 You received this bug notification because you are subscribed to the bug
 report.
 https://bugs.launchpad.net/bugs/1024892

 Title:
   Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.

 Status in Zorba - The XQuery Processor:
   New

 Bug description:
   Compiling the following query:
   module namespace guestbook = 
 http://www.28msec.com/templates/guestbook/guestbook;;

   import module namespace functx = http://www.functx.com/;;

   import module namespace db = 
 http://www.zorba-xquery.com/modules/store/static/collections/dml;;
   import module namespace idx = 
 http://www.zorba-xquery.com/modules/store/static/indexes/dml;;

   declare namespace an = http://www.zorba-xquery.com/annotations;;

   declare collection guestbook:entries as node()*;
   declare variable $guestbook:entries as xs:QName := 
 xs:QName(guestbook:entries);

   (: Access a document range :)
   declare %private %an:automatic %an:unique %an:value-range index 
 guestbook:by-date
 on nodes db:collection(xs:QName('guestbook:entries'))
 by  guestbook:convert-dateTime(@datetime) as xs:dateTime;
   declare %private variable $guestbook:by-date as xs:QName := 
 xs:QName('guestbook:by-date');

   declare function guestbook:convert-dateTime($dateTime as xs:string)
   as xs:dateTime {
 current-dateTime()
   };

   Results in

   0   libzorba_simplestore.2.5.0.dylib0x00010932780a 
 _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74
   1   libzorba_simplestore.2.5.0.dylib0x000109488cbf 
 _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259
   2   libzorba_simplestore.2.5.0.dylib0x00010921ab66 
 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150
   3   libzorba_simplestore.2.5.0.dylib0x00010920ab69 
 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125
   4   libzorba_simplestore.2.5.0.dylib0x00010920bdc2 
 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304
   5   libzorba_simplestore.2.5.0.dylib0x00010914d938 
 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482
   6   libzorba_simplestore.2.5.0.dylib0x0001090f706c 
 _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78
   7   libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 
 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64
   8   libzorba_simplestore.2.5.0.dylib0x0001090f5b12 
 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78
   9   libzorba_simplestore.2.5.0.dylib0x0001090f5a9a 
 _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96
   10  libzorba_simplestore.2.5.0.dylib0x00010912afa9 
 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE
  + 105
   11  libzorba_simplestore.2.5.0.dylib0x000109142381 
 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243
   12  libzorba_simplestore.2.5.0.dylib0x0001090fd432 
 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206
   13  libzorba_simplestore.2.5.0.dylib0x0001090f5b00 
 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60
   14  libzorba_simplestore.2.5.0.dylib0x0001090f59fe 
 _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78
   15  libzorba_simplestore.2.5.0.dylib0x00010912afa9 
 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE
  + 105
   16  libzorba_simplestore.2.5.0.dylib0x00010912ad3e 
 _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446
   17  libzorba_simplestore.2.5.0.dylib0x0001092344b6 
 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34
   18  libzorba_simplestore.2.5.0.dylib0x0001092345cc 
 _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE
  + 130
   19  libzorba_simplestore.2.5.0.dylib0x0001092355a8 
 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm
  + 534
   20  

[Zorba-coders] [Bug 1024448] Re: data-converter module problems with non utf-8 characters

2012-07-16 Thread Paul J. Lucas
I believe what's going on is that byte sequences like \ud83d\udc4a are
supposed to represent UTF-16 surrogate pairs. This is what Dennis
suggests since 1F44A is the Unicode code point represented.

IMHO, this is a bizarre way to do things: use a UTF-8 byte sequence to
encode UTF-16 surrogate pairs. The code-points represented by the
surrogate pairs should just be encoded in UTF-8 directly.

That said, I believe it's probably possible to handle this bizarre case
and do the right thing.

** Summary changed:

- data-converter module problems with non utf-8 characters
+ JSON parser doesn't recognize UTF-16 surrogate pairs

** Description changed:

- In public Json streams lots of non-utf8 character escapes can be found
- causing some problems when parsing json or tidying the contained html (
- as for example marketed here: http://www.charbase.com/1f44a-unicode-
- fisted-hand-sign ).
- 
- The following example Query causes a whole bunch of problems:
- 
-   import module namespace json = 
http://www.zorba-xquery.com/modules/converters/json;;
-   import module namespace html = 
http://www.zorba-xquery.com/modules/converters/html;;
-   declare namespace j = http://john.snelson.org.uk/parsing-json-into-xquery;;
-   let $text := lt;p || json:parse({text:Let's get it. 
\ud83d\udc4a})/j:pair[@name=text]/text() || lt;/p
-   return html:parse($text)
- 
- Problems:
- 
- 1. html:parse () has return type document-node(), but tries to return an
- empty-sequence in this example (discovered by ghislain)
- 
- * -- moved to bug #1025194 *
- 
- 2. in file src/com/zorba-
- xquery/www/modules/converters/html.xq.src/tidy_wrapper.h function
- createHtmlItem(...) doesn't throw a proper error message (discovered by
- ghislain) which makes debugging really hard. In contrast, parse-xml
- throws a very helpful error:
- 
-   dynamic error [err:FODC0006]: invalid content passed to fn:parse-
- xml(): loader parsing error: Char 0xD83D out of allowed range;
- 
- Could html:parse report the same error?
- 
- * -- moved to bug #1025193 *
- 
- 3. json:parse() doesn't report an error here which is good in my
- opinion. Yet, as these utf-16 (?) encoded characters are used a lot in
- json, would it be possible to transform them into valid utf-8 (e.g.
- \ud83d\udc4a - #x1f44a;)?
- 
- Maybe these findings are going to be a problem in Jsoniq as well?
+ The JSON parser doesn't recognize UTF-16 surrogate pairs, e.g., the byte
+ sequence \ud83d\udc4a is currently converted to two separate Unicode
+ code-points when it ought to recognize that as a UTF-16 surrogate pair
+ and result in the Unicode code-point of 1F44A.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1024448

Title:
  JSON parser doesn't recognize UTF-16 surrogate pairs

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  The JSON parser doesn't recognize UTF-16 surrogate pairs, e.g., the
  byte sequence \ud83d\udc4a is currently converted to two separate
  Unicode code-points when it ought to recognize that as a UTF-16
  surrogate pair and result in the Unicode code-point of 1F44A.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1024448/+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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Paul J. Lucas
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222

Clean-up.
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/util/fs_util.cpp'
--- src/util/fs_util.cpp	2012-07-13 14:44:56 +
+++ src/util/fs_util.cpp	2012-07-16 20:35:25 +
@@ -331,13 +331,11 @@
 #ifndef WIN32
 if ( (ent_ = ::readdir( dir_ )) ) {
   switch ( ent_-d_type ) {
-case DT_DIR: {
-  char const *const name = ent_-d_name;
-  if ( is_dots( name ) )
+case DT_DIR:
+  if ( is_dots( ent_-d_name ) )
 continue;   // skip . and .. entries
   ent_type_ = directory;
   break;
-}
 case DT_LNK:
   ent_type_ = link;
   break;
@@ -353,7 +351,7 @@
   // This check fixes bug #1023862.
   //
   zstring ent_path( dir_path_ );
-  fs::append( ent_path, static_castchar const*( ent_-d_name ) );
+  fs::append( ent_path, ent_-d_name );
   ent_type_ = get_type( ent_path );
   if ( ent_type_ == directory  is_dots( ent_-d_name ) )
 continue;   // skip . and .. entries

=== modified file 'src/util/fs_util.h'
--- src/util/fs_util.h	2012-07-12 17:29:55 +
+++ src/util/fs_util.h	2012-07-16 20:35:25 +
@@ -31,6 +31,7 @@
 #include ascii_util.h
 #include cxx_util.h
 #include error_util.h
+#include string_util.h
 #include zorbatypes/zstring.h
 
 #ifndef MAX_PATH
@@ -78,6 +79,13 @@
 };
 extern char const *const type_string[];
 
+/**
+ * Emits the string representation of a file type to the given ostream.
+ *
+ * @param o The ostream to emit to.
+ * @param t The file type to emit.
+ * @return Returns \a o.
+ */
 inline std::ostream operator( std::ostream o, type t ) {
   return o  type_string[ t ];
 }
@@ -115,7 +123,10 @@
  * @param path The full path of the directory to change to.
  */
 templateclass PathStringType inline
-void chdir( PathStringType const path ) {
+typename std::enable_ifztd::has_c_strPathStringType,
+  char const* (PathStringType::*)() const::value,
+void::type
+chdir( PathStringType const path ) {
   chdir( path.c_str() );
 }
 
@@ -147,7 +158,10 @@
  * @throws fs::exception if the creation fails.
  */
 templateclass PathStringType inline
-void mkdir( PathStringType const path ) {
+typename std::enable_ifztd::has_c_strPathStringType,
+  char const* (PathStringType::*)() const::value,
+void::type
+mkdir( PathStringType const path ) {
   mkdir( path.c_str() );
 }
 
@@ -257,7 +271,10 @@
  * @throws fs::exception if the creation failed.
  */
 templateclass PathStringType inline
-void create( PathStringType const path ) {
+typename std::enable_ifztd::has_c_strPathStringType,
+  char const* (PathStringType::*)() const::value,
+void::type
+create( PathStringType const path ) {
   create( path.c_str() );
 }
 
@@ -283,7 +300,10 @@
  * @return Returns \c true only if the file or directory was removed.
  */
 templateclass PathStringType inline
-bool remove( PathStringType const path ) {
+typename std::enable_ifztd::has_c_strPathStringType,
+  char const* (PathStringType::*)() const::value,
+bool::type
+remove( PathStringType const path ) {
   return remove( path.c_str() );
 }
 
@@ -467,7 +487,10 @@
  * @return Returns said type.
  */
 templateclass PathStringType inline
-type get_type( PathStringType const path, size_type *size = nullptr ) {
+typename std::enable_ifztd::has_c_strPathStringType,
+  char const* (PathStringType::*)() const::value,
+type::type
+get_type( PathStringType const path, size_type *size = nullptr ) {
   return get_type( path.c_str(), size );
 }
 
@@ -499,7 +522,10 @@
  * @return Returns \c true only if the path is absolute.
  */
 templateclass PathStringType inline
-bool is_absolute( PathStringType const path ) {
+typename std::enable_ifztd::has_c_strPathStringType,
+  char const* (PathStringType::*)() const::value,
+bool::type
+is_absolute( PathStringType const path ) {
   return is_absolute( path.c_str() );
 }
 
@@ -525,7 +551,10 @@
  * @throws fs::exception if the rename fails.
  */
 templateclass FromStringType inline
-void rename( FromStringType const from, char const *to ) {
+typename std::enable_ifztd::has_c_strFromStringType,
+  char const* (FromStringType::*)() const::value,
+void::type
+rename( FromStringType const from, char const *to ) {
   rename( from.c_str(), to );
 }
 
@@ -538,7 +567,10 @@
  * @throws fs::exception if the 

[Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Paul J. Lucas
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been 
updated.

Commit Message changed to:

Now using enable_if for more functions to make overload resolution work better.

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Paul J. Lucas
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been 
updated.

Description changed to:

Now using enable_if for more functions to make overload resolution work better.

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Paul J. Lucas
Review: Approve


-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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/bug-950621 into lp:zorba

2012-07-16 Thread Juan Zacarias
Juan Zacarias has proposed merging lp:~zorba-coders/zorba/bug-950621 into 
lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)
Related bugs:
  Bug #950621 in Zorba: Eliminate parse-xml#2
  https://bugs.launchpad.net/zorba/+bug/950621

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-950621/+merge/115227

Removed fn:parse-xml#2
Fix for bug 950621
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-950621/+merge/115227
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp'
--- src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp	2012-07-12 17:29:55 +
+++ src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp	2012-07-16 20:47:21 +
@@ -74,34 +74,9 @@
   is = iss.get();
 }
 
-// optional base URI argument
-if (theChildren.size() == 2)
-{
-  consumeNext(result, theChildren[1].getp(), planState);
-  ZORBA_ASSERT(result);
-
-  try {
-lValidatedBaseUri = URI(result-getStringValue());
-  } catch (ZorbaException const /* e */) {
-throw XQUERY_EXCEPTION(
-  err::FODC0007,
-  ERROR_PARAMS( result-getStringValue() ),
-  ERROR_LOC( loc )
-);
-  }
-
-  if (!lValidatedBaseUri.is_absolute()) {
-throw XQUERY_EXCEPTION(
-  err::FODC0007,
-  ERROR_PARAMS( lValidatedBaseUri.toString() ),
-  ERROR_LOC( loc )
-);
-  }
-
-  result-getStringValue2(baseUri);
-} else {
-  baseUri = theSctx-get_base_uri();
-}
+
+baseUri = theSctx-get_base_uri();
+
 
 try {
   store::LoadProperties loadProps;

=== modified file 'src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml'
--- src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml	2012-07-12 17:29:55 +
+++ src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml	2012-07-16 20:47:21 +
@@ -27,12 +27,6 @@
 zorba:paramxs:string?/zorba:param !-- string to parse --
 zorba:outputdocument-node()/zorba:output
   /zorba:signature
-
-  zorba:signature localname=parse-xml prefix=fn version=3.0
-zorba:paramxs:string?/zorba:param !-- string to parse --
-zorba:paramxs:string/zorba:param !-- base uri --
-zorba:outputnode()*/zorba:output
-  /zorba:signature
   
   zorba:methods
 zorba:accessesDynCtx returnValue=true/

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_14.xq'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_14.xq	2012-07-12 17:29:55 +
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_14.xq	1970-01-01 00:00:00 +
@@ -1,1 +0,0 @@
-fn:base-uri(fn:parse-xml(a xml:base='foo'/, http://example.org/;)/a)

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.spec'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.spec	2012-07-12 17:29:55 +
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.spec	1970-01-01 00:00:00 +
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FODC0007

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.xq'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.xq	2012-07-12 17:29:55 +
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_15.xq	1970-01-01 00:00:00 +
@@ -1,2 +0,0 @@
-(: check for not absolute URI (FODC0007) :)
-fn:parse-xml(a xml:base='foo'/, blub)

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.spec'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.spec	2012-07-12 17:29:55 +
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.spec	1970-01-01 00:00:00 +
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FODC0007

=== removed file 'test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.xq'
--- test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.xq	2012-07-12 17:29:55 +
+++ test/rbkt/Queries/zorba/parsing_and_serializing/fn_parse-xml_16.xq	1970-01-01 00:00:00 +
@@ -1,2 +0,0 @@
-(: check for invalid URI (FODC0007) :)
-fn:parse-xml(a xml:base='foo'/, http://;)

-- 
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 950621] Re: Eliminate parse-xml#2

2012-07-16 Thread Juan Zacarias
** Branch linked: lp:~zorba-coders/zorba/bug-950621

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/950621

Title:
  Eliminate parse-xml#2

Status in Zorba - The XQuery Processor:
  New

Bug description:
  ctest -R xquery_3_0
  on the branch
  lp:~zorba-coders/zorba/fn_envvars
  shows that:

  - the following functions are in the fn namespace and according to the FO 
3.0 spec they should not be there:
  parse-xml#2

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/950621/+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/bug-950621 into lp:zorba

2012-07-16 Thread Chris Hillery
Review: Needs Fixing

Change looks good, but please add a line to the Changelog - something like 
Fixed bug #950621 (Removed two-arg version of fn:parse-xml(); use XML module 
function xml:parse() instead) in the Bug Fixes section.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-950621/+merge/115227
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 1025445] [NEW] execinfo.h broke Windows build

2012-07-16 Thread Rodolfo Ochoa
Public bug reported:

In revision 10932, src/store/naive/item.cpp was modified and a new include 
(execinfo.h) was added:
http://bazaar.launchpad.net/~zorba-coders/zorba/trunk/revision/10932#src/store/naive/item.cpp

Under Windows, a fresh build gives an error:
fatal error C1083: Cannot open include file: 'execinfo.h': No such file or 
directory

execinfo.h is a GNU C library and Windows don't have it, so is not
compiling right now...

** Affects: zorba
 Importance: Critical
 Assignee: Markos Zaharioudakis (markos-za)
 Status: New

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025445

Title:
  execinfo.h broke Windows build

Status in Zorba - The XQuery Processor:
  New

Bug description:
  In revision 10932, src/store/naive/item.cpp was modified and a new include 
(execinfo.h) was added:
  
http://bazaar.launchpad.net/~zorba-coders/zorba/trunk/revision/10932#src/store/naive/item.cpp

  Under Windows, a fresh build gives an error:
  fatal error C1083: Cannot open include file: 'execinfo.h': No such file or 
directory

  execinfo.h is a GNU C library and Windows don't have it, so is not
  compiling right now...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025445/+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 1025445] Re: execinfo.h broke Windows build

2012-07-16 Thread Chris Hillery
Rodolfo - Markos is on vacation for the next 10 days. Could you see if
it's possible to temporarily disable the code changes Markos did which
required execinfo, at least on Windows, to get the build working again?
(Or if you can find a Windows alternative to the execinfo.h
functionality, even better!)

** Changed in: zorba
 Assignee: Markos Zaharioudakis (markos-za) = Rodolfo Ochoa (rodolfo-ochoa)

** Changed in: zorba
Milestone: None = 2.7

** Changed in: zorba
   Status: New = Confirmed

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025445

Title:
  execinfo.h broke Windows build

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  In revision 10932, src/store/naive/item.cpp was modified and a new include 
(execinfo.h) was added:
  
http://bazaar.launchpad.net/~zorba-coders/zorba/trunk/revision/10932#src/store/naive/item.cpp

  Under Windows, a fresh build gives an error:
  fatal error C1083: Cannot open include file: 'execinfo.h': No such file or 
directory

  execinfo.h is a GNU C library and Windows don't have it, so is not
  compiling right now...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025445/+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 1025445] Re: execinfo.h broke Windows build

2012-07-16 Thread Rodolfo Ochoa
Disabling for now, I found a good approach on:
http://www.codeproject.com/Articles/11132/Walking-the-callstack

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1025445

Title:
  execinfo.h broke Windows build

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  In revision 10932, src/store/naive/item.cpp was modified and a new include 
(execinfo.h) was added:
  
http://bazaar.launchpad.net/~zorba-coders/zorba/trunk/revision/10932#src/store/naive/item.cpp

  Under Windows, a fresh build gives an error:
  fatal error C1083: Cannot open include file: 'execinfo.h': No such file or 
directory

  execinfo.h is a GNU C library and Windows don't have it, so is not
  compiling right now...

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025445/+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:~zorba-coders/zorba/bug1025445 into lp:zorba

2012-07-16 Thread Rodolfo Ochoa
Rodolfo Ochoa has proposed merging lp:~zorba-coders/zorba/bug1025445 into 
lp:zorba.

Requested reviews:
  Rodolfo Ochoa (rodolfo-ochoa)
  Chris Hillery (ceejatec)
Related bugs:
  Bug #1025445 in Zorba: execinfo.h broke Windows build
  https://bugs.launchpad.net/zorba/+bug/1025445

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239

Disabling print stack trace for windows
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/item.cpp'
--- src/store/naive/item.cpp	2012-07-12 17:29:55 +
+++ src/store/naive/item.cpp	2012-07-16 22:25:21 +
@@ -34,8 +34,10 @@
 
 #include runtime/function_item/function_item.h
 
-# include cstdlib
-# include execinfo.h
+#include cstdlib
+#ifndef WIN32
+#include execinfo.h
+#endif
 
 
 namespace zorba
@@ -495,6 +497,7 @@
 }
 
 
+#ifndef WIN32
 static void print_stack_trace( std::ostream o ) 
 {
   int BUF_SIZE = 250;
@@ -514,7 +517,7 @@
 o  allocation of backtrace symbols failed  std::endl;
   }
 }
-
+#endif
 
 /**
  * Accessor for xs:untypedAtomic and xs:string and its subtypes
@@ -536,8 +539,9 @@
 std::cerr  ???  std::endl;
   }
 
-  
+#ifndef WIN32
   print_stack_trace(std::cerr);
+#endif
 
   throw ZORBA_EXCEPTION(
 zerr::ZSTR0040_TYPE_ERROR,

-- 
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/bug1025445 into lp:zorba

2012-07-16 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug1025445 into lp:zorba has been 
updated.

Commit Message changed to:

Disabling print stack trace for windows

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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/bug1025445 into lp:zorba

2012-07-16 Thread Rodolfo Ochoa
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Matthias Brantner
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/pjl-misc-2012-07-16T23-19-59.948Z/log.html
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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/bug1025445 into lp:zorba

2012-07-16 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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/bug1025445 into lp:zorba

2012-07-16 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug1025445 into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread Zorba Build Bot
Validation queue job pjl-misc-2012-07-16T23-19-59.948Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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:~paul-lucas/zorba/bug-1024448 into lp:zorba

2012-07-16 Thread Paul J. Lucas
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-1024448 into 
lp:zorba.

Requested reviews:
  Paul J. Lucas (paul-lucas)
Related bugs:
  Bug #1024448 in Zorba: JSON parser doesn't recognize UTF-16 surrogate pairs
  https://bugs.launchpad.net/zorba/+bug/1024448

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248

Now handling UTF-16 surrogate pairs.
-- 
https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/unit_tests/test_json_parser.cpp'
--- src/unit_tests/test_json_parser.cpp	2012-07-12 17:29:55 +
+++ src/unit_tests/test_json_parser.cpp	2012-07-16 23:45:28 +
@@ -87,12 +87,16 @@
 
 static void test_illegal_codepoint() {
   static char const *const sources[] = {
- \ \\u  \ ,
- \ \\u0  \ ,
- \ \\u00  \ ,
- \ \\u000  \ ,
- \ \\uG  \ ,
+ \ \\u \ ,
+ \ \\u0 \ ,
+ \ \\u00 \ ,
+ \ \\u000 \ ,
+ \ \\uG \ ,
  \ \\u\ ,
+ \ \\uD83D \ ,
+ \ \\uD83D\\u0041 \ ,
+ \ \\uD83D\\uD83E \ ,
+ \ \\uDC4A \ ,
 0
   };
 
@@ -369,47 +373,54 @@
 }
 
 static void test_lexer_array() {
-  char const source[] = [ 1, \2\, false, true, null ];
+  char const source[] = [ 1, \2\, false, true, null, \\\uD83D\\uDC4A\ ];
   istringstream iss( source );
   lexer lex( iss );
   token t;
 
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::begin_array );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::number );
-  ASSERT_TRUE( t.get_value() == 1 );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::value_separator );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::string );
-  ASSERT_TRUE( t.get_value() == 2 );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::value_separator );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::json_false );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::value_separator );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::json_true );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::value_separator );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::json_null );
-
-  ASSERT_TRUE( lex.next( t ) );
-  ASSERT_TRUE( t == token::end_array );
-
-  ASSERT_TRUE( !lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::begin_array );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::number );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t.get_value() == 1 );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::value_separator );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::string );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t.get_value() == 2 );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::value_separator );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::json_false );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::value_separator );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::json_true );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::value_separator );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::json_null );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::value_separator );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::string );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t.get_value() == \xF0\x9F\x91\x8A );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( t == token::end_array );
+
+  ASSERT_TRUE_AND_NO_EXCEPTION( !lex.next( t ) );
 }
 
 static void test_lexer_object() {
@@ -418,34 +429,34 @@
   lexer lex( iss );
   token t;
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   ASSERT_TRUE( t == token::begin_object );
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   ASSERT_TRUE( t == token::string );
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   ASSERT_TRUE( t == token::name_separator );
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   ASSERT_TRUE( t == token::number );
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   ASSERT_TRUE( t == token::value_separator );
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   ASSERT_TRUE( t == token::string );
 
-  ASSERT_TRUE( lex.next( t ) );
+  ASSERT_TRUE_AND_NO_EXCEPTION( lex.next( t ) );
   

[Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba

2012-07-16 Thread noreply
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been 
updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115222
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/bug1025445 into lp:zorba

2012-07-16 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug1025445-2012-07-16T23-47-55.546Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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 1024448] Re: JSON parser doesn't recognize UTF-16 surrogate pairs

2012-07-16 Thread Paul J. Lucas
** Changed in: zorba
   Status: Incomplete = In Progress

** Branch linked: lp:~paul-lucas/zorba/bug-1024448

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1024448

Title:
  JSON parser doesn't recognize UTF-16 surrogate pairs

Status in Zorba - The XQuery Processor:
  In Progress

Bug description:
  The JSON parser doesn't recognize UTF-16 surrogate pairs, e.g., the
  byte sequence \ud83d\udc4a is currently converted to two separate
  Unicode code-points when it ought to recognize that as a UTF-16
  surrogate pair and result in the Unicode code-point of 1F44A.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1024448/+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:~paul-lucas/zorba/bug-1024448 into lp:zorba

2012-07-16 Thread Paul J. Lucas
Review: Approve


-- 
https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
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/bug1025445 into lp:zorba

2012-07-16 Thread Zorba Build Bot
Validation queue job bug1025445-2012-07-16T23-47-55.546Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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/bug1025445 into lp:zorba

2012-07-16 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug1025445 into lp:zorba has been 
updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1025445/+merge/115239
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