Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1014977 into lp:zorba

2012-07-17 Thread Chris Hillery
Review: Needs Information

Rodolfo - while I can't be sure about the C# code, of course, the changes look 
reasonable. However, in the diffs there are also a number of Ruby and Python 
tests that got deleted - was that intentional? Even if it was, I think I'd 
prefer that to be a separate commit if possible.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1014977/+merge/115407
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 1025622] Re: incorrect JSON serialization of supplementory plane code points

2012-07-17 Thread Chris Hillery
** Changed in: zorba
   Status: Incomplete => 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/1025622

Title:
  incorrect JSON serialization of supplementory plane code points

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  this bug is a follow-up of bug #1024448

  Currently, the result of the following JSONiq query:

let $message := "πŸ‘Š"
return { "message": $message }

  is serialized into incorrect JSON:

{ "message" : "\ufff0\uff9f\uff91\uff8a" }

  the correct result would be:

{ "message" : "\ud83d\udc4a" }

  Explanation:

  Characters from the supplementory plane are usually represented in
  utf-16 surrogate pairs within JSON results. The above result is in
  particular incorrect because JSON allows only 4 hex digits after '\u'.
  utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
  window which is most probably the reason why utf-16 is used.

  This has been greatly fixed in the JSON parser by Paul (see mp:
  https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
  ), but it still needs to be fixed in the serializer.

  @Paul: I'm not sure if you are the right person to assign this bug to?

  thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025622/+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 1025622] Re: incorrect JSON serialization of supplementory plane code points

2012-07-17 Thread Chris Hillery
The problem is almost certainly in void
serializer::json_emitter::emit_json_string(zstring string),
serializer.cpp line 1206 or thereabouts, where it escapes invalid
characters into unicode escape sequences. I have no idea how to do that
any differently than it is, so Paul, please take a look and see if there
are obvious logic problems.

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

Title:
  incorrect JSON serialization of supplementory plane code points

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  this bug is a follow-up of bug #1024448

  Currently, the result of the following JSONiq query:

let $message := "πŸ‘Š"
return { "message": $message }

  is serialized into incorrect JSON:

{ "message" : "\ufff0\uff9f\uff91\uff8a" }

  the correct result would be:

{ "message" : "\ud83d\udc4a" }

  Explanation:

  Characters from the supplementory plane are usually represented in
  utf-16 surrogate pairs within JSON results. The above result is in
  particular incorrect because JSON allows only 4 hex digits after '\u'.
  utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
  window which is most probably the reason why utf-16 is used.

  This has been greatly fixed in the JSON parser by Paul (see mp:
  https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
  ), but it still needs to be fixed in the serializer.

  @Paul: I'm not sure if you are the right person to assign this bug to?

  thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025622/+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 1025622] Re: incorrect JSON serialization of supplementory plane code points

2012-07-17 Thread Paul J. Lucas
I put some breakpoints in and it never hits my serialization code, so
it's probably in the JSoniq serialization code.

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

Title:
  incorrect JSON serialization of supplementory plane code points

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  this bug is a follow-up of bug #1024448

  Currently, the result of the following JSONiq query:

let $message := "πŸ‘Š"
return { "message": $message }

  is serialized into incorrect JSON:

{ "message" : "\ufff0\uff9f\uff91\uff8a" }

  the correct result would be:

{ "message" : "\ud83d\udc4a" }

  Explanation:

  Characters from the supplementory plane are usually represented in
  utf-16 surrogate pairs within JSON results. The above result is in
  particular incorrect because JSON allows only 4 hex digits after '\u'.
  utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
  window which is most probably the reason why utf-16 is used.

  This has been greatly fixed in the JSON parser by Paul (see mp:
  https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
  ), but it still needs to be fixed in the serializer.

  @Paul: I'm not sure if you are the right person to assign this bug to?

  thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025622/+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 1014977] Re: Feature: C# language binding

2012-07-17 Thread Launchpad Bug Tracker
** Branch linked: lp:~zorba-coders/zorba/bug1014977

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

Title:
  Feature: C# language binding

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  We should support C# language on Windows. As yet we do not believe we
  need to also support C# using Mono on other platforms.

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

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

Commit Message changed to:

C# binding enabled with tests and documentation

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1014977/+merge/115407
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1014977/+merge/115407
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-17 Thread Paul J. Lucas
Review: Approve


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

