declare option ddtek:serialize "indent=yes"; { for $GROUP_9 in /EDIFACT/INVRPT/GROUP_9 return { $GROUP_9/LIN/LIN03/LIN0301/text() } { for $QTY in $GROUP_9/GROUP_11/QTY where $QTY/QTY01/QTY0101 = 17 return {$QTY/QTY01/QTY0102/text()} } } (: Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved. :)