gpt4 book ai didi

org.apache.xerces.xni.parser.XMLDocumentSource类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 12:47:40 61 4
gpt4 key购买 nike

本文整理了Java中org.apache.xerces.xni.parser.XMLDocumentSource类的一些代码示例,展示了XMLDocumentSource类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLDocumentSource类的具体详情如下:
包路径:org.apache.xerces.xni.parser.XMLDocumentSource
类名称:XMLDocumentSource

XMLDocumentSource介绍

[英]Defines a document source. In other words, any object that implements this interface is able to emit document "events" to the registered document handler. These events could be produced by parsing an XML document, could be generated from some other source, or could be created programmatically. This interface does not say how the events are created, only that the implementor is able to emit them.
[中]定义文档源。换句话说,实现该接口的任何对象都能够向注册的文档处理程序发送文档“事件”。这些事件可以通过解析XML文档生成,也可以从其他源生成,或者可以通过编程方式创建。这个接口没有说明事件是如何创建的,只是说明实现者能够发出它们。

代码示例

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Sets the document handler on the last component in the pipeline
 * to receive information about the document.
 * 
 * @param documentHandler   The document handler.
 */
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
  fDocumentHandler = documentHandler;
  if (fLastComponent != null) {
    fLastComponent.setDocumentHandler(fDocumentHandler);
    if (fDocumentHandler !=null){
      fDocumentHandler.setDocumentSource(fLastComponent);
    }
  }
} // setDocumentHandler(XMLDocumentHandler)

代码示例来源:origin: dita-ot/dita-ot

/**
 * Insert the Relax NG defaults component
 */
protected void insertRelaxDefaultsComponent() {
 if (fRelaxDefaults == null) {
  fRelaxDefaults = new RelaxNGDefaultsComponent(resolver);
  addCommonComponent(fRelaxDefaults);
  fRelaxDefaults.reset(this);
 }
 XMLDocumentSource prev = fLastComponent;
 fLastComponent = fRelaxDefaults;
  
 XMLDocumentHandler next = prev.getDocumentHandler();
 prev.setDocumentHandler(fRelaxDefaults);
 fRelaxDefaults.setDocumentSource(prev);
 if (next != null) {
   fRelaxDefaults.setDocumentHandler(next);
   next.setDocumentSource(fRelaxDefaults);
 }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Sets the document handler on the last component in the pipeline
 * to receive information about the document.
 * 
 * @param documentHandler   The document handler.
 */
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
  fDocumentHandler = documentHandler;
  if (fLastComponent != null) {
    fLastComponent.setDocumentHandler(fDocumentHandler);
    if (fDocumentHandler !=null){
      fDocumentHandler.setDocumentSource(fLastComponent);
    }
  }
} // setDocumentHandler(XMLDocumentHandler)

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Sets the document handler on the last component in the pipeline
 * to receive information about the document.
 * 
 * @param documentHandler   The document handler.
 */
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
  fDocumentHandler = documentHandler;
  if (fLastComponent != null) {
    fLastComponent.setDocumentHandler(fDocumentHandler);
    if (fDocumentHandler !=null){
      fDocumentHandler.setDocumentSource(fLastComponent);
    }
  }
} // setDocumentHandler(XMLDocumentHandler)

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
 * Sets the document handler on the last component in the pipeline
 * to receive information about the document.
 * 
 * @param documentHandler   The document handler.
 */
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
  fDocumentHandler = documentHandler;
  if (fLastComponent != null) {
    fLastComponent.setDocumentHandler(fDocumentHandler);
    if (fDocumentHandler !=null){
      fDocumentHandler.setDocumentSource(fLastComponent);
    }
  }
} // setDocumentHandler(XMLDocumentHandler)

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);

代码示例来源:origin: net.sourceforge.htmlunit/neko-htmlunit

/** Resets the parser configuration. */
protected void reset() throws XMLConfigurationException {
  // reset components
  final int size = fHTMLComponents.size();
  for (int i = 0; i < size; i++) {
    final HTMLComponent component = fHTMLComponents.get(i);
    component.reset(this);
  }
  // configure pipeline
  XMLDocumentSource lastSource = fDocumentScanner;
  if (getFeature(NAMESPACES)) {
    lastSource.setDocumentHandler(fNamespaceBinder);
    fNamespaceBinder.setDocumentSource(fTagBalancer);
    lastSource = fNamespaceBinder;
  }
  if (getFeature(BALANCE_TAGS)) {
    lastSource.setDocumentHandler(fTagBalancer);
    fTagBalancer.setDocumentSource(fDocumentScanner);
    lastSource = fTagBalancer;
  }
  final XMLDocumentFilter[] filters = (XMLDocumentFilter[])getProperty(FILTERS);
  if (filters != null) {
    for (final XMLDocumentFilter filter : filters) {
      filter.setDocumentSource(lastSource);
      lastSource.setDocumentHandler(filter);
      lastSource = filter;
    }
  }
  lastSource.setDocumentHandler(fDocumentHandler);
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);

