{
  private int getContextPosition(Node ctx)  {    int pos = 1;    for (ctx = ctx.getPreviousSibling(); ctx != null;         ctx = ctx.getPreviousSibling())      {        pos++;      }    return pos;  }