Package org.apache.jasper.parser

Examples of org.apache.jasper.parser.TreeNode


        Vector tagVector = new Vector();

        // Create an iterator over the child elements of our <taglib> element
        ClassLoader cl = ctxt.getClassLoader();
        ParserUtils pu = ParserUtils.createParserUtils(cl);
        TreeNode tld = pu.parseXMLDocument(uri, in);
        Iterator list = tld.findChildren();

        // Process each child element of our <taglib> element
        while (list.hasNext()) {

            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("tlibversion".equals(tname) ||          // JSP 1.1
                "tlib-version".equals(tname))           // JSP 1.2
                this.tlibversion = element.getBody();
            else if ("jspversion".equals(tname) ||
                     "jsp-version".equals(tname))
                this.jspversion = element.getBody();
            else if ("shortname".equals(tname) ||
                     "short-name".equals(tname))
                this.shortname = element.getBody();
            else if ("uri".equals(tname))
                this.urn = element.getBody();
            else if ("info".equals(tname) ||
                     "description".equals(tname))
                this.info = element.getBody();
            else if ("validator".equals(tname))
                this.tagLibraryValidator = createValidator(element);
            else if ("tag".equals(tname))
                tagVector.addElement(createTagInfo(element));
            else if ("display-name".equals(tname) ||    // Ignored elements
View Full Code Here


       
        Vector attributeVector = new Vector();
        Vector variableVector = new Vector();
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("name".equals(tname))
                name = element.getBody();
            else if ("tagclass".equals(tname) ||
                     "tag-class".equals(tname))
                tagclass = element.getBody();
            else if ("teiclass".equals(tname) ||
                     "tei-class".equals(tname))
                teiclass = element.getBody();
            else if ("bodycontent".equals(tname) ||
                     "body-content".equals(tname))
                bodycontent = element.getBody();
            else if ("display-name".equals(tname))
                displayName = element.getBody();
            else if ("small-icon".equals(tname))
                smallIcon = element.getBody();
            else if ("large-icon".equals(tname))
                largeIcon = element.getBody();
            else if ("info".equals(tname) ||
                     "description".equals(tname))
                info = element.getBody();
            else if ("variable".equals(tname)) {
                variableVector.addElement(createVariable(element));
            } else if ("attribute".equals(tname))
                attributeVector.addElement(createAttribute(element));
            else if ("example".equals(tname) ||   // Ignored elements
View Full Code Here

        boolean required = false, rtexprvalue = false, reqTime = false;
        String type = null;
       
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("name".equals(tname))
                name = element.getBody();
            else if ("required".equals(tname)) {
                String s = element.getBody();
                if (s != null)
                    required = JspUtil.booleanValue(s);
            } else if ("rtexprvalue".equals(tname)) {
                String s = element.getBody();
                if (s != null)
                    rtexprvalue = JspUtil.booleanValue(s);
            } else if ("type".equals(tname))
                type = element.getBody();
            else if ("description".equals(tname) ||    // Ignored elements
         false )
        ;
            else {
                Constants.message("jsp.warning.unknown.element.in.attribute",
View Full Code Here

  boolean declare = true;
  int scope = VariableInfo.NESTED;
       
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();
            if ("name-given".equals(tname))
                nameGiven = element.getBody();
            else if ("name-from-attribute".equals(tname))
                nameFromAttribute = element.getBody();
            else if ("variable-class".equals(tname))
                className = element.getBody();
            else if ("declare".equals(tname)) {
                String s = element.getBody();
                if (s != null)
                    declare = JspUtil.booleanValue(s);
            } else if ("scope".equals(tname)) {
                String s = element.getBody();
                if (s != null) {
        if ("NESTED".equals(s)) {
      scope = VariableInfo.NESTED;
        } else if ("AT_BEGIN".equals(s)) {
      scope = VariableInfo.AT_BEGIN;
View Full Code Here

        String validatorClass = null;
  Map initParams = new Hashtable();

        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();
            if ("validator-class".equals(tname))
                validatorClass = element.getBody();
            else if ("init-param".equals(tname)) {
    String[] initParam = createInitParam(element);
    initParams.put(initParam[0], initParam[1]);
            } else if ("description".equals(tname) ||    // Ignored elements
         false ) {
View Full Code Here

    String[] createInitParam(TreeNode elem) {
        String[] initParam = new String[2];
       
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();
            if ("param-name".equals(tname))
                initParam[0] = element.getBody();
            else if ("param-value".equals(tname))
                initParam[1] = element.getBody();
            else if ("description".equals(tname))
                ; // Do nothing
            else {
                Constants.message("jsp.warning.unknown.element.in.initParam", //@@@ properties
                                  new Object[] {tname},
View Full Code Here

       
        Vector attributeVector = new Vector();
        Vector variableVector = new Vector();
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("name".equals(tname))
                name = element.getBody();
            else if ("tagclass".equals(tname) ||
                     "tag-class".equals(tname))
                tagclass = element.getBody();
            else if ("teiclass".equals(tname) ||
                     "tei-class".equals(tname))
                teiclass = element.getBody();
            else if ("bodycontent".equals(tname) ||
                     "body-content".equals(tname))
                bodycontent = element.getBody();
            else if ("display-name".equals(tname))
                displayName = element.getBody();
            else if ("small-icon".equals(tname))
                smallIcon = element.getBody();
            else if ("large-icon".equals(tname))
                largeIcon = element.getBody();
            else if ("info".equals(tname) ||
                     "description".equals(tname))
                info = element.getBody();
            else if ("variable".equals(tname)) {
                variableVector.addElement(createVariable(element));
            } else if ("attribute".equals(tname))
                attributeVector.addElement(createAttribute(element));
            else if ("example".equals(tname) ||   // Ignored elements
View Full Code Here

        boolean required = false, rtexprvalue = false, reqTime = false;
        String type = null;
       
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();

            if ("name".equals(tname))
                name = element.getBody();
            else if ("required".equals(tname)) {
                String s = element.getBody();
                if (s != null)
                    required = JspUtil.booleanValue(s);
            } else if ("rtexprvalue".equals(tname)) {
                String s = element.getBody();
                if (s != null)
                    rtexprvalue = JspUtil.booleanValue(s);
            } else if ("type".equals(tname))
                type = element.getBody();
            else if ("description".equals(tname) ||    // Ignored elements
         false )
        ;
            else {
                Constants.message("jsp.warning.unknown.element.in.attribute",
View Full Code Here

  boolean declare = true;
  int scope = VariableInfo.NESTED;
       
        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();
            if ("name-given".equals(tname))
                nameGiven = element.getBody();
            else if ("name-from-attribute".equals(tname))
                nameFromAttribute = element.getBody();
            else if ("variable-class".equals(tname))
                className = element.getBody();
            else if ("declare".equals(tname)) {
                String s = element.getBody();
                if (s != null)
                    declare = JspUtil.booleanValue(s);
            } else if ("scope".equals(tname)) {
                String s = element.getBody();
                if (s != null) {
        if ("NESTED".equals(s)) {
      scope = VariableInfo.NESTED;
        } else if ("AT_BEGIN".equals(s)) {
      scope = VariableInfo.AT_BEGIN;
View Full Code Here

        String validatorClass = null;
  Map initParams = new Hashtable();

        Iterator list = elem.findChildren();
        while (list.hasNext()) {
            TreeNode element = (TreeNode) list.next();
            String tname = element.getName();
            if ("validator-class".equals(tname))
                validatorClass = element.getBody();
            else if ("init-param".equals(tname)) {
    String[] initParam = createInitParam(element);
    initParams.put(initParam[0], initParam[1]);
            } else if ("description".equals(tname) ||    // Ignored elements
         false ) {
View Full Code Here

TOP

Related Classes of org.apache.jasper.parser.TreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.