This also includes fixes for ancestor and ancestor-or-self so that these axes can be used relative to documents and attributes.