PrefixedName () { final ASTNode[] nodes = getNode().getChildren(TokenSet.create(XPathTokenTypes.NCNAME)); if (nodes.length == 0) { final ASTNode node = getNode().findChildByType(XPathTokenTypes.STAR); if (node != null) { return new PrefixedNameImpl(null, node); } } else if (nodes.length == 1) { final ASTNode star = getNode().findChildByType(XPathTokenTypes.STAR); if (star != null) { return star.getTextRange().getStartOffset() > nodes[0].getTextRange().getStartOffset() ? new PrefixedNameImpl(nodes[0], star) : new PrefixedNameImpl(star, nodes[0]); } else { return new PrefixedNameImpl(nodes[0]); } } else if (nodes.length == 2) { return new PrefixedNameImpl(nodes[0], nodes[1]); } return null; }