Re: [Zorba-coders] [Merge] lp:~ceejatec/zorba/example-feature into lp:zorba

2011-09-20 Thread Gabriel Petrovay
Review: Approve

I don't like the formatting but I approve!
-- 
https://code.launchpad.net/~ceejatec/zorba/example-feature/+merge/76306
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:~ceejatec/zorba/example-feature into lp:zorba

2011-09-20 Thread Chris Hillery
Chris Hillery has proposed merging lp:~ceejatec/zorba/example-feature into 
lp:zorba.

Requested reviews:
  Zorba Coders (zorba-coders)

For more details, see:
https://code.launchpad.net/~ceejatec/zorba/example-feature/+merge/76306
-- 
https://code.launchpad.net/~ceejatec/zorba/example-feature/+merge/76306
Your team Zorba Coders is requested to review the proposed merge of 
lp:~ceejatec/zorba/example-feature 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 854723] Re: Internal Fatal Error with validate-in-place

2011-09-20 Thread Federico Cavalieri
** Visibility changed to: Public

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854723

Title:
  Internal Fatal Error with validate-in-place

Status in Zorba - The XQuery Processor:
  New

Bug description:
  This bug is due to the same incorrect assumption reported in bug 854688.
  Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example, which raises:

  Zorba Internal Fatal Error in 
/zorba/trunksrc/src/store/naive/pul_primitives.cpp:488:
  "target->numChildren() == 1": condition failed
  Aborted

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854723/+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 854688] Re: Segmentation fault in validated nodes

2011-09-20 Thread Federico Cavalieri
** Visibility changed to: Public

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854688

Title:
  Segmentation fault in validated nodes

Status in Zorba - The XQuery Processor:
  New

Bug description:
  :14,3: Zorba error [zerr:ZXQP0002]: "p->numChildren() == 0":
  assertion failed; raised at zorba\src\store\naive\node_items.cpp:3398

  This is in the constructor of a TextNode.

  Another way to look on the problem is when a validated element that
  must be of type string, contains a comment child node. The comment
  nodes pass the schema validation but there are assumptions in the code
  that the parent element has only 1 child (i.e. the text node). What
  happens if comments are interlaced with this text? Or as I've heard,
  also processing instructions Federico?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854688/+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 854723] Re: Internal Fatal Error with validate-in-place

2011-09-20 Thread Federico Cavalieri
** Changed in: zorba
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854723

Title:
  Internal Fatal Error with validate-in-place

Status in Zorba - The XQuery Processor:
  New

Bug description:
  This bug is due to the same incorrect assumption reported in bug 854688.
  Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example, which raises:

  Zorba Internal Fatal Error in 
/zorba/trunksrc/src/store/naive/pul_primitives.cpp:488:
  "target->numChildren() == 1": condition failed
  Aborted

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854723/+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 854723] Re: Internal Fatal Error with validate-in-place

2011-09-20 Thread Federico Cavalieri
The following expression raises a similar error, due to the same
assumption:

import schema namespace s = "http://www.xqdoc.org/1.0";;
import module namespace schema = "http://www.zorba-xquery.com/modules/schema";;

variable $hostInfo :=http://www.xqdoc.org/1.0";>

TS4J5UJ
N/A


DGQEb8Q

;


schema:validate-in-place($hostInfo);
replace node $hostInfo//*:date/node()[1] with ;
$hostInfo


Raises:
Zorba Internal Fatal Error in 
/zorba/trunksrc/src/store/naive/pul_primitives.cpp:489:
"target->getChild(0)->getNodeKind() == store::StoreConsts::textNode": condition 
failed
Aborted


** Description changed:

- This bug is due to the same incorrect assumption reported in bug 854688. 
- Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example.
+ This bug is due to the same incorrect assumption reported in bug 854688.
+ Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example, which raises:
+ 
+ Zorba Internal Fatal Error in 
/zorba/trunksrc/src/store/naive/pul_primitives.cpp:488:
+ "target->numChildren() == 1": condition failed
+ Aborted

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854723