Added functions to test for and create UTF-16 surrogate pairs.
These will probably be needed by whoever fixes bug #1025622.
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/115403
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/util/unicode_util.h'
--- src/util/unicode_util.h	2012-07-16 23:37:51 +
+++ src/util/unicode_util.h	2012-07-17 17:58:21 +
@@ -136,40 +136,6 @@
 bool is_ucschar( code_point c );
 
 /**
- * Checks whether the given value is a "high surrogate."
- *
- * @param n The value to check.
- * @return Returns \c true only if \a n is a high surrogate.
- */
-inline bool is_high_surrogate( unsigned long n ) {
-  return n >= 0xD800 && n <= 0xDBFF;
-}
-
-/**
- * Checks whether the given value is a "low surrogate."
- *
- * @param n The value to check.
- * @return Returns \c true only if \a n is a low surrogate.
- */
-inline bool is_low_surrogate( unsigned long n ) {
-  return n >= 0xDC00 && n <= 0xDFFF;
-}
-
-/**
- * Converts the given high and low surrogate values into the code-point they
- * represent.  Note that no checking is done on the parameters.
- *
- * @param high The high surrogate value.
- * @param low The low surrogate value.
- * @return Returns the represented code-point.
- * @see is_high_surrogate()
- * @see is_low_surrogate()
- */
-inline code_point convert_surrogate( unsigned high, unsigned low ) {
-  return 0x1 + (high - 0xD800) * 0x400 + (low - 0xDC00);
-}
-
-/**
  * Checks whether the given code-point is valid.
  *
  * @param c The code-point to check.
@@ -338,6 +304,71 @@
   return to_string( in.data(), static_cast( in.size() ), out );
 }
 
+// UTF-16 surrogate pairs /
+
+/**
+ * Converts the given high and low surrogate values into the code-point they
+ * represent.  Note that no checking is done on the parameters.
+ *
+ * @param high The high surrogate value.
+ * @param low The low surrogate value.
+ * @return Returns the represented code-point.
+ * @see is_high_surrogate()
+ * @see is_low_surrogate()
+ */
+inline code_point convert_surrogate( unsigned high, unsigned low ) {
+  return 0x1 + ((high - 0xD800) << 10) + (low - 0xDC00);
+}
+
+/**
+ * Converts the given code-point into the high and low surrogate values that
+ * represent it.  Note that no checking is done on the parameters.
+ *
+ * @tparam ResultType The integer type for the results.
+ * @param c The code-point to convert.
+ * @param high A pointer to where to put the high surrogate.
+ * @param low A pointer to where to put the low surrogate.
+ */
+template inline
+typename std::enable_if::value,
+void>::type
+covert_surrogate( code_point c, ResultType *high, ResultType *low ) {
+  code_point const n = c - 0x1;
+  *high = 0xD800 + (static_cast(n) >> 10);
+  *low  = 0xDC00 + (n & 0x3FF);
+}
+
+/**
+ * Checks whether the given value is a "high surrogate."
+ *
+ * @param n The value to check.
+ * @return Returns \c true only if \a n is a high surrogate.
+ */
+inline bool is_high_surrogate( unsigned long n ) {
+  return n >= 0xD800 && n <= 0xDBFF;
+}
+
+/**
+ * Checks whether the given value is a "low surrogate."
+ *
+ * @param n The value to check.
+ * @return Returns \c true only if \a n is a low surrogate.
+ */
+inline bool is_low_surrogate( unsigned long n ) {
+  return n >= 0xDC00 && n <= 0xDFFF;
+}
+
+/**
+ * Checks whether the given code-point is in the "supplementary plane" and
+ * therefore would need a surrogate pair to be encoded in UTF-16.
+ *
+ * @param c The code-point to check.
+ * @return Returns \c true only if \a c is within the supplementary plane.
+ */
+inline bool is_supplementary_plane( code_point c ) {
+  return c >= 0x1 && c <= 0x10;
+}
+
 ///
 
 } // namespace unicode

-- 
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-17 Thread Rodolfo Ochoa
** Changed in: zorba
   Importance: Critical => Low

-- 
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:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread noreply
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Status: Approved => Merged

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

2012-07-17 Thread Zorba Build Bot
Validation queue job parse-fragment-2012-07-17T16-40-56.285Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/feature-mem_size into lp:zorba

2012-07-17 Thread Paul J. Lucas
Please note the distinction between alloc_sizeof() and mem_sizeof().  The 
former obtains the *additionally* dynamically allocated memory for an object of 
type T.  An 'int' has no additional memory beyond the size of the 'int' itself, 
so the result of 0 is correct.

Why do you want to expose *only* alloc_size()?  It's kind of awkward without 
mem_sizeof().

