/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
int currentNode = xctxt.getContextNode();
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
int currentNode = xctxt.getContextNode();
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { SubContextList subContextList = xctxt.getCurrentNodeList(); int currentNode = DTM.NULL; if (null != subContextList) { if (subContextList instanceof PredicatedNodeTest) { LocPathIterator iter = ((PredicatedNodeTest)subContextList) .getLocPathIterator(); currentNode = iter.getCurrentContextNode(); } else if(subContextList instanceof StepPattern) { throw new RuntimeException(XSLMessages.createMessage( XSLTErrorResources.ER_PROCESSOR_ERROR,null)); } } else { // not predicate => ContextNode == CurrentNode currentNode = xctxt.getContextNode(); } return new XNodeSet(currentNode, xctxt.getDTMManager()); }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }
/** * Dereference the variable, and return the reference value. Note that lazy * evaluation will occur. If a variable within scope is not found, a warning * will be sent to the error listener, and an empty nodeset will be returned. * * * @param xctxt The runtime execution context. * * @return The evaluated variable, or an empty nodeset if not found. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException { XNodeSet xns = (XNodeSet)super.execute(xctxt, destructiveOK); DTMManager dtmMgr = xctxt.getDTMManager(); int context = xctxt.getContextNode(); if(dtmMgr.getDTM(xns.getRoot()).getDocument() != dtmMgr.getDTM(context).getDocument()) { Expression expr = (Expression)xns.getContainedIter(); xns = (XNodeSet)expr.asIterator(xctxt, context); } return xns; }