public XPath parseXPath(String o) throws JaxenException { return new NodeServiceXPath(o, this, null); }
NodeServiceXPath nsXPath = new NodeServiceXPath(xpath, documentNavigator, paramDefs); for (String prefix : namespacePrefixResolver.getPrefixes()) nsXPath.addNamespace(prefix, namespacePrefixResolver.getNamespaceURI(prefix)); List list = nsXPath.selectNodes(nodeService.getPrimaryParent(contextNodeRef)); List<Serializable> answer = new ArrayList<Serializable>(list.size()); for (Object o : list)
SimpleVariableContext svc = (SimpleVariableContext) this.getVariableContext(); for (int i = 0; i < paramDefs.length; i++) addNamespace(prefix, documentNavigator.getNamespacePrefixResolver().getNamespaceURI(prefix));
NodeServiceXPath nsXPath = new NodeServiceXPath(xpath, documentNavigator, paramDefs); for (String prefix : namespacePrefixResolver.getPrefixes()) nsXPath.addNamespace(prefix, namespacePrefixResolver.getNamespaceURI(prefix)); List list = nsXPath.selectNodes(nodeService.getPrimaryParent(contextNodeRef)); List<Serializable> answer = new ArrayList<Serializable>(list.size()); for (Object o : list)
SimpleVariableContext svc = (SimpleVariableContext) this.getVariableContext(); for (int i = 0; i < paramDefs.length; i++) addNamespace(prefix, documentNavigator.getNamespacePrefixResolver().getNamespaceURI(prefix));
NodeServiceXPath nsXPath = new NodeServiceXPath(xpath, documentNavigator, paramDefs); for (String prefix : namespacePrefixResolver.getPrefixes()) nsXPath.addNamespace(prefix, namespacePrefixResolver.getNamespaceURI(prefix)); List list = nsXPath.selectNodes(nodeService.getPrimaryParent(contextNodeRef)); HashSet<NodeRef> unique = new HashSet<NodeRef>(list.size()); for (Object o : list)
public XPath parseXPath(String o) throws JaxenException { return new NodeServiceXPath(o, this, null); }
NodeServiceXPath nsXPath = new NodeServiceXPath(xpath, documentNavigator, paramDefs); for (String prefix : namespacePrefixResolver.getPrefixes()) nsXPath.addNamespace(prefix, namespacePrefixResolver.getNamespaceURI(prefix)); List list = nsXPath.selectNodes(nodeService.getPrimaryParent(contextNodeRef)); HashSet<NodeRef> unique = new HashSet<NodeRef>(list.size()); for (Object o : list)
xpath = new NodeServiceXPath("//.[@test:animal='monkey']", documentNavigator, null); xpath.addNamespace(BaseNodeServiceTest.TEST_PREFIX, BaseNodeServiceTest.NAMESPACE); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(1, list.size()); xpath = new NodeServiceXPath("*", documentNavigator, null); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(3, list.size()); xpath = new NodeServiceXPath("*/*", documentNavigator, null); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(5, list.size()); xpath = new NodeServiceXPath("*/*/*", documentNavigator, null); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(3, list.size()); xpath = new NodeServiceXPath("*/*/*/*", documentNavigator, null); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(2, list.size()); xpath = new NodeServiceXPath("*/*/*/*/..", documentNavigator, null); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(2, list.size()); xpath = new NodeServiceXPath("*//.", documentNavigator, null); list = xpath.selectNodes(new ChildAssociationRef(null, null, null, rootNodeRef)); assertEquals(13, list.size());