BTW: alloc_size() isn't really meant to be called explicitly.  You *can* do it 
and it will give you the correct answer, but it's not the answer you really 
want.  Again, note the distinction between alloc_sizeof() and mem_sizeof().
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-mem_size/+merge/114764
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/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/parse-fragment-2012-07-17T16-40-56.285Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-07-17 Thread Nicolae Brinza
Review: Approve


-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-07-17 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1. Got: 1 Approve.
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
Validation queue job parse-fragment-2012-07-17T16-09-59.336Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/feature-mem_size into lp:zorba

2012-07-17 Thread Matthias Brantner
Review: Needs Fixing

I have added a new XQuery module (http://www.zorba-xquery.com/modules/item) 
which currently provides one function x:allocated-size. The function invokes 
Item::alloc_size.

Review comments

- The function Item::alloc_size should be exposed in the external C++ api.
- The function alloc_size should also be implemented for JSONiq items.
- In file included from 
/home/mbrantner/zorba/sandbox/src/unit_tests/test_mem_sizeof.cpp:21:0:
/home/mbrantner/zorba/sandbox/src/util/mem_sizeof.h:177:58: warning: all member 
functions in class β€˜zorba::ztd::has_alloc_size’ are private
- returns zero for integer:
  import module namespace x = "http://www.zorba-xquery.com/modules/item";;

  x:allocated-size(1)


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-mem_size/+merge/114764
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/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/parse-fragment-2012-07-17T16-09-59.336Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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 1016606] Re: xml:parse unable to parse content containing a DOCTYPE

2012-07-17 Thread Nicolae Brinza
** Branch linked: lp:~nbrinza/zorba/parse-fragment

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

Title:
  xml:parse unable to parse content containing a DOCTYPE

Status in Zorba - The XQuery Processor:
  New

Bug description:
  The xml:parse function is unable to parse an XML document/fragment if
  it starts with a doctype definition.

  For example,

  import module namespace file = "http://expath.org/ns/file";;
  import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";;
  import schema namespace opt = 
"http://www.zorba-xquery.com/modules/xml-options";;

  for $i at $y in parse-xml:parse(
file:read-text("tmp.xml"),

  
)
  return
$i

  with tmp.xml containing

  http://www.w3.org/TR/html4/strict.dtd";>
  

  raises

  [err:FODC0006]: invalid content passed to parse-xml:parse(): loader
  parsing error: internal error;

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

2012-07-17 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Commit Message changed to:

The parse-fragment function now allows a DOCTYPE declaration in the input.

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

2012-07-17 Thread Nicolae Brinza
Actually it is a new feature, as the XML spec does not allow for DOCTYPE 
declarations in external parsed entities, and the implementation in the trunk 
is conformant to the spec. The bug merely registers the request from the user.

I've mentioned the change in both sections of the Changelog, just in case :).

-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
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/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/parse-fragment into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377

The parse-fragment function now allows a DOCTYPE declaration in the input.
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115377
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-07-12 17:29:55 +
+++ ChangeLog	2012-07-17 15:50:41 +
@@ -4,6 +4,8 @@
 version 2.x
 
 New Features:
+  * The parse-fragment function now allows a DOCTYPE declaration in the input.
+(Also fixed bug #1016606 with the feature request). 
   * Implemented the new EQName syntax (use Q{namespace}local instead of "namespace":local).
 Also updated the fn:path() function.
   * Item::isSeekable API extension for streamable content (xs:string and xs:base64Binary).
@@ -30,6 +32,7 @@
   * Streaming execution for tumbling windows (also fixes bug #1010051).
 
 Bug Fixes/Other Changes:
+  * Fixed bug #1016606 (DOCTYPE in the input of the parse-fragment function)
   * Fixed bug #1002993 (bug during revalidation after update; improper condition
 for calling TypeOps::get_atomic_type_code() from
 SchemaValidatorImpl::isPossibleSimpleContentRevalImpl())

=== modified file 'modules/com/zorba-xquery/www/modules/xml-options.xsd'
--- modules/com/zorba-xquery/www/modules/xml-options.xsd	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/xml-options.xsd	2012-07-17 15:50:41 +
@@ -61,6 +61,7 @@
   
 
 
+
   
 
 

=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq'
--- modules/com/zorba-xquery/www/modules/xml.xq	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/xml.xq	2012-07-17 15:50:41 +
@@ -141,7 +141,11 @@
  : external entities. If the option 
  : is enabled, the input must conform to the syntax extParsedEnt (production 
  : [78] in XML 1.0, see http://www.w3.org/TR/xml/#wf-entities";>
- : Well-Formed Parsed Entities). The result of the function call is a list 
+ : Well-Formed Parsed Entities). In addition, by default a DOCTYPE declaration is allowed,
+ : as described by the [28] doctypedecl production, see http://www.w3.org/TR/xml/#NT-doctypedecl";>
+ : Document Type Definition. A parameter is available to forbid the appearance of the DOCTYPE.
+ :
+ : The result of the function call is a list 
  : of nodes corresponding to the top-level components of the content of the 
  : external entity: that is, elements, processing instructions, comments, and 
  : text nodes. CDATA sections and character references are expanded, and 