Title:
  Internal Fatal Error with validate-in-place

Status in Zorba - The XQuery Processor:
  New

Bug description:
  This bug is due to the same incorrect assumption reported in bug 854688.
  Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example, which raises:

  Zorba Internal Fatal Error in 
/zorba/trunksrc/src/store/naive/pul_primitives.cpp:488:
  "target->numChildren() == 1": condition failed
  Aborted

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854723/+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 854723] Re: Internal Fatal Error with validate-in-place

2011-09-20 Thread Federico Cavalieri
import schema namespace s = "http://www.xqdoc.org/1.0";;
import module namespace schema = "http://www.zorba-xquery.com/modules/schema";;

variable $hostInfo :=http://www.xqdoc.org/1.0";>

TS4J5UJ
N/A


DGQEb8Q

;


schema:validate-in-place($hostInfo);
$hostInfo


** Attachment removed: "to reproduce"
   
https://bugs.launchpad.net/zorba/+bug/854723/+attachment/2431367/+files/testseg.xq

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854723

Title:
  Internal Fatal Error with validate-in-place

Status in Zorba - The XQuery Processor:
  New

Bug description:
  This bug is due to the same incorrect assumption reported in bug 854688. 
  Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854723/+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 854723] [NEW] Internal Fatal Error with validate-in-place

2011-09-20 Thread Federico Cavalieri
*** This bug is a security vulnerability ***

Private security bug reported:

This bug is due to the same incorrect assumption reported in bug 854688. 
Invoking schema:validate-in-place creates several UpdSetElementType operations. 
Their apply method expects that if a node has a typedvalue it also contains a 
single node with text type. This is not true in the following example.

** Affects: zorba
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854723

Title:
  Internal Fatal Error with validate-in-place

Status in Zorba - The XQuery Processor:
  New

Bug description:
  This bug is due to the same incorrect assumption reported in bug 854688. 
  Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854723/+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 854723] Re: Internal Fatal Error with validate-in-place

2011-09-20 Thread Federico Cavalieri
** Attachment added: "to reproduce"
   https://bugs.launchpad.net/bugs/854723/+attachment/2431367/+files/testseg.xq

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854723

Title:
  Internal Fatal Error with validate-in-place

Status in Zorba - The XQuery Processor:
  New

Bug description:
  This bug is due to the same incorrect assumption reported in bug 854688. 
  Invoking schema:validate-in-place creates several UpdSetElementType 
operations. Their apply method expects that if a node has a typedvalue it also 
contains a single node with text type. This is not true in the following 
example.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854723/+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 854688] Re: Segmentation fault in validated nodes

2011-09-20 Thread Federico Cavalieri
Yes Gabriel,
processing instruction cause the same/a very similar problem, since the same 
assumption is not correct:

import schema namespace s = "http://www.xqdoc.org/1.0";;
let $hostInfo :=http://www.xqdoc.org/1.0";>

TS4J5UJ
N/A


DGQEb8Q



return
  validate { $hostInfo }

Moreover the same assumption might be made in typing. If so i will open
in some minutes a new bug entry for this.

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854688

Title:
  Segmentation fault in validated nodes

Status in Zorba - The XQuery Processor:
  New

Bug description:
  :14,3: Zorba error [zerr:ZXQP0002]: "p->numChildren() == 0":
  assertion failed; raised at zorba\src\store\naive\node_items.cpp:3398

  This is in the constructor of a TextNode.

  Another way to look on the problem is when a validated element that
  must be of type string, contains a comment child node. The comment
  nodes pass the schema validation but there are assumptions in the code
  that the parent element has only 1 child (i.e. the text node). What
  happens if comments are interlaced with this text? Or as I've heard,
  also processing instructions Federico?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854688/+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 854688] [NEW] Segmentation fault in validated nodes

2011-09-20 Thread Gabriel Petrovay
*** This bug is a security vulnerability ***

Private security bug reported:

:14,3: Zorba error [zerr:ZXQP0002]: "p->numChildren() == 0":
assertion failed; raised at zorba\src\store\naive\node_items.cpp:3398

