Java源码示例:com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler
示例1
/**
* 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);
}
}
示例2
/**
* 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() {
//fDTDValidator will be null in Stax mode
if (fNamespaces && fDTDValidator == null) {
fBindNamespaces = true;
}
else if (fNamespaces && !fDTDValidator.hasGrammar() ) {
fBindNamespaces = true;
fPerformValidation = fDTDValidator.validate();
// re-configure pipeline by removing DTDValidator
XMLDocumentSource source = fDTDValidator.getDocumentSource();
XMLDocumentHandler handler = fDTDValidator.getDocumentHandler();
source.setDocumentHandler(handler);
if (handler != null)
handler.setDocumentSource(source);
fDTDValidator.setDocumentSource(null);
fDTDValidator.setDocumentHandler(null);
}
}
示例3
/**
* 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);
}
}
示例4
/**
* 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);
}
}
示例5
/**
* 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() {
//fDTDValidator will be null in Stax mode
if (fNamespaces && fDTDValidator == null) {
fBindNamespaces = true;
}
else if (fNamespaces && !fDTDValidator.hasGrammar() ) {
fBindNamespaces = true;
fPerformValidation = fDTDValidator.validate();
// re-configure pipeline by removing DTDValidator
XMLDocumentSource source = fDTDValidator.getDocumentSource();
XMLDocumentHandler handler = fDTDValidator.getDocumentHandler();
source.setDocumentHandler(handler);
if (handler != null)
handler.setDocumentSource(source);
fDTDValidator.setDocumentSource(null);
fDTDValidator.setDocumentHandler(null);
}
}
示例6
/** Sets the document handler to receive information about the document. */
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
fDocumentHandler = documentHandler;
// Init reportWhitespace for this handler
if (documentHandler instanceof XMLParser) {
try {
reportWhitespace =
((XMLParser) documentHandler).getFeature(REPORT_WHITESPACE);
}
catch (Exception e) {
reportWhitespace = false;
}
}
}
示例7
/**
* 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);
}
}
}
示例8
protected void configureXML11Pipeline() {
super.configureXML11Pipeline();
// configure XML 1.1. DTD pipeline
fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor);
fXML11DTDProcessor.setDTDSource(fXML11DTDScanner);
fXML11DTDProcessor.setDTDHandler(fXIncludeHandler);
fXIncludeHandler.setDTDSource(fXML11DTDProcessor);
fXIncludeHandler.setDTDHandler(fDTDHandler);
if (fDTDHandler != null) {
fDTDHandler.setDTDSource(fXIncludeHandler);
}
// configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
XMLDocumentSource prev = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
prev = fSchemaValidator.getDocumentSource();
}
// Otherwise, insert after the last component in the pipeline
else {
prev = fLastComponent;
fLastComponent = fXIncludeHandler;
}
XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {
fXIncludeHandler.setDocumentHandler(next);
next.setDocumentSource(fXIncludeHandler);
}
}
示例9
/**
* 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);
}
}
}
示例10
/**
* 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);
}
}
}
示例11
/** Sets the document handler to receive information about the document. */
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
fDocumentHandler = documentHandler;
// Init reportWhitespace for this handler
if (documentHandler instanceof XMLParser) {
try {
reportWhitespace =
((XMLParser) documentHandler).getFeature(REPORT_WHITESPACE);
}
catch (Exception e) {
reportWhitespace = false;
}
}
}
示例12
/**
* 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);
}
}
}
示例13
/**
* 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);
}
}
}
示例14
/**
* 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);
}
}
}
示例15
/**
* 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);
}
}
}
示例16
/**
* 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);
}
}
}
示例17
/** Sets the document handler. */
public void setDocumentHandler(XMLDocumentHandler handler);
示例18
/** Returns the document handler */
public XMLDocumentHandler getDocumentHandler();
示例19
/** Returns the registered document handler. */
public XMLDocumentHandler getDocumentHandler();
示例20
/** Configures the pipeline. */
protected void configurePipeline() {
super.configurePipeline();
//configure DTD pipeline
fDTDScanner.setDTDHandler(fDTDProcessor);
fDTDProcessor.setDTDSource(fDTDScanner);
fDTDProcessor.setDTDHandler(fXIncludeHandler);
fXIncludeHandler.setDTDSource(fDTDProcessor);
fXIncludeHandler.setDTDHandler(fDTDHandler);
if (fDTDHandler != null) {
fDTDHandler.setDTDSource(fXIncludeHandler);
}
// configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
XMLDocumentSource prev = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
prev = fSchemaValidator.getDocumentSource();
}
// Otherwise, insert after the last component in the pipeline
else {
prev = fLastComponent;
fLastComponent = fXIncludeHandler;
}
if (prev != null) {
XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {
fXIncludeHandler.setDocumentHandler(next);
next.setDocumentSource(fXIncludeHandler);
}
}
else {
setDocumentHandler(fXIncludeHandler);
}
}
示例21
/** Configures the pipeline. */
protected void configurePipeline() {
super.configurePipeline();
//configure DTD pipeline
fDTDScanner.setDTDHandler(fDTDProcessor);
fDTDProcessor.setDTDSource(fDTDScanner);
fDTDProcessor.setDTDHandler(fXIncludeHandler);
fXIncludeHandler.setDTDSource(fDTDProcessor);
fXIncludeHandler.setDTDHandler(fXPointerHandler);
fXPointerHandler.setDTDSource(fXIncludeHandler);
fXPointerHandler.setDTDHandler(fDTDHandler);
if (fDTDHandler != null) {
fDTDHandler.setDTDSource(fXPointerHandler);
}
// configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
XMLDocumentSource prev = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
// we don't have to worry about fSchemaValidator being null, since
// super.configurePipeline() instantiated it if the feature was set
prev = fSchemaValidator.getDocumentSource();
}
// Otherwise, insert after the last component in the pipeline
else {
prev = fLastComponent;
fLastComponent = fXPointerHandler;
}
XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
if (next != null) {
fXIncludeHandler.setDocumentHandler(next);
next.setDocumentSource(fXIncludeHandler);
}
fXIncludeHandler.setDocumentHandler(fXPointerHandler);
fXPointerHandler.setDocumentSource(fXIncludeHandler);
}
示例22
/** Returns the registered document handler. */
public XMLDocumentHandler getDocumentHandler() {
return fDocumentHandler;
}
示例23
/** Returns the document handler */
public XMLDocumentHandler getDocumentHandler() {
return fDocumentHandler;
}
示例24
/** Returns the registered document handler. */
public XMLDocumentHandler getDocumentHandler() {
return fDocumentHandler;
}
示例25
public void setDocumentHandler(XMLDocumentHandler handler) {
this.next = handler;
}
示例26
/** Returns the document handler */
public XMLDocumentHandler getDocumentHandler() {
return fDocumentHandler;
}
示例27
public void setDocumentHandler(XMLDocumentHandler handler) {
fCore = handler;
}
示例28
/** Returns the registered document handler. */
public XMLDocumentHandler getDocumentHandler() {
return fDocumentHandler;
}
示例29
/**
* Get the handler to which we should send events.
*/
private XMLDocumentHandler handler() {
return JAXPValidatorComponent.this.getDocumentHandler();
}
示例30
public XMLDocumentHandler getSide() {
return side;
}