@@ -151,7 +155,7 @@
  : (http://www.w3.org/TR/xml/#sec-well-formed";>production [1] in XML 1.0).
  : This option can not be used together with either the  or the 
  : option. Doing so will raise a zerr:ZXQD0003 error.
- : The  option has two parameters, given by attributes. The first
+ : The  option has three parameters, given by attributes. The first
  : attribute is "skip-root-nodes" and it can have a non-negative value. Specifying the paramter
  : tells the parser to skip the given number of root nodes and return only their children. E.g.
  : skip-root-nodes="1" is equivalent to parse-xml($xml-string)/node()/node() . skip-root-nodes="2" is equivalent
@@ -159,7 +163,8 @@
  : boolean value. Specifying "true" will tell the parser to skip top level text nodes, returning
  : only the top level elements, comments, PIs, etc. This parameter works in combination with
  : the "skip-root-nodes" paramter, thus top level text nodes are skipped after "skip-root-nodes" has 
- : been applied. 
+ : been applied. The third paramter is "error-on-doctype" and will generate an error if a DOCTYPE
+ : declaration appears in the input, which by default is allowed.
  : 
  :
  : 

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-07-12 17:29:55 +
+++ src/diagnostics/diagnostic_en.xml	2012-07-17 15:50:41 +
@@ -3834,7 +3834,15 @@
 
 
 
-  invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace
+  invalid options passed to the parse-xml:parse() function, the element must be in the schema target namespace
+
+
+
+  a DOCTYPE declaration is not allowed
+
+
+
+  a DOCTYPE declaration must appear before any element or text node, and at most once
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-07-12 17:29:55 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-07-17 15:50:41 +
@@ -670,7 +670,9 @@
   { "~OpNodeBeforeMustHaveNodes", "op:node-before() must have nodes as

Re: [Zorba-coders] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Matthias Brantner
Review: Needs Fixing

ChangeLog should mention the fix of bug 
https://bugs.launchpad.net/zorba/+bug/1016606. In fact, the patch fixes a bug 
and is not a new feature. ;-)
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
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 1025622] Re: incorrect JSON serialization of supplementory plane code points

2012-07-17 Thread Dennis Knochenwefel
I think that building zorba with option -DZORBA_WITH_JSON=ON is
sufficient.

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

Title:
  incorrect JSON serialization of supplementory plane code points

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  this bug is a follow-up of bug #1024448

  Currently, the result of the following JSONiq query:

let $message := "πŸ‘Š"
return { "message": $message }

  is serialized into incorrect JSON:

{ "message" : "\ufff0\uff9f\uff91\uff8a" }

  the correct result would be:

{ "message" : "\ud83d\udc4a" }

  Explanation:

  Characters from the supplementory plane are usually represented in
  utf-16 surrogate pairs within JSON results. The above result is in
  particular incorrect because JSON allows only 4 hex digits after '\u'.
  utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
  window which is most probably the reason why utf-16 is used.

  This has been greatly fixed in the JSON parser by Paul (see mp:
  https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
  ), but it still needs to be fixed in the serializer.

  @Paul: I'm not sure if you are the right person to assign this bug to?

  thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025622/+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 1025622] Re: incorrect JSON serialization of supplementory plane code points

2012-07-17 Thread Paul J. Lucas
First, how does one execute a JSoniq query? If I put the above query
into a file and do:

  bin/zorba -f -i -r --trailing-nl -q /tmp/foo.xq

I get:

  :2,8: static error [err:XPST0003]: invalid expression;
raised at .../src/compiler/translator/translator.cpp:11081

** Changed in: zorba
   Status: New => Incomplete

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

Title:
  incorrect JSON serialization of supplementory plane code points

Status in Zorba - The XQuery Processor:
  Incomplete

Bug description:
  this bug is a follow-up of bug #1024448

  Currently, the result of the following JSONiq query:

let $message := "πŸ‘Š"
return { "message": $message }

  is serialized into incorrect JSON:

{ "message" : "\ufff0\uff9f\uff91\uff8a" }

  the correct result would be:

