<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3578</bug_id>
          
          <creation_ts>2006-08-03 03:20:30 +0000</creation_ts>
          <short_desc>[UPDUseCases] Issues with May 8th Usecase Draft</short_desc>
          <delta_ts>2011-01-08 00:31:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Update Facility 1.0 Use Cases</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jerome Simeon">simeon</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11005</commentid>
    <comment_count>0</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-08-03 03:20:30 +0000</bug_when>
    <thetext>Use Case &quot;R&quot;
============

Q4: Tries to set Annabel Lee&apos;s rating to &quot;B&quot;. But Annabel Lee was 
inserted (Q1) without any rating, so &quot;replace value of&quot; would
have an empty target.

Use Case &quot;Parts&quot;
================

The intro talks about a &quot;partlist.xml&quot;, but the queries access
a &quot;part-list.xml&quot;

Q3: Neither solution 1, nor solution 3 lead to the expected result.
Solution 1 doesn&apos;t delete piston, window and lock.
The recursive function is solution 2 is also incorrect, as it
deletes in &quot;part-tree.xml&quot; at the first call and in &quot;part-list.xml&quot;
at subsequent calls.

Q4: The note says that &quot;as last into&quot; should be used if position is
important, but the expected result shows that the &quot;radio&quot; element
is inserted as the first child of &quot;car&quot;, not as the last one.

Use Case &quot;SOAP&quot;
===============