This is in the constructor of a TextNode.

Another way to look on the problem is when a validated element that must
be of type string, contains a comment child node. The comment nodes pass
the schema validation but there are assumptions in the code that the
parent element has only 1 child (i.e. the text node). What happens if
comments are interlaced with this text? Or as I've heard, also
processing instructions Federico?

** Affects: zorba
 Importance: High
 Status: New


** Tags: comment schema typed validate

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854688

Title:
  Segmentation fault in validated nodes

Status in Zorba - The XQuery Processor:
  New

Bug description:
  :14,3: Zorba error [zerr:ZXQP0002]: "p->numChildren() == 0":
  assertion failed; raised at zorba\src\store\naive\node_items.cpp:3398

  This is in the constructor of a TextNode.

  Another way to look on the problem is when a validated element that
  must be of type string, contains a comment child node. The comment
  nodes pass the schema validation but there are assumptions in the code
  that the parent element has only 1 child (i.e. the text node). What
  happens if comments are interlaced with this text? Or as I've heard,
  also processing instructions Federico?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854688/+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 854688] Re: Segmentation fault in validated nodes

2011-09-20 Thread Gabriel Petrovay
** Attachment added: "to reproduce"
   https://bugs.launchpad.net/bugs/854688/+attachment/2431169/+files/mm.xq

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

-- 
You received this bug notification because you are a member of Zorba
Coders, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/854688

Title:
  Segmentation fault in validated nodes

Status in Zorba - The XQuery Processor:
  New

Bug description:
  :14,3: Zorba error [zerr:ZXQP0002]: "p->numChildren() == 0":
  assertion failed; raised at zorba\src\store\naive\node_items.cpp:3398

  This is in the constructor of a TextNode.

  Another way to look on the problem is when a validated element that
  must be of type string, contains a comment child node. The comment
  nodes pass the schema validation but there are assumptions in the code
  that the parent element has only 1 child (i.e. the text node). What
  happens if comments are interlaced with this text? Or as I've heard,
  also processing instructions Federico?

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854688/+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 854506] [NEW] type errors cause ugly error msgs

2011-09-20 Thread David Graf
Public bug reported:

A query like this

declare function local:foo() as empty-sequence()
 {
   
 };
 
 local:foo();

causes the following error msg because of a type error:


:3,3: type error [err:XPTY0004]: Cannot
treat [NodeXQType elementNode nametest=[uri: , local: foo]
content=[XQType ANY_TYPE_KIND*]] as [XQType NONE_KIND] when returning
the result of the function local:foo().; raised at
/Users/wcandillon/28msec/zorba/src/runtime/core/sequencetypes.cpp:557
=
local:foo#0 
/Users/wcandillon/tmp/test.xq at line 6 column 1

This is very ugly und not understandable for someone who is not involved
in the zorba internals. We need an error msg like this:

Stopped at line 1, column 17: [XPTY0004] Can't promote type xs:string to
empty-sequence(): "abc".

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

** Changed in: zorba
 Assignee: (unassigned) => Markos Zaharioudakis (markos-za)

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

Title:
  type errors cause ugly error msgs

Status in Zorba - The XQuery Processor:
  New

Bug description:
  A query like this

  declare function local:foo() as empty-sequence()
   {
 
   };
   
   local:foo();

  causes the following error msg because of a type error:

  
  :3,3: type error [err:XPTY0004]: Cannot
  treat [NodeXQType elementNode nametest=[uri: , local: foo]
  content=[XQType ANY_TYPE_KIND*]] as [XQType NONE_KIND] when returning
  the result of the function local:foo().; raised at
  /Users/wcandillon/28msec/zorba/src/runtime/core/sequencetypes.cpp:557
  =
  local:foo#0 
  /Users/wcandillon/tmp/test.xq at line 6 column 1

  This is very ugly und not understandable for someone who is not
  involved in the zorba internals. We need an error msg like this:

  Stopped at line 1, column 17: [XPTY0004] Can't promote type xs:string
  to empty-sequence(): "abc".

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