This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6555 - applyUpdates-011 query update should use employee[2]
Summary: applyUpdates-011 query update should use employee[2]
Status: CLOSED FIXED
Alias: None
Product: XQuery Update Facility Test Suite
Classification: Unclassified
Component: XQuery Update Facility Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-09 18:15 UTC by zhen hua liu
Modified: 2009-02-12 21:42 UTC (History)
0 users

See Also:


Attachments

Description zhen hua liu 2009-02-09 18:15:32 UTC
currently:
both the XQUF query and test query shall use employee[2] as the input 
works-mod.xml (see below), only the second employee has both element and text nodes

<?xml version="1.0"?>
 <works>
  <employee name="Jane Doe 1" gender="female">
   <empnum>E1</empnum>
   <pnum>P1</pnum>
   <hours>40</hours>
  </employee>
  <employee name = "John Doe 2" gender="male">
   <empnum>E1</empnum>
   <pnum>P2</pnum>
   <hours>70</hours>
   <hours>20</hours>Text data from Employee[2]
  </employee>



 %cat ./xquery-update-10-test-suite/Queries/XQuery/UpdateRoutines/applyUpdates/applyUpdates-011.xq
(: Name: applyUpdates-011 :)
(: Description: Delete elements and merge text nodes. :)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

let $var := $input-context/works[1]/employee[1]
return
   delete node $var/*

 %cat ./xquery-update-10-test-suite/Queries/XQuery/UpdateRoutines/applyUpdates/applyUpdates-011-test.xq
(: Name: applyUpdates-011-test :)
(: Description: Evaluation query for applyUpdates-011 :)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

count($input-context/works[1]/employee[1]/text())
Comment 1 Andrew Eisenberg 2009-02-12 21:41:52 UTC
I've made the change that you suggested. 

I'll point out that the first employee element contains text nodes consisting of spaces and line feed characters, and so the test case was correct as originally written.

As I'm making the change you requested, I'm marking this closed.