/** * Get the previous sibling (as a Node) or return null. * Note that this may be expensive if the parent has many kids; * we accept that price in exchange for avoiding the prev pointer * TODO: If we were sure parents and sibs are always ElemTemplateElements, * we could hit the fields directly rather than thru accessors. * * @return This node's previous sibling or null */ public ElemTemplateElement getPreviousSiblingElem() { ElemTemplateElement walker = getParentNodeElem(); ElemTemplateElement prev = null; if (walker != null) for (walker = walker.getFirstChildElem(); walker != null; prev = walker, walker = walker.getNextSiblingElem()) { if (walker == this) return prev; } return null; }
&& elem.getNextSiblingElem() != null && !(elem.getNextSiblingElem() instanceof ElemFallback)) while (nextElem == null) nextElem = elem.getNextSiblingElem(); if (nextElem == null) elem = elem.getParentElem();
/** * Get the previous sibling (as a Node) or return null. * Note that this may be expensive if the parent has many kids; * we accept that price in exchange for avoiding the prev pointer * TODO: If we were sure parents and sibs are always ElemTemplateElements, * we could hit the fields directly rather than thru accessors. * * @return This node's previous sibling or null */ public ElemTemplateElement getPreviousSiblingElem() { ElemTemplateElement walker = getParentNodeElem(); ElemTemplateElement prev = null; if (walker != null) for (walker = walker.getFirstChildElem(); walker != null; prev = walker, walker = walker.getNextSiblingElem()) { if (walker == this) return prev; } return null; }
&& elem.getNextSiblingElem() != null && !(elem.getNextSiblingElem() instanceof ElemFallback)) while (nextElem == null) nextElem = elem.getNextSiblingElem(); if (nextElem == null) elem = elem.getParentElem();
/** * Call the compose function for each ElemTemplateElement. * * @param templ non-null reference to template element that will have * the composed method called on it, and will have it's children's composed * methods called. */ void composeTemplates(ElemTemplateElement templ) throws TransformerException { templ.compose(this); for (ElemTemplateElement child = templ.getFirstChildElem(); child != null; child = child.getNextSiblingElem()) { composeTemplates(child); } templ.endCompose(this); }
/** * Call the compose function for each ElemTemplateElement. * * @param templ non-null reference to template element that will have * the composed method called on it, and will have it's children's composed * methods called. */ void composeTemplates(ElemTemplateElement templ) throws TransformerException { templ.compose(this); for (ElemTemplateElement child = templ.getFirstChildElem(); child != null; child = child.getNextSiblingElem()) { composeTemplates(child); } templ.endCompose(this); }
/** * This function is called after everything else has been * recomposed, and allows the template to set remaining * values that may be based on some other property that * depends on recomposition. */ public void compose(StylesheetRoot sroot) throws TransformerException { resolvePrefixTables(); ElemTemplateElement t = getFirstChildElem(); m_hasTextLitOnly = ((t != null) && (t.getXSLToken() == Constants.ELEMNAME_TEXTLITERALRESULT) && (t.getNextSiblingElem() == null)); StylesheetRoot.ComposeState cstate = sroot.getComposeState(); cstate.pushStackMark(); }
/** * This function is called after everything else has been * recomposed, and allows the template to set remaining * values that may be based on some other property that * depends on recomposition. */ public void compose(StylesheetRoot sroot) throws TransformerException { resolvePrefixTables(); ElemTemplateElement t = getFirstChildElem(); m_hasTextLitOnly = ((t != null) && (t.getXSLToken() == Constants.ELEMNAME_TEXTLITERALRESULT) && (t.getNextSiblingElem() == null)); StylesheetRoot.ComposeState cstate = sroot.getComposeState(); cstate.pushStackMark(); }
child != null; child = child.getNextSiblingElem())
child != null; child = child.getNextSiblingElem())
ElemTemplateElement nextElem = elem.getFirstChildElem(); if (nextElem == null) nextElem = elem.getNextSiblingElem(); if (nextElem == null) nextElem = elem.getParentElem();
child = child.getNextSiblingElem())
childElem != null; childElem = childElem.getNextSiblingElem())
ete = ete.getNextSiblingElem(); if ((null != ete) && Constants.ELEMNAME_PARAMVARIABLE != ete.getXSLToken()) break;
ete = ete.getNextSiblingElem(); if ((null != ete) && Constants.ELEMNAME_PARAMVARIABLE != ete.getXSLToken()) break;
null != ete; ete = ete.getNextSiblingElem())
if (null != t && null == t.getNextSiblingElem())
null != ete; ete = ete.getNextSiblingElem())
if (null != t && null == t.getNextSiblingElem())
for (; t != null; t = t.getNextSiblingElem())