@SuppressWarnings("unchecked")
    public org.w3c.dom.Node ensureExistence(final org.w3c.dom.Node contextNode) {
        final Document document = DOMHelper.getOwnerDocumentFor(contextNode);
        final Map<String, String> namespaceMapping = new HashMap<String, String>(userDefinedMapping);
        namespaceMapping.putAll(DOMHelper.getNamespaceMapping(document));
        //node.dump("");
        return ((List<org.w3c.dom.Node>) node.firstChildAccept(new BuildDocumentVisitor(variableResolver, namespaceMapping), contextNode)).get(0);
    }
@ SuppressWarnings ( "unchecked" ) public org . w3c . dom . Node ensureExistence ( final org . w3c . dom . Node contextNode ) { final Document document = DOMHelper . getOwnerDocumentFor ( contextNode ) ; final Map < String , String > namespaceMapping = new HashMap < String , String > ( userDefinedMapping ) ; namespaceMapping . putAll ( DOMHelper . getNamespaceMapping ( document ) ) ; return ( ( List < org . w3c . dom . Node > ) node . firstChildAccept ( new BuildDocumentVisitor ( variableResolver , namespaceMapping ) , contextNode ) ) . get ( 0 ) ; }
Creates nodes until selecting such a path would return something.

@param contextNode
@return the node that this expression would select.