> > I'm stuck on trying to get the next sibling.... am I missing > something, or is this just plain not possible? Although XQuery doesn't require support for the following-sibling axis of XPath, you can simulate it by replacing $x/following-sibling::*[1] with $x/../*[.>>$x][1] Michael Kay