{ "message" : "\ud83d\udc4a" }

  Explanation:

  Characters from the supplementory plane are usually represented in
  utf-16 surrogate pairs within JSON results. The above result is in
  particular incorrect because JSON allows only 4 hex digits after '\u'.
  utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
  window which is most probably the reason why utf-16 is used.

  This has been greatly fixed in the JSON parser by Paul (see mp:
  https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
  ), but it still needs to be fixed in the serializer.

  @Paul: I'm not sure if you are the right person to assign this bug to?

  thanks

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

2012-07-17 Thread Zorba Build Bot
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment 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


Re: [Zorba-coders] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1. Got: 1 Pending.
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment 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] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
Validation queue job parse-fragment-2012-07-17T13-46-58.988Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115345
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment 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 1024448] Re: JSON parser doesn't recognize UTF-16 surrogate pairs

2012-07-17 Thread Paul J. Lucas
** 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/1024448

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

Status in Zorba - The XQuery Processor:
  Fix Committed

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:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment 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] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/parse-fragment-2012-07-17T13-46-58.988Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115345
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment 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] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba has been 
updated.

Commit Message changed to:

The parse-fragment function now allows a DOCTYPE declaration in the input.

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment 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] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/parse-fragment into 
lp:zorba.

Requested reviews:
  Zorba Coders (zorba-coders)

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115345

The parse-fragment function now allows a DOCTYPE declaration in the input.
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115345
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment into lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-07-12 17:29:55 +
+++ ChangeLog	2012-07-17 13:46:58 +
@@ -4,6 +4,7 @@
 version 2.x
 
 New Features:
+  * The parse-fragment function now allows a DOCTYPE declaration in the input.
   * Implemented the new EQName syntax (use Q{namespace}local instead of "namespace":local).
 Also updated the fn:path() function.
   * Item::isSeekable API extension for streamable content (xs:string and xs:base64Binary).

=== modified file 'modules/com/zorba-xquery/www/modules/xml-options.xsd'
--- modules/com/zorba-xquery/www/modules/xml-options.xsd	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/xml-options.xsd	2012-07-17 13:46:58 +
@@ -61,6 +61,7 @@
   
 
 
+
   
 
 

=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq'
--- modules/com/zorba-xquery/www/modules/xml.xq	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/xml.xq	2012-07-17 13:46:58 +
@@ -141,7 +141,11 @@
  : external entities. If the option 
  : is enabled, the input must conform to the syntax extParsedEnt (production 
  : [78] in XML 1.0, see http://www.w3.org/TR/xml/#wf-entities";>
- : Well-Formed Parsed Entities). The result of the function call is a list 
+ : Well-Formed Parsed Entities). In addition, by default a DOCTYPE declaration is allowed,
+ : as described by the [28] doctypedecl production, see http://www.w3.org/TR/xml/#NT-doctypedecl";>
+ : Document Type Definition. A parameter is available to forbid the appearance of the DOCTYPE.
+ :
+ : The result of the function call is a list 
  : of nodes corresponding to the top-level components of the content of the 
  : external entity: that is, elements, processing instructions, comments, and 
  : text nodes. CDATA sections and character references are expanded, and 
