Search in sources :

Example 6 with ElemExsltFunction

use of org.apache.xalan.templates.ElemExsltFunction in project robovm by robovm.

the class ProcessorExsltFunction method ancestorIsOk.

/**
   * Verify that a literal result belongs to a result element, a variable, 
   * or a parameter.
   */
boolean ancestorIsOk(ElemTemplateElement child) {
    while (child.getParentElem() != null && !(child.getParentElem() instanceof ElemExsltFunction)) {
        ElemTemplateElement parent = child.getParentElem();
        if (parent instanceof ElemExsltFuncResult || parent instanceof ElemVariable || parent instanceof ElemParam || parent instanceof ElemMessage)
            return true;
        child = parent;
    }
    return false;
}
Also used : ElemVariable(org.apache.xalan.templates.ElemVariable) ElemExsltFuncResult(org.apache.xalan.templates.ElemExsltFuncResult) ElemParam(org.apache.xalan.templates.ElemParam) ElemMessage(org.apache.xalan.templates.ElemMessage) ElemExsltFunction(org.apache.xalan.templates.ElemExsltFunction) ElemTemplateElement(org.apache.xalan.templates.ElemTemplateElement)

Aggregations

ElemExsltFuncResult (org.apache.xalan.templates.ElemExsltFuncResult)6 ElemExsltFunction (org.apache.xalan.templates.ElemExsltFunction)6 ElemTemplateElement (org.apache.xalan.templates.ElemTemplateElement)6 ElemParam (org.apache.xalan.templates.ElemParam)4 ElemVariable (org.apache.xalan.templates.ElemVariable)4 SAXException (org.xml.sax.SAXException)4 ElemApplyImport (org.apache.xalan.templates.ElemApplyImport)2 ElemApplyTemplates (org.apache.xalan.templates.ElemApplyTemplates)2 ElemAttribute (org.apache.xalan.templates.ElemAttribute)2 ElemCallTemplate (org.apache.xalan.templates.ElemCallTemplate)2 ElemComment (org.apache.xalan.templates.ElemComment)2 ElemCopy (org.apache.xalan.templates.ElemCopy)2 ElemCopyOf (org.apache.xalan.templates.ElemCopyOf)2 ElemElement (org.apache.xalan.templates.ElemElement)2 ElemFallback (org.apache.xalan.templates.ElemFallback)2 ElemLiteralResult (org.apache.xalan.templates.ElemLiteralResult)2 ElemMessage (org.apache.xalan.templates.ElemMessage)2 ElemNumber (org.apache.xalan.templates.ElemNumber)2 ElemPI (org.apache.xalan.templates.ElemPI)2 ElemText (org.apache.xalan.templates.ElemText)2