Examples of DTDMonitor


Examples of org.apache.xalan.xsltc.dom.DTDMonitor

      _dom = new DOMImpl();
      _handler = _dom.getBuilder();
      _lexHandler = (LexicalHandler) _handler;

      // Create a new DTD monitor
      _dtd = new DTDMonitor();
  }
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

     * @param size The estimated node-count for this DOM. A good guess here
     * speeds up the DOM build process.
     */
    public XSLTCSource(int size) {
  _dom = new DOMImpl(size);
  _dtd = new DTDMonitor();
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

    /**
     * Create a new XSLTC-specific DOM source
     */
    public XSLTCSource() {
  _dom = new DOMImpl();
  _dtd = new DTDMonitor();
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

      catch (SAXException e) {
    // quitely ignored
      }
     
      // Create a DTD monitor and pass it to the XMLReader object
      final DTDMonitor dtdMonitor = new DTDMonitor(reader);
      AbstractTranslet _translet = (AbstractTranslet)translet;
      dom.setDocumentURI(_fileName);
      if (_uri)
    reader.parse(_fileName);
      else
    reader.parse(new File(_fileName).toURL().toExternalForm());

      builder = null;

      // If there are any elements with ID attributes, build an index
      dtdMonitor.buildIdIndex(dom, 0, _translet);
      // Pass unparsed entity descriptions to the translet
      _translet.setDTDMonitor(dtdMonitor);

      // Pass global parameters
      int n = _params.size();
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

     */
    public void unparsedEntityDecl(String name, String publicId,
           String systemId, String notationName)
  throws SAXException {
  // Create new contained for unparsed entities
  if (_dtd == null) _dtd = new DTDMonitor();
  _dtd.unparsedEntityDecl(name, publicId, systemId, notationName);
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

      // Set the DOM's DOM builder as the XMLReader's SAX2 content handler
      final DOMImpl dom = new DOMImpl();
      reader.setContentHandler(dom.getBuilder());
      // Create a DTD monitor and pass it to the XMLReader object
      final DTDMonitor dtdMonitor = new DTDMonitor();
      dtdMonitor.handleDTD(reader);

      _translet = (AbstractTranslet)translet;
      dom.setDocumentURI(_fileName);
      if (_uri)
    reader.parse(_fileName);
      else {
          reader.parse(new File(_fileName).toURL().toExternalForm());
      }
     
      // Set size of key/id indices
      _translet.setIndexSize(dom.getSize());
      // If there are any elements with ID attributes, build an index
      dtdMonitor.buildIdIndex(dom, 0, _translet);

      _translet.setDTDMonitor(dtdMonitor);

      // Pass global parameters
      int n = _params.size();
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

     
  }

  // Get the references to the actual DOM and DTD handler
  final DOMImpl    dom = doc.getDocument();
  final DTDMonitor dtd = doc.getDTDMonitor();

  // The dom reference may be null if the URL pointed to a
  // non-existing document
  if (dom == null) return null;

  doc.incAccessCount(); // For statistics

  final AbstractTranslet translet = (AbstractTranslet)trs;

  // Set minimum needed size for key/id indices in the translet
  translet.setIndexSize(dom.getSize());
  // Create index for any ID attributes defined in the document DTD
  dtd.buildIdIndex(dom, mask, translet);
  // Pass all unparsed entities to the translet
  translet.setUnparsedEntityURIs(dtd.getUnparsedEntityURIs());

  return(doc.getDocument());
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

   * Loads the document and updates build-time (latency) statistics
   */
  public void loadDocument(String uri) {

      _dom = new DOMImpl();
      _dtdMonitor = new DTDMonitor();

      try {
    final long stamp = System.currentTimeMillis();

    _reader.setContentHandler(_dom.getBuilder());
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

      _dom = new DOMImpl();
      _handler = _dom.getBuilder();
      _lexHandler = (LexicalHandler) _handler;

      // Create a new DTD monitor
      _dtd = new DTDMonitor();
  }
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.dom.DTDMonitor

      catch (SAXException e) {
    // quitely ignored
      }
     
      // Create a DTD monitor and pass it to the XMLReader object
      final DTDMonitor dtdMonitor = new DTDMonitor(reader);
      AbstractTranslet _translet = (AbstractTranslet)translet;
      dom.setDocumentURI(_fileName);
      if (_uri)
    reader.parse(_fileName);
      else
    reader.parse(new File(_fileName).toURL().toExternalForm());

      builder = null;

      // If there are any elements with ID attributes, build an index
      dtdMonitor.buildIdIndex(dom, 0, _translet);
      // Pass unparsed entity descriptions to the translet
      _translet.setDTDMonitor(dtdMonitor);

      // Pass global parameters
      int n = _params.size();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.