Package org.eclipse.jetty.xml

Examples of org.eclipse.jetty.xml.XmlParser$Node


    boolean status(final List<String> toks) {
        if (standaloneNodes.size() > 0) {
            out.println("Standalone Nodes:");
            for (String nodeName : standaloneNodes.keySet()) {
                Node node = standaloneNodes.get(nodeName);
                for (String curi : node.getInstalledContributions()) {
                    for (String dc : node.getDeployedComposites(curi)) {
                        out.println("   " + nodeName + " " + dc);
                    }
                }
            }
            out.println();
        }
        if (nodes.size() > 0) {
            for (Node node : nodes.values()) {
                out.println("Domain: " + node.getDomainName());
                List<String> ics;
                if (toks.size() > 1) {
                    ics = new ArrayList<String>();
                    ics.add(toks.get(1));
                } else {
                    ics = node.getInstalledContributions();
                }

                for (String curi : ics) {
                    Contribution c = node.getInstalledContribution(curi);
                    List<String> dcs = node.getDeployedComposites(curi);
                    if (toks.size() > 2) {
                        dcs = new ArrayList<String>();
                        dcs.add(toks.get(2));
                    } else {
                        dcs = node.getDeployedComposites(curi);
                    }
                    for (String compositeUri : dcs) {
                        for (Artifact a : c.getArtifacts()) {
                            if (compositeUri.equals(a.getURI())) {
                                out.println("   " + curi
View Full Code Here


   
    public XmlParser newParser()
    throws ClassNotFoundException
    {
        XmlParser xmlParser = new WebDescriptor(null).newParser();
       
        URL jsp21xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_1.xsd", true);
        redirect(xmlParser,"jsp_2_1.xsd",jsp21xsd);
       
        //set up cache of DTDs and schemas locally       
View Full Code Here

  }
 
  @Test
  public void testXml() throws Exception
  {
    XmlParser parser = getParser(true);
    try
    {
      parser.parse(getClass().getResource("/org/cipango/xml/sip.xml").toString());
      fail("expected SAXParseException");
    }
    catch (SAXParseException e)
    {
    }
   
    parser = getParser(false);
    parser.parse(getClass().getResource("/org/cipango/xml/sip.xml").toString());
  }
View Full Code Here

  }

  @Test
  public void testXmlDtd() throws Exception
  {
    XmlParser parser = getParser(true);
    parser.parse(getClass().getResource("/org/cipango/xml/sip-dtd.xml").toString());
  }
View Full Code Here

  @Test
  public void testXmlXsd() throws Exception
  {
    //System.out.println(WebAppContext.class.getResource("/javax/servlet/resources/javaee_5.xsd"));
    XmlParser parser = getParser(true);
    parser.parse(getClass().getResource("/org/cipango/xml/sip-xsd.xml").toString());
  }
View Full Code Here

  }

  @Test
  public void testWeb() throws Exception
  {
    XmlParser parser = getParser(true);
    parser.parse(getClass().getResource("/org/cipango/xml/web.xml").toString());
  }
View Full Code Here

            _parser = newParser(isValidating());
    }

    public static XmlParser newParser(boolean validating) throws ClassNotFoundException
    {
        XmlParser xmlParser=new XmlParser(validating)
        {
            boolean mapped=false;
           
            @Override
            protected InputSource resolveEntity(String pid, String sid)
View Full Code Here

        @Override
        public XmlParser newParser() throws ClassNotFoundException
        {
            // Create a TLD parser
            XmlParser parser = new XmlParser(false);

            URL taglib11=null;
            URL taglib12=null;
            URL taglib20=null;
            URL taglib21=null;

            try
            {
                Class<?> jsp_page = Loader.loadClass(WebXmlConfiguration.class,"javax.servlet.jsp.JspPage");
                taglib11=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd");
                taglib12=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd");
                taglib20=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd");
                taglib21=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd");
            }
            catch(Exception e)
            {
                LOG.ignore(e);
            }
            finally
            {
                if(taglib11==null)
                    taglib11=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd");
                if(taglib12==null)
                    taglib12=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd");
                if(taglib20==null)
                    taglib20=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd");
                if(taglib21==null)
                    taglib21=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd");
            }


            if(taglib11!=null)
            {
                redirect(parser, "web-jsptaglib_1_1.dtd",taglib11);
                redirect(parser, "web-jsptaglibrary_1_1.dtd",taglib11);
            }
            if(taglib12!=null)
            {
                redirect(parser, "web-jsptaglib_1_2.dtd",taglib12);
                redirect(parser, "web-jsptaglibrary_1_2.dtd",taglib12);
            }
            if(taglib20!=null)
            {
                redirect(parser, "web-jsptaglib_2_0.xsd",taglib20);
                redirect(parser, "web-jsptaglibrary_2_0.xsd",taglib20);
            }
            if(taglib21!=null)
            {
                redirect(parser, "web-jsptaglib_2_1.xsd",taglib21);
                redirect(parser, "web-jsptaglibrary_2_1.xsd",taglib21);
            }

            parser.setXpath("/taglib/listener/listener-class");
            return parser;
        }
View Full Code Here

    }

    public XmlParser newParser()
    throws ClassNotFoundException
    {
        XmlParser xmlParser=new XmlParser()
        {
            boolean mapped=false;
           
            @Override
            protected InputSource resolveEntity(String pid, String sid)
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OSMNode> wayNodes = new ArrayList<OSMNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        if (origNode != null) {
          wayNodes.add(nodeMap.get(origNode));
        }
      }
     
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.xml.XmlParser$Node

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.