@@ -151,7 +155,7 @@
  : (http://www.w3.org/TR/xml/#sec-well-formed";>production [1] in XML 1.0).
  : This option can not be used together with either the  or the 
  : option. Doing so will raise a zerr:ZXQD0003 error.
- : The  option has two parameters, given by attributes. The first
+ : The  option has three parameters, given by attributes. The first
  : attribute is "skip-root-nodes" and it can have a non-negative value. Specifying the paramter
  : tells the parser to skip the given number of root nodes and return only their children. E.g.
  : skip-root-nodes="1" is equivalent to parse-xml($xml-string)/node()/node() . skip-root-nodes="2" is equivalent
@@ -159,7 +163,8 @@
  : boolean value. Specifying "true" will tell the parser to skip top level text nodes, returning
  : only the top level elements, comments, PIs, etc. This parameter works in combination with
  : the "skip-root-nodes" paramter, thus top level text nodes are skipped after "skip-root-nodes" has 
- : been applied. 
+ : been applied. The third paramter is "error-on-doctype" and will generate an error if a DOCTYPE
+ : declaration appears in the input, which by default is allowed.
  : 
  :
  : 

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-07-12 17:29:55 +
+++ src/diagnostics/diagnostic_en.xml	2012-07-17 13:46:58 +
@@ -3834,7 +3834,15 @@
 
 
 
-  invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace
+  invalid options passed to the parse-xml:parse() function, the element must be in the schema target namespace
+
+
+
+  a DOCTYPE declaration is not allowed
+
+
+
+  a DOCTYPE declaration must appear before any element or text node, and at most once
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-07-12 17:29:55 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-07-17 13:46:58 +
@@ -670,7 +670,9 @@
   { "~OpNodeBeforeMustHaveNodes", "op:node-before() must have nodes as parameters" },
   { "~OperationNotDef_23", "$2 not defined for type \"$3\"" },
   { "~OperationNotPossibleWithTypes_234", "\"$2\": operation not possible with parameters of type \"$3\" and \"$4\"" },
-  { "~ParseFragmentInvalidOptions", "invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace" },
+  { "~ParseFragmentDoctypeNotAllowed", "a DOCTYPE dec

[Zorba-coders] [Merge] lp:~nbrinza/zorba/parse-fragment into lp:zorba

2012-07-17 Thread Nicolae Brinza
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/parse-fragment into 
lp:zorba.

Requested reviews:
  Zorba Coders (zorba-coders)

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344

The parse-fragment function now allows a DOCTYPE declaration in the input.
-- 
https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/115344
Your team Zorba Coders is requested to review the proposed merge of 
lp:~nbrinza/zorba/parse-fragment into lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-07-12 17:29:55 +
+++ ChangeLog	2012-07-17 13:46:55 +
@@ -4,6 +4,7 @@
 version 2.x
 
 New Features:
+  * The parse-fragment function now allows a DOCTYPE declaration in the input.
   * Implemented the new EQName syntax (use Q{namespace}local instead of "namespace":local).
 Also updated the fn:path() function.
   * Item::isSeekable API extension for streamable content (xs:string and xs:base64Binary).

=== modified file 'modules/com/zorba-xquery/www/modules/xml-options.xsd'
--- modules/com/zorba-xquery/www/modules/xml-options.xsd	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/xml-options.xsd	2012-07-17 13:46:55 +
@@ -61,6 +61,7 @@
   
 
 
+
   
 
 

=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq'
--- modules/com/zorba-xquery/www/modules/xml.xq	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/xml.xq	2012-07-17 13:46:55 +
@@ -141,7 +141,11 @@
  : external entities. If the option 
  : is enabled, the input must conform to the syntax extParsedEnt (production 
  : [78] in XML 1.0, see http://www.w3.org/TR/xml/#wf-entities";>
- : Well-Formed Parsed Entities). The result of the function call is a list 
+ : Well-Formed Parsed Entities). In addition, by default a DOCTYPE declaration is allowed,
+ : as described by the [28] doctypedecl production, see http://www.w3.org/TR/xml/#NT-doctypedecl";>
+ : Document Type Definition. A parameter is available to forbid the appearance of the DOCTYPE.
+ :
+ : The result of the function call is a list 
  : of nodes corresponding to the top-level components of the content of the 
  : external entity: that is, elements, processing instructions, comments, and 
  : text nodes. CDATA sections and character references are expanded, and 
@@ -151,7 +155,7 @@
  : (http://www.w3.org/TR/xml/#sec-well-formed";>production [1] in XML 1.0).
  : This option can not be used together with either the  or the 
  : option. Doing so will raise a zerr:ZXQD0003 error.
- : The  option has two parameters, given by attributes. The first
+ : The  option has three parameters, given by attributes. The first
  : attribute is "skip-root-nodes" and it can have a non-negative value. Specifying the paramter
  : tells the parser to skip the given number of root nodes and return only their children. E.g.
  : skip-root-nodes="1" is equivalent to parse-xml($xml-string)/node()/node() . skip-root-nodes="2" is equivalent
@@ -159,7 +163,8 @@
  : boolean value. Specifying "true" will tell the parser to skip top level text nodes, returning
  : only the top level elements, comments, PIs, etc. This parameter works in combination with
  : the "skip-root-nodes" paramter, thus top level text nodes are skipped after "skip-root-nodes" has 
- : been applied. 
+ : been applied. The third paramter is "error-on-doctype" and will generate an error if a DOCTYPE
+ : declaration appears in the input, which by default is allowed.
  : 
  :
  : 

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-07-12 17:29:55 +
+++ src/diagnostics/diagnostic_en.xml	2012-07-17 13:46:55 +
@@ -3834,7 +3834,15 @@
 
 
 
-  invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace
+  invalid options passed to the parse-xml:parse() function, the element must be in the schema target namespace
+
+
+
+  a DOCTYPE declaration is not allowed
+
+
+
+  a DOCTYPE declaration must appear before any element or text node, and at most once
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-07-12 17:29:55 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-07-17 13:46:55 +
@@ -670,7 +670,9 @@
   { "~OpNodeBeforeMustHaveNodes", "op:node-before() must have nodes as parameters" },
   { "~OperationNotDef_23", "$2 not defined for type \"$3\"" },
   { "~OperationNotPossibleWithTypes_234", "\"$2\": operation not possible with parameters of type \"$3\" and \"$4\"" },
-  { "~ParseFragmentInvalidOptions", "invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace" },
+  { "~ParseFragmentDoctypeNotAllowed", "a DOCTYPE dec

[Zorba-coders] [Bug 1025622] [NEW] incorrect JSON serialization of supplementory plane code points

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

this bug is a follow-up of bug #1024448

Currently, the result of the following JSONiq query:

  let $message := "πŸ‘Š"
  return { "message": $message }

is serialized into incorrect JSON:

  { "message" : "\ufff0\uff9f\uff91\uff8a" }

the correct result would be:

  { "message" : "\ud83d\udc4a" }

Explanation:

Characters from the supplementory plane are usually represented in
utf-16 surrogate pairs within JSON results. The above result is in
particular incorrect because JSON allows only 4 hex digits after '\u'.
utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
window which is most probably the reason why utf-16 is used.

This has been greatly fixed in the JSON parser by Paul (see mp:
https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
), but it still needs to be fixed in the serializer.

@Paul: I'm not sure if you are the right person to assign this bug to?

thanks

** Affects: zorba
 Importance: Undecided
 Assignee: Paul J. Lucas (paul-lucas)
 Status: New


** Tags: incorrect-result jsoniq

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

Title:
  incorrect JSON serialization of supplementory plane code points

Status in Zorba - The XQuery Processor:
  New

Bug description:
  this bug is a follow-up of bug #1024448

  Currently, the result of the following JSONiq query:

let $message := "πŸ‘Š"
return { "message": $message }

  is serialized into incorrect JSON:

{ "message" : "\ufff0\uff9f\uff91\uff8a" }

  the correct result would be:

{ "message" : "\ud83d\udc4a" }

  Explanation:

  Characters from the supplementory plane are usually represented in
  utf-16 surrogate pairs within JSON results. The above result is in
  particular incorrect because JSON allows only 4 hex digits after '\u'.
  utf-16 surrogate pairs alway fit into a 4 hex digit or 2 x 4 hex digit
  window which is most probably the reason why utf-16 is used.

  This has been greatly fixed in the JSON parser by Paul (see mp:
  https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
  ), but it still needs to be fixed in the serializer.

  @Paul: I'm not sure if you are the right person to assign this bug to?

  thanks

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

2012-07-17 Thread noreply
The proposal to merge lp:~paul-lucas/zorba/bug-1024448 into lp:zorba has been 
updated.

Status: Approved => Merged

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

2012-07-17 Thread Zorba Build Bot
Validation queue job bug-1024448-2012-07-17T10-17-57.338Z is finished. The 
final status was:

All tests succeeded!
-- 
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:~paul-lucas/zorba/bug-1024448 into lp:zorba

2012-07-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-1024448-2012-07-17T10-17-57.338Z/log.html
-- 
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:~paul-lucas/zorba/bug-1024448 into lp:zorba

2012-07-17 Thread Dennis Knochenwefel
The proposal to merge lp:~paul-lucas/zorba/bug-1024448 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/bug-1024448/+merge/115248
-- 
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


Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-1024448 into lp:zorba

2012-07-17 Thread Dennis Knochenwefel
Review: Approve

impressively simple. Tested on linux and windows.
-- 
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] [Bug 1025566] Re: Upgrade testdriver_mt to Boost Filesystem v3

2012-07-17 Thread Chris Hillery
** Patch added: "boost-filesystem-v3.patch"
   
https://bugs.launchpad.net/zorba/+bug/1025566/+attachment/3225805/+files/boost-filesystem-v3.patch

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

Title:
  Upgrade testdriver_mt to Boost Filesystem v3

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  The latest Boost, 1.50, removes the Filesystem v2 APIs that
  testdriver_mt makes use of. There are a few non-compatible changes in
  the Filesystem v3 APIs. Patch attached (from David).

  We should upgrade to the v3 APIs, and have our CMake scripts ensure
  that the Boost version found is at least 1.44 (the first version with
  the Filesystem v3 APIs). We will also need to upgrade the Boost on the
  validation queue machine to at least 1.44.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025566/+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 1025566] [NEW] Upgrade testdriver_mt to Boost Filesystem v3

2012-07-17 Thread Chris Hillery
Public bug reported:

The latest Boost, 1.50, removes the Filesystem v2 APIs that
testdriver_mt makes use of. There are a few non-compatible changes in
the Filesystem v3 APIs. Patch attached (from David).

We should upgrade to the v3 APIs, and have our CMake scripts ensure that
the Boost version found is at least 1.44 (the first version with the
Filesystem v3 APIs). We will also need to upgrade the Boost on the
validation queue machine to at least 1.44.

** Affects: zorba
 Importance: Medium
 Assignee: Chris Hillery (ceejatec)
 Status: Confirmed

** Changed in: zorba
   Importance: Undecided => Medium

** Changed in: zorba
 Assignee: (unassigned) => Chris Hillery (ceejatec)

** 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/1025566

Title:
  Upgrade testdriver_mt to Boost Filesystem v3

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  The latest Boost, 1.50, removes the Filesystem v2 APIs that
  testdriver_mt makes use of. There are a few non-compatible changes in
  the Filesystem v3 APIs. Patch attached (from David).

  We should upgrade to the v3 APIs, and have our CMake scripts ensure
  that the Boost version found is at least 1.44 (the first version with
  the Filesystem v3 APIs). We will also need to upgrade the Boost on the
  validation queue machine to at least 1.44.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025566/+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 1025564] Re: Deprecate -f argument to zorbacmd

