/** * Overide equal method for StackGuard objects * */ public int countLikeTemplates(ElemTemplate templ, int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); int count = 1; for (int i = pos-1; i >= 0; i--) { if((ElemTemplateElement)elems.elementAt(i) == templ) count++; } return count; }
/** * Get the next named or match template down from and including * the given position. * @param pos the current index position in the stack. * @return null if no matched or named template found, otherwise * the next named or matched template at or below the position. */ private ElemTemplate getNextMatchOrNamedTemplate(int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); for (int i = pos; i >= 0; i--) { ElemTemplateElement elem = (ElemTemplateElement) elems.elementAt(i); if(null != elem) { if(elem.getXSLToken() == Constants.ELEMNAME_TEMPLATE) { return (ElemTemplate)elem; } } } return null; }
/** * Overide equal method for StackGuard objects * */ public int countLikeTemplates(ElemTemplate templ, int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); int count = 1; for (int i = pos-1; i >= 0; i--) { if((ElemTemplateElement)elems.elementAt(i) == templ) count++; } return count; }
/** * Overide equal method for StackGuard objects * */ public int countLikeTemplates(ElemTemplate templ, int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); int count = 1; for (int i = pos-1; i >= 0; i--) { if((ElemTemplateElement)elems.elementAt(i) == templ) count++; } return count; }
/** * Overide equal method for StackGuard objects * */ public int countLikeTemplates(ElemTemplate templ, int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); int count = 1; for (int i = pos-1; i >= 0; i--) { if((ElemTemplateElement)elems.elementAt(i) == templ) count++; } return count; }
/** * Get the next named or match template down from and including * the given position. * @param pos the current index position in the stack. * @return null if no matched or named template found, otherwise * the next named or matched template at or below the position. */ private ElemTemplate getNextMatchOrNamedTemplate(int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); for (int i = pos; i >= 0; i--) { ElemTemplateElement elem = (ElemTemplateElement) elems.elementAt(i); if(null != elem) { if(elem.getXSLToken() == Constants.ELEMNAME_TEMPLATE) { return (ElemTemplate)elem; } } } return null; }
/** * Get the next named or match template down from and including * the given position. * @param pos the current index position in the stack. * @return null if no matched or named template found, otherwise * the next named or matched template at or below the position. */ private ElemTemplate getNextMatchOrNamedTemplate(int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); for (int i = pos; i >= 0; i--) { ElemTemplateElement elem = (ElemTemplateElement) elems.elementAt(i); if(null != elem) { if(elem.getXSLToken() == Constants.ELEMNAME_TEMPLATE) { return (ElemTemplate)elem; } } } return null; }
/** * Get the next named or match template down from and including * the given position. * @param pos the current index position in the stack. * @return null if no matched or named template found, otherwise * the next named or matched template at or below the position. */ private ElemTemplate getNextMatchOrNamedTemplate(int pos) { ObjectStack elems = m_transformer.getCurrentTemplateElements(); for (int i = pos; i >= 0; i--) { ElemTemplateElement elem = (ElemTemplateElement) elems.elementAt(i); if(null != elem) { if(elem.getXSLToken() == Constants.ELEMNAME_TEMPLATE) { return (ElemTemplate)elem; } } } return null; }