/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. * * @throws javax.xml.transform.TransformerException */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = execute(xctxt).iter(); return iter.nextNode(); }
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. * * @throws javax.xml.transform.TransformerException */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = execute(xctxt).iter(); return iter.nextNode(); }
/** * Given an select expression and a context, evaluate the XPath * and return the resulting iterator. * * @param xctxt The execution context. * @param contextNode The node that "." expresses. * * * @return A valid DTMIterator. * @throws TransformerException thrown if the active ProblemListener decides * the error condition is severe enough to halt processing. * * @throws javax.xml.transform.TransformerException * @xsl.usage experimental */ public DTMIterator asIterator(XPathContext xctxt, int contextNode) throws javax.xml.transform.TransformerException { try { xctxt.pushCurrentNodeAndExpression(contextNode, contextNode); return execute(xctxt).iter(); } finally { xctxt.popCurrentNodeAndExpression(); } }
break; case CLASS_NODESET : result = iter(); break; case CLASS_BOOLEAN :
/** * Given an select expression and a context, evaluate the XPath * and return the resulting iterator. * * @param xctxt The execution context. * @param contextNode The node that "." expresses. * * * @return A valid DTMIterator. * @throws TransformerException thrown if the active ProblemListener decides * the error condition is severe enough to halt processing. * * @throws javax.xml.transform.TransformerException * @xsl.usage experimental */ public DTMIterator asIterator(XPathContext xctxt, int contextNode) throws javax.xml.transform.TransformerException { try { xctxt.pushCurrentNodeAndExpression(contextNode, contextNode); return execute(xctxt).iter(); } finally { xctxt.popCurrentNodeAndExpression(); } }
break; case CLASS_NODESET : result = iter(); break; case CLASS_BOOLEAN :
m_pw.println(); org.apache.xml.dtm.DTMIterator nl = ev.m_selection.iter();
DTMIterator nl = value.iter();
DTMIterator nl = value.iter();
DTMIterator ni = arg.iter(); int pos; UnionPathIterator upi = new UnionPathIterator();
DTMIterator ni = arg.iter(); StringVector usedrefs = null; int pos = ni.nextNode();
DTMIterator ni = arg.iter(); int pos; UnionPathIterator upi = new UnionPathIterator();
DTMIterator nl = value.iter();
DTMIterator ni = arg.iter(); StringVector usedrefs = null; int pos = ni.nextNode();
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. * * @throws javax.xml.transform.TransformerException */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = execute(xctxt).iter(); return iter.nextNode(); }
@Override protected void prepare() throws JspTagException { context = XalanUtil.getContext(this, pageContext); try { XObject nodes = select.execute(context, context.getCurrentNode(), null); // create an iterator over the returned nodes and push into the context DTMIterator iterator = nodes.iter(); context.pushContextNodeList(iterator); } catch (TransformerException e) { throw new JspTagException(e); } }
@Override protected void prepare() throws JspTagException { context = XalanUtil.getContext(this, pageContext); try { XObject nodes = select.execute(context, context.getCurrentNode(), null); // create an iterator over the returned nodes and push into the context DTMIterator iterator = nodes.iter(); context.pushContextNodeList(iterator); } catch (TransformerException e) { throw new JspTagException(e); } }