2012-07-17 Thread Chris Hillery
Currently, most (all?) of the command-line arguments to zorbacmd are
processed by a class called ZorbaCMDProperties, which is pretty ugly and
tied in with the undocumented "properties" mechanism. So this change may
require a little digging to figure out where to do it, and how.

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

Title:
  Deprecate -f argument to zorbacmd

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  zorbacmd's "-f -q" arguments are ugly. It would make more sense to
  introduce the ability to name query files simply by listing them on
  the command line without a leading hyphen-option, eg.

zorba /tmp/foo.xq /tmp/bar.xq

  would execute the queries contained in those two files. We could then
  deprecate -f, and remove it entirely in Zorba 3.0.

  If we do this, we need to ensure that the newly-added ability to use
  Zorba as a shebang command in Unix shell scripts also works without
  specifying any arguments on the shebang line; that is,

#!/usr/bin/zorba
1

  should work and return "1".

  -q would remain unchanged for specifying queries directly on the
  command-line.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1025564/+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 1025564] [NEW] Deprecate -f argument to zorbacmd

2012-07-17 Thread Chris Hillery
Public bug reported:

zorbacmd's "-f -q" arguments are ugly. It would make more sense to
introduce the ability to name query files simply by listing them on the
command line without a leading hyphen-option, eg.

  zorba /tmp/foo.xq /tmp/bar.xq

