src/main/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java [410:426]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public NodePointer createChild(final JXPathContext context, final QName qName, int index) {
        if (index == WHOLE_COLLECTION) {
            index = 0;
        }
        final boolean success = getAbstractFactory(context).createObject(context, this, node, qName.toString(), index);
        if (success) {
            NodeTest nodeTest;
            final String prefix = qName.getPrefix();
            final String namespaceURI = prefix == null ? null : context.getNamespaceURI(prefix);
            nodeTest = new NodeNameTest(qName, namespaceURI);
            final NodeIterator it = childIterator(nodeTest, false, null);
            if (it != null && it.setPosition(index + 1)) {
                return it.getNodePointer();
            }
        }
        throw new JXPathAbstractFactoryException("Factory could not create a child node for path: " + asPath() + "/" + qName + "[" + (index + 1) + "]");
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java [431:447]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public NodePointer createChild(final JXPathContext context, final QName qName, int index) {
        if (index == WHOLE_COLLECTION) {
            index = 0;
        }
        final boolean success = getAbstractFactory(context).createObject(context, this, node, qName.toString(), index);
        if (success) {
            NodeTest nodeTest;
            final String prefix = qName.getPrefix();
            final String namespaceURI = prefix == null ? null : context.getNamespaceURI(prefix);
            nodeTest = new NodeNameTest(qName, namespaceURI);
            final NodeIterator it = childIterator(nodeTest, false, null);
            if (it != null && it.setPosition(index + 1)) {
                return it.getNodePointer();
            }
        }
        throw new JXPathAbstractFactoryException("Factory could not create a child node for path: " + asPath() + "/" + qName + "[" + (index + 1) + "]");
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



