Package org.w3c.dom

Examples of org.w3c.dom.DOMImplementation


  }

  private SVGContentImage getSVGImage(JFreeChart chart, ChartConfig config)
      throws SVGGraphics2DIOException {
    // Get a DOMImplementation
    DOMImplementation domImpl = GenericDOMImplementation
        .getDOMImplementation();
    // Create an instance of org.w3c.dom.Document
    String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
    org.w3c.dom.Document document = domImpl.createDocument(svgNS, "svg",
        null);
    // Create an instance of the SVG Generator
    SVGGraphics2D svgGenerator = new SVGGraphics2D(document);

    // Ask the chart to render into the SVG Graphics2D implementation
View Full Code Here


     * @param height pixel height of Graphics.
     * @return java.awt.Graphics object to use.
     */
    public Graphics getGraphics(int width, int height) {
        if (svgGenerator == null) {
            DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
            Document document = domImpl.createDocument(null, "svg", null);
            svgGenerator = new SVGGraphics2D(document);
            svgGenerator.setClip(0, 0, width, height);
        }
        return svgGenerator;
    }
View Full Code Here

        Document doc;
       
        try {
            DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
           
            DOMImplementation impl = builder.getDOMImplementation();
            DocumentType doctype = impl.createDocumentType("wms", "WMT_MS_Capabilities",
                    "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd");
            doc = impl.createDocument(null, "WMT_MS_Capabilities", doctype);
        } catch (javax.xml.parsers.ParserConfigurationException ex) {
            throw new RuntimeException("Cannot create new Xml Document:" + ex.getMessage());
        }
       
        Element root = doc.getDocumentElement();
View Full Code Here

    JFreeChart chart,
    ChartHyperlinkProvider chartHyperlinkProvider,
    Rectangle2D rectangle
    )
  {
    DOMImplementation domImpl =
      GenericDOMImplementation.getDOMImplementation();
    Document document =
      domImpl.createDocument(null, "svg", null);
    SVGGraphics2D grx =
      new SVGGraphics2D(document);
   
    grx.setSVGCanvasSize(rectangle.getBounds().getSize());
View Full Code Here

            serializeElement( (Element) node );
            break;
        }
        case Node.DOCUMENT_NODE : {
            DocumentType      docType;
            DOMImplementation domImpl;
            NamedNodeMap      map;
            Entity            entity;
            Notation          notation;
            int               i;
           
View Full Code Here

          // Level 2 solution. We might want to have an intermediate stage,
          // which would assume DOM Level 2 but not assume Xerces.
          //
          // (Shouldn't have to check whether impl is null in a compliant DOM,
          // but let's be paranoid for a moment...)
          DOMImplementation impl=doc.getImplementation();
          if(impl!=null && impl.hasFeature("Core","2.0"))
          {
                  parent=((Attr)node).getOwnerElement();
                  return parent;
          }
View Full Code Here

    private static Document getDummyDocument( ) {
        // we don't need synchronization here; even if two threads
        // enter this code at the same time, we just waste a little time
        if(d==null) {
            DOMImplementation dim = getParser().getDOMImplementation();
            d = dim.createDocument("http://java.sun.com/jaxp/xpath",
                "dummyroot", null);
        }
        return d;
    }
View Full Code Here

        try {
          builder = factory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
          throw new JRException(e);
        }   
          DOMImplementation impl = builder.getDOMImplementation();
         
          Set<String> nsSet = xmlNamespaceMap.keySet();
          Iterator<String> it = nsSet.iterator();
          String prefix = it.next();
          Document namespaceHolder = impl.createDocument(xmlNamespaceMap.get(prefix), prefix + ":namespaceMapping", null);
         
          namespaceElement = namespaceHolder.getDocumentElement();
          while (it.hasNext()) {
            prefix = it.next();
            namespaceElement.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" + prefix, xmlNamespaceMap.get(prefix));
View Full Code Here

     * Report the start of DTD declarations, if any.
     */
    public void startDTD(String name, String publicId, String systemId)
  throws SAXException
    {
        DOMImplementation impl = document.getImplementation();
        doctype = (Doctype)impl.createDocumentType(name, publicId, systemId);

        // Set the owner since DOM2 specifies this to be null
        doctype.setOwnerDocument(document);

        inDTD = true;
View Full Code Here

     
     
      ExportToImage exportToImageTest = new ExportToImage();
     
          // Get a DOMImplementation.
          DOMImplementation domImpl =
              GenericDOMImplementation.getDOMImplementation();

          // Create an instance of org.w3c.dom.Document.
          //String svgNS = "http://www.w3.org/2000/svg";
          String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;

          Document document = domImpl.createDocument(svgNS, "svg", null);
         
          // Get the root element (the 'svg' element).
          Element svgRoot = document.getDocumentElement();

         
View Full Code Here

TOP

Related Classes of org.w3c.dom.DOMImplementation

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.