would execute the queries contained in those two files. We could then
deprecate -f, and remove it entirely in Zorba 3.0.

If we do this, we need to ensure that the newly-added ability to use
Zorba as a shebang command in Unix shell scripts also works without
specifying any arguments on the shebang line; that is,

  #!/usr/bin/zorba
  1

should work and return "1".

-q would remain unchanged for specifying queries directly on the
command-line.

** Affects: zorba
 Importance: Medium
 Assignee: Luis Rodriguez Gonzalez (kuraru)
 Status: Confirmed

** Changed in: zorba
   Importance: Undecided => Medium

** Changed in: zorba
Milestone: None => 2.7

** Changed in: zorba
 Assignee: (unassigned) => Chris Hillery (ceejatec)

** Changed in: zorba
   Status: New => Confirmed

** Changed in: zorba
 Assignee: Chris Hillery (ceejatec) => Luis Rodriguez Gonzalez (kuraru)

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

Title:
  Deprecate -f argument to zorbacmd

Status in Zorba - The XQuery Processor:
  Confirmed

Bug description:
  zorbacmd's "-f -q" arguments are ugly. It would make more sense to
  introduce the ability to name query files simply by listing them on
  the command line without a leading hyphen-option, eg.

zorba /tmp/foo.xq /tmp/bar.xq

  would execute the queries contained in those two files. We could then
  deprecate -f, and remove it entirely in Zorba 3.0.

  If we do this, we need to ensure that the newly-added ability to use
  Zorba as a shebang command in Unix shell scripts also works without
  specifying any arguments on the shebang line; that is,

#!/usr/bin/zorba
1

  should work and return "1".

  -q would remain unchanged for specifying queries directly on the
  command-line.

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