/**
  * 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()
  protected void configureXML11Pipeline() {
    super.configureXML11Pipeline();

    // configure XML 1.1. DTD pipeline
    fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor);
    fXML11DTDProcessor.setDTDSource(fXML11DTDScanner);

    fDTDProcessor.setDTDHandler(fXIncludeHandler);
    fXIncludeHandler.setDTDSource(fXML11DTDProcessor);
    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);
  } // configureXML11Pipeline()
Ejemplo n.º 3
0
 public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
     throws XNIException {
   next.xmlDecl(version, encoding, standalone, augs);
 }
Ejemplo n.º 4
0
 public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
   next.ignorableWhitespace(text, augs);
 }
Ejemplo n.º 5
0
 public void startGeneralEntity(
     String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)
     throws XNIException {
   next.startGeneralEntity(name, identifier, encoding, augs);
 }
Ejemplo n.º 6
0
 public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
   next.textDecl(version, encoding, augs);
 }
Ejemplo n.º 7
0
 public void startDocument(
     XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs)
     throws XNIException {
   next.startDocument(locator, encoding, namespaceContext, augs);
 }
Ejemplo n.º 8
0
 public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
     throws XNIException {
   next.startElement(element, attributes, augs);
 }
Ejemplo n.º 9
0
 public void processingInstruction(String target, XMLString data, Augmentations augs)
     throws XNIException {
   next.processingInstruction(target, data, augs);
 }
Ejemplo n.º 10
0
 public void startCDATA(Augmentations augs) throws XNIException {
   next.startCDATA(augs);
 }
Ejemplo n.º 11
0
 public void endGeneralEntity(String name, Augmentations augs) throws XNIException {
   next.endGeneralEntity(name, augs);
 }
Ejemplo n.º 12
0
 public void characters(XMLString text, Augmentations augs) throws XNIException {
   next.characters(text, augs);
 }
Ejemplo n.º 13
0
 public void endElement(QName element, Augmentations augs) throws XNIException {
   next.endElement(element, augs);
 }
Ejemplo n.º 14
0
 public void endDocument(Augmentations augs) throws XNIException {
   next.endDocument(augs);
 }
Ejemplo n.º 15
0
 public void endCDATA(Augmentations augs) throws XNIException {
   next.endCDATA(augs);
 }
Ejemplo n.º 16
0
 public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
     throws XNIException {
   next.doctypeDecl(rootElement, publicId, systemId, augs);
 }
Ejemplo n.º 17
0
 public void comment(XMLString text, Augmentations augs) throws XNIException {
   next.comment(text, augs);
 }