Package org.mortbay.xml

Examples of org.mortbay.xml.XmlParser$NoopHandler


            parent=true;
           
        }
       
        // Create a TLD parser
        XmlParser parser = new XmlParser(false);
        parser.redirectEntity("web-jsptaglib_1_1.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd", false));
        parser.redirectEntity("web-jsptaglib_1_2.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd", false));
        parser.redirectEntity("web-jsptaglib_2_0.xsd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd", false));
        parser.redirectEntity("web-jsptaglibrary_1_1.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd", false));
        parser.redirectEntity("web-jsptaglibrary_1_2.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd", false));
        parser.redirectEntity("web-jsptaglibrary_2_0.xsd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd", false));
        parser.setXpath("/taglib/listener/listener-class");
        // Parse all the discovered TLDs
        Iterator iter = tlds.iterator();
        while (iter.hasNext())
        {
            try
            {
                Resource tld = (Resource)iter.next();
                if (Log.isDebugEnabled()) Log.debug("TLD="+tld);
               
                XmlParser.Node root;
               
                try
                {
                    //xerces on apple appears to sometimes close the zip file instead
                    //of the inputstream, so try opening the input stream, but if
                    //that doesn't work, fallback to opening a new url
                    root = parser.parse(tld.getInputStream());
                }
                catch (Exception e)
                {
                    root = parser.parse(tld.getURL().toString());
                }

    if (root==null)
    {
        Log.warn("No TLD root in {}",tld);
View Full Code Here


            parent=true;
           
        }
       
        // Create a TLD parser
        XmlParser parser = new XmlParser(false);
        parser.redirectEntity("web-jsptaglib_1_1.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd", false));
        parser.redirectEntity("web-jsptaglib_1_2.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd", false));
        parser.redirectEntity("web-jsptaglib_2_0.xsd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd", false));
        parser.redirectEntity("web-jsptaglibrary_1_1.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd", false));
        parser.redirectEntity("web-jsptaglibrary_1_2.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd", false));
        parser.redirectEntity("web-jsptaglibrary_2_0.xsd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd", false));
        parser.setXpath("/taglib/listener/listener-class");
        // Parse all the discovered TLDs
        Iterator iter = tlds.iterator();
        while (iter.hasNext())
        {
            try
            {
                Resource tld = (Resource)iter.next();
                if (Log.isDebugEnabled()) Log.debug("TLD="+tld);
               
                XmlParser.Node root;
               
                try
                {
                    //xerces on apple appears to sometimes close the zip file instead
                    //of the inputstream, so try opening the input stream, but if
                    //that doesn't work, fallback to opening a new url
                    root = parser.parse(tld.getInputStream());
                }
                catch (Exception e)
                {
                    root = parser.parse(tld.getURL().toString());
                }

    if (root==null)
    {
        Log.warn("No TLD root in {}",tld);
View Full Code Here

        _xmlParser=webXmlParser();
    }

    public static XmlParser webXmlParser()
    {
        XmlParser xmlParser=new XmlParser();
        //set up cache of DTDs and schemas locally
        URL dtd22=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_2.dtd");
        URL dtd23=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_3.dtd");
        URL jsp20xsd=WebAppContext.class.getResource("/javax/servlet/resources/jsp_2_0.xsd");
        URL jsp21xsd=WebAppContext.class.getResource("/javax/servlet/resources/jsp_2_1.xsd");
        URL j2ee14xsd=WebAppContext.class.getResource("/javax/servlet/resources/j2ee_1_4.xsd");
        URL webapp24xsd=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_4.xsd");
        URL webapp25xsd=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_5.xsd");
        URL schemadtd=WebAppContext.class.getResource("/javax/servlet/resources/XMLSchema.dtd");
        URL xmlxsd=WebAppContext.class.getResource("/javax/servlet/resources/xml.xsd");
        URL webservice11xsd=WebAppContext.class.getResource("/javax/servlet/resources/j2ee_web_services_client_1_1.xsd");
        URL webservice12xsd=WebAppContext.class.getResource("/javax/servlet/resources/javaee_web_services_client_1_2.xsd");
        URL datatypesdtd=WebAppContext.class.getResource("/javax/servlet/resources/datatypes.dtd");
        xmlParser.redirectEntity("web-app_2_2.dtd",dtd22);
        xmlParser.redirectEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",dtd22);
        xmlParser.redirectEntity("web.dtd",dtd23);
        xmlParser.redirectEntity("web-app_2_3.dtd",dtd23);
        xmlParser.redirectEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",dtd23);
        xmlParser.redirectEntity("XMLSchema.dtd",schemadtd);
        xmlParser.redirectEntity("http://www.w3.org/2001/XMLSchema.dtd",schemadtd);
        xmlParser.redirectEntity("-//W3C//DTD XMLSCHEMA 200102//EN",schemadtd);
        xmlParser.redirectEntity("jsp_2_0.xsd",jsp20xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd",jsp20xsd);
        xmlParser.redirectEntity("jsp_2_1.xsd",jsp21xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/javaee/jsp_2_1.xsd",jsp21xsd);
        xmlParser.redirectEntity("j2ee_1_4.xsd",j2ee14xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd",j2ee14xsd);
        xmlParser.redirectEntity("web-app_2_4.xsd",webapp24xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd",webapp24xsd);
        xmlParser.redirectEntity("web-app_2_5.xsd",webapp25xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd",webapp25xsd);
        xmlParser.redirectEntity("xml.xsd",xmlxsd);
        xmlParser.redirectEntity("http://www.w3.org/2001/xml.xsd",xmlxsd);
        xmlParser.redirectEntity("datatypes.dtd",datatypesdtd);
        xmlParser.redirectEntity("http://www.w3.org/2001/datatypes.dtd",datatypesdtd);
        xmlParser.redirectEntity("j2ee_web_services_client_1_1.xsd",webservice11xsd);
        xmlParser.redirectEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd",webservice11xsd);
        xmlParser.redirectEntity("javaee_web_services_client_1_2.xsd",webservice12xsd);
        xmlParser.redirectEntity("http://www.ibm.com/webservices/xsd/javaee_web_services_client_1_2.xsd",webservice12xsd);

        return xmlParser;
    }
View Full Code Here

            parent=true;
           
        }
       
        // Create a TLD parser
        XmlParser parser = new XmlParser(false);
        parser.redirectEntity("web-jsptaglib_1_1.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd", false));
        parser.redirectEntity("web-jsptaglib_1_2.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd", false));
        parser.redirectEntity("web-jsptaglib_2_0.xsd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd", false));
        parser.redirectEntity("web-jsptaglibrary_1_1.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd", false));
        parser.redirectEntity("web-jsptaglibrary_1_2.dtd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd", false));
        parser.redirectEntity("web-jsptaglibrary_2_0.xsd",Loader.getResource(TagLibConfiguration.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd", false));
        parser.setXpath("/taglib/listener/listener-class");
        // Parse all the discovered TLDs
        Iterator iter = tlds.iterator();
        while (iter.hasNext())
        {
            try
            {
                Resource tld = (Resource)iter.next();
                if (Log.isDebugEnabled()) Log.debug("TLD="+tld);
               
                XmlParser.Node root;
               
                try
                {
                    //xerces on apple appears to sometimes close the zip file instead
                    //of the inputstream, so try opening the input stream, but if
                    //that doesn't work, fallback to opening a new url
                    root = parser.parse(tld.getInputStream());
                }
                catch (Exception e)
                {
                    root = parser.parse(tld.getURL().toString());
                }

    if (root==null)
    {
        Log.warn("No TLD root in {}",tld);
View Full Code Here

        _xmlParser=webXmlParser();
    }

    public static XmlParser webXmlParser()
    {
        XmlParser xmlParser=new XmlParser();
        //set up cache of DTDs and schemas locally
        URL dtd22=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_2.dtd");
        URL dtd23=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_3.dtd");
        URL jsp20xsd=WebAppContext.class.getResource("/javax/servlet/resources/jsp_2_0.xsd");
        URL jsp21xsd=WebAppContext.class.getResource("/javax/servlet/resources/jsp_2_1.xsd");
        URL j2ee14xsd=WebAppContext.class.getResource("/javax/servlet/resources/j2ee_1_4.xsd");
        URL webapp24xsd=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_4.xsd");
        URL webapp25xsd=WebAppContext.class.getResource("/javax/servlet/resources/web-app_2_5.xsd");
        URL schemadtd=WebAppContext.class.getResource("/javax/servlet/resources/XMLSchema.dtd");
        URL xmlxsd=WebAppContext.class.getResource("/javax/servlet/resources/xml.xsd");
        URL webservice11xsd=WebAppContext.class.getResource("/javax/servlet/resources/j2ee_web_services_client_1_1.xsd");
        URL webservice12xsd=WebAppContext.class.getResource("/javax/servlet/resources/javaee_web_services_client_1_2.xsd");
        URL datatypesdtd=WebAppContext.class.getResource("/javax/servlet/resources/datatypes.dtd");
        xmlParser.redirectEntity("web-app_2_2.dtd",dtd22);
        xmlParser.redirectEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",dtd22);
        xmlParser.redirectEntity("web.dtd",dtd23);
        xmlParser.redirectEntity("web-app_2_3.dtd",dtd23);
        xmlParser.redirectEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",dtd23);
        xmlParser.redirectEntity("XMLSchema.dtd",schemadtd);
        xmlParser.redirectEntity("http://www.w3.org/2001/XMLSchema.dtd",schemadtd);
        xmlParser.redirectEntity("-//W3C//DTD XMLSCHEMA 200102//EN",schemadtd);
        xmlParser.redirectEntity("jsp_2_0.xsd",jsp20xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd",jsp20xsd);
        xmlParser.redirectEntity("jsp_2_1.xsd",jsp21xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/javaee/jsp_2_1.xsd",jsp21xsd);
        xmlParser.redirectEntity("j2ee_1_4.xsd",j2ee14xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd",j2ee14xsd);
        xmlParser.redirectEntity("web-app_2_4.xsd",webapp24xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd",webapp24xsd);
        xmlParser.redirectEntity("web-app_2_5.xsd",webapp25xsd);
        xmlParser.redirectEntity("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd",webapp25xsd);
        xmlParser.redirectEntity("xml.xsd",xmlxsd);
        xmlParser.redirectEntity("http://www.w3.org/2001/xml.xsd",xmlxsd);
        xmlParser.redirectEntity("datatypes.dtd",datatypesdtd);
        xmlParser.redirectEntity("http://www.w3.org/2001/datatypes.dtd",datatypesdtd);
        xmlParser.redirectEntity("j2ee_web_services_client_1_1.xsd",webservice11xsd);
        xmlParser.redirectEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd",webservice11xsd);
        xmlParser.redirectEntity("javaee_web_services_client_1_2.xsd",webservice12xsd);
        xmlParser.redirectEntity("http://www.ibm.com/webservices/xsd/javaee_web_services_client_1_2.xsd",webservice12xsd);

        return xmlParser;
    }
View Full Code Here

   * element.
   *
   * @throws AppEngineConfigException If the input stream cannot be parsed.
   */
  XmlParser.Node getTopLevelNode(InputStream is) {
    XmlParser xmlParser = new XmlParser();
    try {
      return xmlParser.parse(is);
    } catch (IOException e) {
      String msg = "Received IOException parsing the input stream.";
      logger.log(Level.SEVERE, msg, e);
      throw new AppEngineConfigException(msg, e);
    } catch (SAXException e) {
View Full Code Here

   * Parses the input stream and returns the {@link Node} for the root element.
   *
   * @throws AppEngineConfigException If the input stream cannot be parsed.
   */
  static Node parse(InputStream is) {
    XmlParser xmlParser = new XmlParser();
    try {
      return xmlParser.parse(is);
    } catch (IOException e) {
      String msg = "Received IOException parsing the input stream.";
      logger.log(Level.SEVERE, msg, e);
      throw new AppEngineConfigException(msg, e);
    } catch (SAXException e) {
View Full Code Here

   * URL retrieval at parse time.
   */
  @Override
  protected XmlParser createXmlParser() {

    XmlParser xmlParser = new XmlParser();
    URL dtd22 = getClass().getResource("/javax/servlet/resources/web-app_2_2.dtd");
    URL dtd23 = getClass().getResource("/javax/servlet/resources/web-app_2_3.dtd");
    URL jsp20xsd = getClass().getResource("/javax/servlet/resources/jsp_2_0.xsd");
    URL jsp21xsd = getClass().getResource("/javax/servlet/resources/jsp_2_1.xsd");
    URL j2ee14xsd = getClass().getResource("/javax/servlet/resources/j2ee_1_4.xsd");
    URL webapp24xsd = getClass().getResource("/javax/servlet/resources/web-app_2_4.xsd");
    URL webapp25xsd = getClass().getResource("/javax/servlet/resources/web-app_2_5.xsd");
    URL schemadtd = getClass().getResource("/javax/servlet/resources/XMLSchema.dtd");
    URL xmlxsd = getClass().getResource("/javax/servlet/resources/xml.xsd");
    URL webservice11xsd =
        getClass().getResource("/javax/servlet/resources/j2ee_web_services_client_1_1.xsd");
    URL webservice12xsd =
        getClass().getResource("/javax/servlet/resources/javaee_web_services_client_1_2.xsd");
    URL datatypesdtd = getClass().getResource("/javax/servlet/resources/datatypes.dtd");
    xmlParser.redirectEntity("web-app_2_2.dtd",dtd22);
    xmlParser.redirectEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",dtd22);
    xmlParser.redirectEntity("web.dtd",dtd23);
    xmlParser.redirectEntity("web-app_2_3.dtd",dtd23);
    xmlParser.redirectEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",dtd23);
    xmlParser.redirectEntity("XMLSchema.dtd",schemadtd);
    xmlParser.redirectEntity("http://www.w3.org/2001/XMLSchema.dtd",schemadtd);
    xmlParser.redirectEntity("-//W3C//DTD XMLSCHEMA 200102//EN",schemadtd);
    xmlParser.redirectEntity("jsp_2_0.xsd",jsp20xsd);
    xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd",jsp20xsd);
    xmlParser.redirectEntity("jsp_2_1.xsd",jsp21xsd);
    xmlParser.redirectEntity("http://java.sun.com/xml/ns/javaee/jsp_2_1.xsd",jsp21xsd);
    xmlParser.redirectEntity("j2ee_1_4.xsd",j2ee14xsd);
    xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd",j2ee14xsd);
    xmlParser.redirectEntity("web-app_2_4.xsd",webapp24xsd);
    xmlParser.redirectEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd",webapp24xsd);
    xmlParser.redirectEntity("web-app_2_5.xsd",webapp25xsd);
    xmlParser.redirectEntity("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd",webapp25xsd);
    xmlParser.redirectEntity("xml.xsd",xmlxsd);
    xmlParser.redirectEntity("http://www.w3.org/2001/xml.xsd",xmlxsd);
    xmlParser.redirectEntity("datatypes.dtd",datatypesdtd);
    xmlParser.redirectEntity("http://www.w3.org/2001/datatypes.dtd",datatypesdtd);
    xmlParser.redirectEntity("j2ee_web_services_client_1_1.xsd",webservice11xsd);
    xmlParser.redirectEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd",
                             webservice11xsd);
    xmlParser.redirectEntity("javaee_web_services_client_1_2.xsd",webservice12xsd);
    xmlParser.redirectEntity("http://www.ibm.com/webservices/xsd/javaee_web_services_client_1_2.xsd",
                             webservice12xsd);

    return xmlParser;
  }
View Full Code Here

  /**
   * Creates an {@link XmlParser} to use when parsing this file.
   */
  protected XmlParser createXmlParser() {
    return new XmlParser();
  }
View Full Code Here

   * element.
   *
   * @throws AppEngineConfigException If the input stream cannot be parsed.
   */
  protected XmlParser.Node getTopLevelNode(InputStream is) {
    XmlParser xmlParser = createXmlParser();
    try {
      return xmlParser.parse(is);
    } catch (IOException e) {
      String msg = "Received IOException parsing the input stream for " + getFilename();
      logger.log(Level.SEVERE, msg, e);
      throw new AppEngineConfigException(msg, e);
    } catch (SAXException e) {
View Full Code Here

TOP

Related Classes of org.mortbay.xml.XmlParser$NoopHandler

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.