*/
private static NodePointer createChildPointerForStep(
PropertyOwnerPointer parentPointer, Step step) {
int axis = step.getAxis();
if (axis == Compiler.AXIS_CHILD || axis == Compiler.AXIS_ATTRIBUTE) {
QName name = ((NodeNameTest) step.getNodeTest()).getNodeName();
if (axis == Compiler.AXIS_ATTRIBUTE && isLangAttribute(name)) {
return new LangAttributePointer(parentPointer);
}
if (parentPointer.isValidProperty(name)) {
NodePointer childPointer = parentPointer.getPropertyPointer();
((PropertyPointer) childPointer).setPropertyName(
name.toString());
childPointer.setAttribute(axis == Compiler.AXIS_ATTRIBUTE);
return childPointer;
}
//invalid property gets nothing, not even a NullPointer
return null;