(Q16) Prepare a "critical sequence" report consisting of all elements that occur between the first and second incision in the first procedure.

<critical_sequence>
   LET $p := //procedure[1]
   FOR $e IN //* AFTER ($p//incision)[1] 
          BEFORE ($p//incision)[2]
   RETURN shallow($e)
</critical_sequence>
  • This query introduces the BEFORE and AFTER operators, which select nodes contained in the first operand that are also contained before, or after, respectively, at least one node in the second operand (in document order).
  • The shallow() function returns a shallow copy of its argument, a la xsl:copy
<<<  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15    >>>