// go through steps backwards
LocationPathPattern path = answer;
boolean first = true;
for ( ListIterator iter = steps.listIterator( steps.size() ); iter.hasPrevious(); )
{
Step step = (Step) iter.previous();
if ( first )
{
first = false;
path = convertStep( path, step );
}
else
{
if ( navigationStep( step ) )
{
LocationPathPattern parent = new LocationPathPattern();
int axis = step.getAxis();
if ( axis == Axis.DESCENDANT || axis == Axis.DESCENDANT_OR_SELF )
{
path.setAncestorPattern( parent );
}
else