代码示例来源:origin: net.sourceforge.nekohtml/nekohtml

lastSource.setDocumentHandler(fNamespaceBinder);
  fNamespaceBinder.setDocumentSource(fTagBalancer);
  lastSource = fNamespaceBinder;
  lastSource.setDocumentHandler(fTagBalancer);
  fTagBalancer.setDocumentSource(fDocumentScanner);
  lastSource = fTagBalancer;
    XMLDocumentFilter filter = filters[i];
    XercesBridge.getInstance().XMLDocumentFilter_setDocumentSource(filter, lastSource);
    lastSource.setDocumentHandler(filter);
    lastSource = filter;
lastSource.setDocumentHandler(fDocumentHandler);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {

代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils

lastSource.setDocumentHandler(fNamespaceBinder);
  fNamespaceBinder.setDocumentSource(fTagBalancer);
  lastSource = fNamespaceBinder;
  lastSource.setDocumentHandler(fTagBalancer);
  fTagBalancer.setDocumentSource(fDocumentScanner);
  lastSource = fTagBalancer;
    XMLDocumentFilter filter = filters[i];
    XercesBridge.getInstance().XMLDocumentFilter_setDocumentSource(filter, lastSource);
    lastSource.setDocumentHandler(filter);
    lastSource = filter;
lastSource.setDocumentHandler(fDocumentHandler);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {

代码示例来源:origin: gwt-test-utils/gwt-test-utils

lastSource.setDocumentHandler(fNamespaceBinder);
  fNamespaceBinder.setDocumentSource(fTagBalancer);
  lastSource = fNamespaceBinder;
  lastSource.setDocumentHandler(fTagBalancer);
  fTagBalancer.setDocumentSource(fDocumentScanner);
  lastSource = fTagBalancer;
    XMLDocumentFilter filter = filters[i];
    XercesBridge.getInstance().XMLDocumentFilter_setDocumentSource(filter, lastSource);
    lastSource.setDocumentHandler(filter);
    lastSource = filter;
lastSource.setDocumentHandler(fDocumentHandler);

代码示例来源:origin: net.sourceforge.nekohtml/com.springsource.org.cyberneko.html

lastSource.setDocumentHandler(fNamespaceBinder);
  fNamespaceBinder.setDocumentSource(fTagBalancer);
  lastSource = fNamespaceBinder;
  lastSource.setDocumentHandler(fTagBalancer);
  fTagBalancer.setDocumentSource(fDocumentScanner);
  lastSource = fTagBalancer;
    XMLDocumentFilter filter = filters[i];
    XercesBridge.getInstance().XMLDocumentFilter_setDocumentSource(filter, lastSource);
    lastSource.setDocumentHandler(filter);
    lastSource = filter;
lastSource.setDocumentHandler(fDocumentHandler);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
   * Re-configures pipeline by removing the DTD validator 
   * if no DTD grammar exists. If no validator exists in the
   * pipeline or there is no DTD grammar, namespace binding
   * is performed by the scanner in the enclosing class.
   */
  private void reconfigurePipeline() {
    if (fDTDValidator == null) {
      fBindNamespaces = true;
    }
    else if (!fDTDValidator.hasGrammar()) {
      fBindNamespaces = true;
      fPerformValidation = fDTDValidator.validate();
      // re-configure pipeline
      XMLDocumentSource source = fDTDValidator.getDocumentSource();
      XMLDocumentHandler handler = fDTDValidator.getDocumentHandler();
      source.setDocumentHandler(handler);
      if (handler != null)
        handler.setDocumentSource(source);
      fDTDValidator.setDocumentSource(null);
      fDTDValidator.setDocumentHandler(null);
    }
  } // reconfigurePipeline()
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/**
   * Re-configures pipeline by removing the DTD validator 
   * if no DTD grammar exists. If no validator exists in the
   * pipeline or there is no DTD grammar, namespace binding
   * is performed by the scanner in the enclosing class.
   */
  private void reconfigurePipeline() {
    if (fDTDValidator == null) {
      fBindNamespaces = true;
    }
    else if (!fDTDValidator.hasGrammar()) {
      fBindNamespaces = true;
      fPerformValidation = fDTDValidator.validate();
      // re-configure pipeline
      XMLDocumentSource source = fDTDValidator.getDocumentSource();
      XMLDocumentHandler handler = fDTDValidator.getDocumentHandler();
      source.setDocumentHandler(handler);
      if (handler != null)
        handler.setDocumentSource(source);
      fDTDValidator.setDocumentSource(null);
      fDTDValidator.setDocumentHandler(null);
    }
  } // reconfigurePipeline()
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

fLastComponent.setDocumentHandler(fSchemaValidator);
fSchemaValidator.setDocumentSource(fLastComponent);
fSchemaValidator.setDocumentHandler(fDocumentHandler);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

fDocumentSource.setDocumentHandler(fDocumentHandler);
if (fDocumentHandler != null)
  fDocumentHandler.setDocumentSource(fDocumentSource);

61 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com