A few typos:
* count($returnDepartingAirports)&gt;1
(the one is missing)
* has a call to currentdateTime() instead of current-dateTime() 
* should use string() instead of string-value()
* call to local:airports($in) fails because $in is undefined;
  local:airports($out//env:Body) should be used

Use Case &quot;Address Book&quot;
=======================

- Typo: a comma is missing after 
&quot;do replace value of $v2/contact with $v1/contact&quot;

I believe the current version of the address book use case raises a 
replace-replace
conflict. The reason is that there is a loop within which we do the same 
replace:

for $a in doc(&quot;archive.xml&quot;)/archived-agenda/entry, 
    $v1 in doc(&quot;copy1.xml&quot;)/agenda-version/entry, 
    $v2 in doc(&quot;copy2.xml&quot;)/agenda-version/entry
where $a/name = $v1/name
  and $v1/name = $v2/name
...
return
...
            do replace value of 
               doc(&quot;archive.xml&quot;)/*/last-synch-time
            with current-dateTime()

here doc(&quot;archive.xml&quot;)/*/last-synch-time

keeps pointing to the same node and therefore there will be multiple 
replaces
over the same node in the pending update list, which raises a conflict 
when applying
them.

- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16181</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 17:18:47 +0000</bug_when>
    <thetext>This seems to solve the address book use case - it sure would be easier with the scripting extensions.

for $a in doc(&quot;archive.xml&quot;)/archived-agenda/entry,
   $v1 in doc(&quot;copy1.xml&quot;)/agenda-version/entry,
   $v2 in doc(&quot;copy2.xml&quot;)/agenda-version/entry
where $a/name = $v1/name
 and $v1/name = $v2/name
return
 if ($a/contact = $v1/contact and $v1/contact=$v2/contact)
 then ()
 else
   if ($v1/contact = $v2/contact)
   then replace value of node $a/contact with $v1/contact
   else
     if ($a/contact = $v1/contact)
     then (
           replace value of node $a/contact with $v2/contact,
           replace value of node $v1/contact with $v2/contact
           )
     else
       if ($a/contact = $v2/contact)
       then (
             replace value of node $a/contact with $v1/contact,
             replace value of node $v2/contact with $v1/contact
            )
       else (
         insert node
           &lt;fail&gt;
              &lt;arch&gt;{ $a }&lt;/arch&gt;
              &lt;v1&gt;{ $v1 }&lt;/v1&gt;
              &lt;v2&gt;{ $v2 }&lt;/v2&gt;
           &lt;/fail&gt;
         into doc(&quot;log.xml&quot;)/log
       )
,
          
replace value of node doc(&quot;archive.xml&quot;)/*/last-synch-time
       with current-dateTime()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16182</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 17:31:05 +0000</bug_when>
    <thetext>I believe this fixes the errors in Use Case &quot;SOAP&quot;:

&lt;pre&gt;
declare namespace    env=&quot;http://www.w3.org/2003/05/soap-envelope&quot;; declare namespace    m=&quot;http://travelcompany.example.org/reservation&quot;; declare namespace    n=&quot;http://mycompany.example.com/employees&quot;; declare namespace    p=&quot;http://travelcompany.example.org/reservation/travel&quot;;  (:  A clarification is needed only if there are no  :  airports or more than one for a given city. If  :  there is precisely one, there is no need to  :  ask for information on that city.  :)  declare function local:airportChoices($city as xs:string) {   let $airports := collection(&quot;airports&quot;)[CITY = $city]   return     if (count($airports) = 0)     then         &lt;error&gt; No airports found for {$city}!&lt;/error&gt;     else if (count($airports) &gt; 1)      then         &lt;airportChoices&gt;         {            for $c in $airports/CODE           return (string( $c ), &quot; &quot;)         }        &lt;/airportChoices&gt;     else () };  (:  Make sure that each airport is unambiguous. If there is  :  more than one airport for a city, ask for clarification.  :  :  The primer only shows the error condition, so it is not  :  clear what to do if there are no errors. Here, we simply  :  return the airports in the itinerary.  :)  declare function local:airports($in as element(env:Envelope)) {     let $departureDeparting :=        $in//p:departure/p:departing     let $departureDepartingAirports :=        collection(&quot;airports&quot;)[CITY = $departureDeparting]     let $departureArriving :=        $in//p:departure/p:arriving     let $departureArrivingAirports :=        collection(&quot;airports&quot;)[CITY = $departureArriving]     let $returnDeparting :=        $in//p:return/p:departing     let $returnDepartingAirports :=        collection(&quot;airports&quot;)[CITY = $returnDeparting]     let $returnArriving :=        $in//p:return/p:arriving     let $returnArrivingAirports :=        collection(&quot;airports&quot;)[CITY = $returnArriving]     return        if ( count($departureDepartingAirports)=0 or              count($departureDepartingAirports)&gt;1 or              count($departureArrivingAirports)=0 or              count($departureArrivingAirports)&gt;1 or              count($returnDepartingAirports)=0 or              count($returnDepartingAirports)&gt;1 or              count($returnArrivingAirports)=0 or              count($returnArrivingAirports)&gt;1 )          then           &lt;p:itineraryClarification&gt;             &lt;p:departure&gt;               &lt;p:departing&gt;                 { local:airportChoices($departureDeparting) }               &lt;/p:departing&gt;               &lt;p:arriving&gt;                 { local:airportChoices($departureArriving) }               &lt;/p:arriving&gt;              &lt;/p:departure&gt;             &lt;p:return&gt;               &lt;p:departing&gt;                 { local:airportChoices($returnDeparting) }               &lt;/p:departing&gt;               &lt;p:arriving&gt;                 { local:airportChoices($returnArriving) }               &lt;/p:arriving&gt;             &lt;/p:return&gt;           &lt;/p:itineraryClarification&gt;          else            &lt;p:itinerary&gt;             &lt;p:departure&gt;               &lt;p:departing&gt;{$departureDeparting}&lt;/p:departing&gt;               &lt;p:arriving&gt;{$departureArriving}&lt;/p:arriving&gt;             &lt;/p:departure&gt;             &lt;p:return&gt;               &lt;p:departing&gt;{$returnDeparting}&lt;/p:departing&gt;               &lt;p:arriving&gt;{$returnArriving}&lt;/p:arriving&gt;             &lt;/p:return&gt;           &lt;/p:itinerary&gt; };  declare variable $msg external;  copy $out := $msg/env:Envelope modify (   replace value of node $out//m:dateAndTime 
     with fn:current-dateTime(),   replace node $out//env:Body    with &lt;env:Body&gt;         { local:airports($out//env:Body) }        &lt;/env:Body&gt; ) return $out
&lt;/pre&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16183</commentid>
    <comment_count>3</comment_count>
      <attachid>483</attachid>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 17:32:48 +0000</bug_when>
    <thetext>Created attachment 483
Fixed SOAP query.

I think this fixes the SOAP bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16184</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 18:48:17 +0000</bug_when>
    <thetext>I think this fixes the Use Case &quot;R&quot; Q4:


let $user := doc(&quot;users.xml&quot;)/users/user_tuple[name=&quot;Annabel Lee&quot;] return 
  if ($user/rating)     
    then replace value of node $user/rating with &quot;B&quot; 
    else insert node &lt;rating&gt;B&lt;/rating&gt; into $user</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16185</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 19:52:50 +0000</bug_when>
    <thetext>[quote]Q4: The note says that &quot;as last into&quot; should be used if position is
important, but the expected result shows that the &quot;radio&quot; element
is inserted as the first child of &quot;car&quot;, not as the last one.[/quote]

But that&apos;s the point. I show a query that doesn&apos;t specify position, and it winds up first, which might be unexpected. In subsequent text, I then say that you can put it in a particular position, e.g. by specifying &quot;as last&quot;.

I don&apos;t think this is a bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16186</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 20:24:11 +0000</bug_when>
    <thetext>[quote]Q3: Neither solution 1, nor solution 3 lead to the expected result.
Solution 1 doesn&apos;t delete piston, window and lock.
The recursive function is solution 2 is also incorrect, as it
deletes in &quot;part-tree.xml&quot; at the first call and in &quot;part-list.xml&quot;
at subsequent calls.[/quote]

I believe this is correct for solution 1:


for $pt in doc(&quot;part-tree.xml&quot;)//part[@name=&quot;car&quot;]//part,
     $pl in doc(&quot;part-list.xml&quot;)//part
where $pt/@partid eq $pl/@partid
return 
   delete nodes $pl

I believe this is correct for solution 2:

declare updating function 
             local:delete-subtree($p as element(part))
  {
      for $child in doc(&quot;part-list.xml&quot;)//part
      where $p/@partid eq $child/@partof
      return (
        delete nodes $child,
        local:delete-subtree($child)
      )
  };

for $p in doc(&quot;part-list.xml&quot;)//part[@name=&quot;car&quot;]
return 
  local:delete-subtree($p)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16187</commentid>
    <comment_count>7</comment_count>
    <who name="Liam R E Quin">liam</who>
    <bug_when>2007-08-17 20:28:14 +0000</bug_when>
    <thetext>Closed on behalf of Jonathan; please reopen if it is not satisfactory.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16188</commentid>
    <comment_count>8</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-08-17 20:47:19 +0000</bug_when>
    <thetext>Seems to work. Although the use of the &apos;current-dateTime&apos; function will make
it hard to use it as a test case...
Thanks!
- Jerome

(In reply to comment #1)
&gt; This seems to solve the address book use case - it sure would be easier with
&gt; the scripting extensions.
&gt; 
&gt; for $a in doc(&quot;archive.xml&quot;)/archived-agenda/entry,
&gt;    $v1 in doc(&quot;copy1.xml&quot;)/agenda-version/entry,
&gt;    $v2 in doc(&quot;copy2.xml&quot;)/agenda-version/entry
&gt; where $a/name = $v1/name
&gt;  and $v1/name = $v2/name
&gt; return
&gt;  if ($a/contact = $v1/contact and $v1/contact=$v2/contact)
&gt;  then ()
&gt;  else
&gt;    if ($v1/contact = $v2/contact)
&gt;    then replace value of node $a/contact with $v1/contact
&gt;    else
&gt;      if ($a/contact = $v1/contact)
&gt;      then (
&gt;            replace value of node $a/contact with $v2/contact,
&gt;            replace value of node $v1/contact with $v2/contact
&gt;            )
&gt;      else
&gt;        if ($a/contact = $v2/contact)
&gt;        then (
&gt;              replace value of node $a/contact with $v1/contact,
&gt;              replace value of node $v2/contact with $v1/contact
&gt;             )
&gt;        else (
&gt;          insert node
&gt;            &lt;fail&gt;
&gt;               &lt;arch&gt;{ $a }&lt;/arch&gt;
&gt;               &lt;v1&gt;{ $v1 }&lt;/v1&gt;
&gt;               &lt;v2&gt;{ $v2 }&lt;/v2&gt;
&gt;            &lt;/fail&gt;
&gt;          into doc(&quot;log.xml&quot;)/log
&gt;        )
&gt; ,
&gt; 
&gt; replace value of node doc(&quot;archive.xml&quot;)/*/last-synch-time
&gt;        with current-dateTime()
&gt; 

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16189</commentid>
    <comment_count>9</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-08-17 20:58:51 +0000</bug_when>
    <thetext>Works. Thanks!
- Jerome

(In reply to comment #4)
&gt; I think this fixes the Use Case &quot;R&quot; Q4:
&gt; 
&gt; 
&gt; let $user := doc(&quot;users.xml&quot;)/users/user_tuple[name=&quot;Annabel Lee&quot;] return 
&gt;   if ($user/rating)     
&gt;     then replace value of node $user/rating with &quot;B&quot; 
&gt;     else insert node &lt;rating&gt;B&lt;/rating&gt; into $user
&gt; 

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16190</commentid>
    <comment_count>10</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-08-17 21:02:43 +0000</bug_when>
    <thetext>Yes, I agree it&apos;s not really a bug. I just think the text can easily been read as saying: &quot;it&apos;s appearing last but that&apos;s not enforced by the semantics&quot;, which I think is what the comment was about.
- Jerome

(In reply to comment #5)
&gt; [quote]Q4: The note says that &quot;as last into&quot; should be used if position is
&gt; important, but the expected result shows that the &quot;radio&quot; element
&gt; is inserted as the first child of &quot;car&quot;, not as the last one.[/quote]
&gt; 
&gt; But that&apos;s the point. I show a query that doesn&apos;t specify position, and it
&gt; winds up first, which might be unexpected. In subsequent text, I then say that
&gt; you can put it in a particular position, e.g. by specifying &quot;as last&quot;.
&gt; 
&gt; I don&apos;t think this is a bug.
&gt; 

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16194</commentid>
    <comment_count>11</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-08-17 21:27:37 +0000</bug_when>
    <thetext>Thanks. I think there is still a problem. The local function is defined as taking
elements of type env:Envelop as input, but it&apos;s passed an env:Body.

You may want to remove &apos;//env:Body&apos; in the function call.

- Jerome

(In reply to comment #2)
&gt; I believe this fixes the errors in Use Case &quot;SOAP&quot;:
&gt; 
&gt; &lt;pre&gt;
&gt; declare namespace    env=&quot;http://www.w3.org/2003/05/soap-envelope&quot;; declare
&gt; namespace    m=&quot;http://travelcompany.example.org/reservation&quot;; declare
&gt; namespace    n=&quot;http://mycompany.example.com/employees&quot;; declare namespace   
&gt; p=&quot;http://travelcompany.example.org/reservation/travel&quot;;  (:  A clarification
&gt; is needed only if there are no  :  airports or more than one for a given city.
&gt; If  :  there is precisely one, there is no need to  :  ask for information on
&gt; that city.  :)  declare function local:airportChoices($city as xs:string) {  
&gt; let $airports := collection(&quot;airports&quot;)[CITY = $city]   return     if
&gt; (count($airports) = 0)     then         &lt;error&gt; No airports found for
&gt; {$city}!&lt;/error&gt;     else if (count($airports) &gt; 1)      then        
&gt; &lt;airportChoices&gt;         {            for $c in $airports/CODE           return
&gt; (string( $c ), &quot; &quot;)         }        &lt;/airportChoices&gt;     else () };  (:  Make
&gt; sure that each airport is unambiguous. If there is  :  more than one airport
&gt; for a city, ask for clarification.  :  :  The primer only shows the error
&gt; condition, so it is not  :  clear what to do if there are no errors. Here, we
&gt; simply  :  return the airports in the itinerary.  :)  declare function
&gt; local:airports($in as element(env:Envelope)) {     let $departureDeparting :=  
&gt;      $in//p:departure/p:departing     let $departureDepartingAirports :=       
&gt; collection(&quot;airports&quot;)[CITY = $departureDeparting]     let $departureArriving
&gt; :=        $in//p:departure/p:arriving     let $departureArrivingAirports :=    
&gt;    collection(&quot;airports&quot;)[CITY = $departureArriving]     let $returnDeparting
&gt; :=        $in//p:return/p:departing     let $returnDepartingAirports :=       
&gt; collection(&quot;airports&quot;)[CITY = $returnDeparting]     let $returnArriving :=     
&gt;   $in//p:return/p:arriving     let $returnArrivingAirports :=       
&gt; collection(&quot;airports&quot;)[CITY = $returnArriving]     return        if (
&gt; count($departureDepartingAirports)=0 or             
&gt; count($departureDepartingAirports)&gt;1 or             
&gt; count($departureArrivingAirports)=0 or             
&gt; count($departureArrivingAirports)&gt;1 or             
&gt; count($returnDepartingAirports)=0 or             
&gt; count($returnDepartingAirports)&gt;1 or             
&gt; count($returnArrivingAirports)=0 or             
&gt; count($returnArrivingAirports)&gt;1 )          then          
&gt; &lt;p:itineraryClarification&gt;             &lt;p:departure&gt;              
&gt; &lt;p:departing&gt;                 { local:airportChoices($departureDeparting) }    
&gt;           &lt;/p:departing&gt;               &lt;p:arriving&gt;                 {
&gt; local:airportChoices($departureArriving) }               &lt;/p:arriving&gt;         
&gt;     &lt;/p:departure&gt;             &lt;p:return&gt;               &lt;p:departing&gt;          
&gt;       { local:airportChoices($returnDeparting) }               &lt;/p:departing&gt;  
&gt;             &lt;p:arriving&gt;                 {
&gt; local:airportChoices($returnArriving) }               &lt;/p:arriving&gt;            
&gt; &lt;/p:return&gt;           &lt;/p:itineraryClarification&gt;          else           
&gt; &lt;p:itinerary&gt;             &lt;p:departure&gt;              
&gt; &lt;p:departing&gt;{$departureDeparting}&lt;/p:departing&gt;              
&gt; &lt;p:arriving&gt;{$departureArriving}&lt;/p:arriving&gt;             &lt;/p:departure&gt;       
&gt;      &lt;p:return&gt;               &lt;p:departing&gt;{$returnDeparting}&lt;/p:departing&gt;    
&gt;           &lt;p:arriving&gt;{$returnArriving}&lt;/p:arriving&gt;             &lt;/p:return&gt;   
&gt;        &lt;/p:itinerary&gt; };  declare variable $msg external;  copy $out :=
&gt; $msg/env:Envelope modify (   replace value of node $out//m:dateAndTime 
&gt;      with fn:current-dateTime(),   replace node $out//env:Body    with
&gt; &lt;env:Body&gt;         { local:airports($out//env:Body) }        &lt;/env:Body&gt; )
&gt; return $out
&gt; &lt;/pre&gt;
&gt; 

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16195</commentid>
    <comment_count>12</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-08-17 21:35:27 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; Thanks. I think there is still a problem. The local function is defined as
&gt; taking
&gt; elements of type env:Envelop as input, but it&apos;s passed an env:Body.
&gt; 
&gt; You may want to remove &apos;//env:Body&apos; in the function call.

Ooops - you&apos;re right - fixing that now. Thanks!

Jonathan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16196</commentid>
    <comment_count>13</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-08-17 23:08:03 +0000</bug_when>
    <thetext>Works! Thanks,
- Jerome

(In reply to comment #6)
&gt; [quote]Q3: Neither solution 1, nor solution 3 lead to the expected result.
&gt; Solution 1 doesn&apos;t delete piston, window and lock.
&gt; The recursive function is solution 2 is also incorrect, as it
&gt; deletes in &quot;part-tree.xml&quot; at the first call and in &quot;part-list.xml&quot;
&gt; at subsequent calls.[/quote]
&gt; 
&gt; I believe this is correct for solution 1:
&gt; 
&gt; 
&gt; for $pt in doc(&quot;part-tree.xml&quot;)//part[@name=&quot;car&quot;]//part,
&gt;      $pl in doc(&quot;part-list.xml&quot;)//part
&gt; where $pt/@partid eq $pl/@partid
&gt; return 
&gt;    delete nodes $pl
&gt; 
&gt; I believe this is correct for solution 2:
&gt; 
&gt; declare updating function 
&gt;              local:delete-subtree($p as element(part))
&gt;   {
&gt;       for $child in doc(&quot;part-list.xml&quot;)//part
&gt;       where $p/@partid eq $child/@partof
&gt;       return (
&gt;         delete nodes $child,
&gt;         local:delete-subtree($child)
&gt;       )
&gt;   };
&gt; 
&gt; for $p in doc(&quot;part-list.xml&quot;)//part[@name=&quot;car&quot;]
&gt; return 
&gt;   local:delete-subtree($p)
&gt; 

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>483</attachid>
            <date>2007-08-17 17:32:48 +0000</date>
            <delta_ts>2007-08-17 17:32:48 +0000</delta_ts>
            <desc>Fixed SOAP query.</desc>
            <filename>soap.xq</filename>
            <type>text/x-c++src</type>
            <size>3634</size>
            <attacher name="Jonathan Robie">jonathan.robie</attacher>
            
              <data encoding="base64">ZGVjbGFyZSBuYW1lc3BhY2UgDSAgZW52PSJodHRwOi8vd3d3LnczLm9yZy8yMDAzLzA1L3NvYXAt
ZW52ZWxvcGUiOw1kZWNsYXJlIG5hbWVzcGFjZSANICBtPSJodHRwOi8vdHJhdmVsY29tcGFueS5l
eGFtcGxlLm9yZy9yZXNlcnZhdGlvbiI7DWRlY2xhcmUgbmFtZXNwYWNlIA0gIG49Imh0dHA6Ly9t
eWNvbXBhbnkuZXhhbXBsZS5jb20vZW1wbG95ZWVzIjsNZGVjbGFyZSBuYW1lc3BhY2UgDSAgcD0i
aHR0cDovL3RyYXZlbGNvbXBhbnkuZXhhbXBsZS5vcmcvcmVzZXJ2YXRpb24vdHJhdmVsIjsNDSg6
ICBBIGNsYXJpZmljYXRpb24gaXMgbmVlZGVkIG9ubHkgaWYgdGhlcmUgYXJlIG5vDSA6ICBhaXJw
b3J0cyBvciBtb3JlIHRoYW4gb25lIGZvciBhIGdpdmVuIGNpdHkuIElmDSA6ICB0aGVyZSBpcyBw
cmVjaXNlbHkgb25lLCB0aGVyZSBpcyBubyBuZWVkIHRvDSA6ICBhc2sgZm9yIGluZm9ybWF0aW9u
IG9uIHRoYXQgY2l0eS4NIDopDQ1kZWNsYXJlIGZ1bmN0aW9uIGxvY2FsOmFpcnBvcnRDaG9pY2Vz
KCRjaXR5IGFzIHhzOnN0cmluZykNew0gIGxldCAkYWlycG9ydHMgOj0gY29sbGVjdGlvbigiYWly
cG9ydHMiKVtDSVRZID0gJGNpdHldDSAgcmV0dXJuDSAgICBpZiAoY291bnQoJGFpcnBvcnRzKSA9
IDApDSAgICB0aGVuIA0gICAgICAgPGVyc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aXZp
bmdBaXJwb3J0cyk+MSApDSAgICAgICAgIHRoZW4NICAgICAgICAgIDxwOml0aW5lcmFyeUNsYXJp
ZmljYXRpb24+DSAgICAgICAgICAgIDxwOmRlcGFydHVyZT4NICAgICAgICAgICAgICA8cDpkZXBh
cnRpbmc+DSAgICAgICAgICAgICAgICB7IGxvY2FsOmFpcnBvcnRDaG9pY2VzKCRkZXBhcnR1cmVE
ZXBhcnRpbmcpIH0NICAgICAgICAgICAgICA8L3A6ZGVwYXJ0aW5nPg0gICAgICAgICAgICAgIDxw
OmFycml2aW5nPg0gICAgICAgICAgICAgICAgeyBsb2NhbDphaXJwb3J0Q2hvaWNlcygkZGVwYXJ0
dXJlQXJyaXZpbmcpIH0NICAgICAgICAgICAgICA8L3A6YXJyaXZpbmc+IA0gICAgICAgICAgICA8
L3A6ZGVwYXJ0dXJlPg0gICAgICAgICAgICA8cDpyZXR1cm4+DSAgICAgICAgICAgICAgPHA6ZGVw
YXJ0aW5nPg0gICAgICAgICAgICAgICAgeyBsb2NhbDphaXJwb3J0Q2hvaWNlcygkcmV0dXJuRGVw
YXJ0aW5nKSB9DSAgICAgICAgICAgICAgPC9wOmRlcGFydGluZz4NICAgICAgICAgICAgICA8cDph
cnJpdmluZz4NICAgICAgICAgICAgICAgIHsgbG9jYWw6YWlycG9ydENob2ljZXMoJHJldHVybkFy
cml2aW5nKSB9DSAgICAgICAgICAgICAgPC9wOmFycml2aW5nPg0gICAgICAgICAgICA8L3A6cmV0
dXJuPg0gICAgICAgICAgPC9wOml0aW5lcmFyeUNsYXJpZmljYXRpb24+DSAgICAgICAgIGVsc2Ug
DSAgICAgICAgICA8cDppdGluZXJhcnk+DSAgICAgICAgICAgIDxwOmRlcGFydHVyZT4NICAgICAg
ICAgICAgICA8cDpkZXBhcnRpbmc+eyRkZXBhcnR1cmVEZXBhcnRpbmd9PC9wOmRlcGFydGluZz4N
ICAgICAgICAgICAgICA8cDphcnJpdmluZz57JGRlcGFydHVyZUFycml2aW5nfTwvcDphcnJpdmlu
Zz4NICAgICAgICAgICAgPC9wOmRlcGFydHVyZT4NICAgICAgICAgICAgPHA6cmV0dXJuPg0gICAg
ICAgICAgICAgIDxwOmRlcGFydGluZz57JHJldHVybkRlcGFydGluZ308L3A6ZGVwYXJ0aW5nPg0g
ICAgICAgICAgICAgIDxwOmFycml2aW5nPnskcmV0dXJuQXJyaXZpbmd9PC9wOmFycml2aW5nPg0g
ICAgICAgICAgICA8L3A6cmV0dXJuPg0gICAgICAgICAgPC9wOml0aW5lcmFyeT4NfTsNDWRlY2xh
cmUgdmFyaWFibGUgJG1zZyBleHRlcm5hbDsNDWNvcHkgJG91dCA6PSAkbXNnL2VudjpFbnZlbG9w
ZQ1tb2RpZnkgKA0gIHJlcGxhY2UgdmFsdWUgb2Ygbm9kZSAkb3V0Ly9tOmRhdGVBbmRUaW1lIAog
ICAgIHdpdGggZm46Y3VycmVudC1kYXRlVGltZSgpLA0gIHJlcGxhY2Ugbm9kZSAkb3V0Ly9lbnY6
Qm9keSANICB3aXRoIDxlbnY6Qm9keT4NICAgICAgICB7IGxvY2FsOmFpcnBvcnRzKCRvdXQvL2Vu
djpCb2R5KSB9DSAgICAgICA8L2VudjpCb2R5Pg0pDXJldHVybiAkb3V0Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>