org.apache.xerces.xni.NamespaceContext Java Examples

The following examples show how to use org.apache.xerces.xni.NamespaceContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XMLModelHandler.java    From lemminx with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext,
		Augmentations augs) throws XNIException {
	this.locator = locator;
	if (xmlModelValidators != null) {
		for (XMLModelValidator validator : xmlModelValidators) {
			validator.startDocument(locator, encoding, namespaceContext, augs);
		}
	}

	if (documentHandler != null) {
		documentHandler.startDocument(locator, encoding, namespaceContext, augs);
	}
}
 
Example #2
Source File: HTMLSAXParser.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void startDocument(XMLLocator arg0,
                          String arg1,
                          NamespaceContext arg2,
                          Augmentations arg3) throws XNIException {
    super.startDocument(arg0, arg1, arg2, arg3);
    buffer = new StringBuffer();
}
 
Example #3
Source File: HTMLTagBalancer.java    From cc-dbp with Apache License 2.0 5 votes vote down vote up
/** Start document. */
public void startDocument(XMLLocator locator, String encoding, 
                          NamespaceContext nscontext, Augmentations augs) 
    throws XNIException {

    // reset state
    fElementStack.top = 0;
    if (fragmentContextStack_ != null) {
    	fragmentContextStackSize_ = fragmentContextStack_.length;
    	for (int i=0; i<fragmentContextStack_.length; ++i) {
    		final QName name = fragmentContextStack_[i];
        	final Element elt = HTMLElements.getElement(name.localpart);
        	fElementStack.push(new Info(elt, name));
    	}
    	
    }
    else {
    	fragmentContextStackSize_ = 0;
    }
    fSeenAnything = false;
    fSeenDoctype = false;
    fSeenRootElement = false;
    fSeenRootElementEnd = false;
    fSeenHeadElement = false;
    fSeenBodyElement = false;
    

    // pass on event
    if (fDocumentHandler != null) {
    	XercesBridge.getInstance().XMLDocumentHandler_startDocument(fDocumentHandler, locator, encoding, nscontext, augs);
    }

}
 
Example #4
Source File: NekoHtmlDocumentHandler.java    From gate-core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void startDocument(XMLLocator arg0, String arg1,
        NamespaceContext arg2, Augmentations arg3) throws XNIException {
  if(DEBUG_UNUSED) {
    Out.println("startDocument");
  }
}
 
Example #5
Source File: LSPSAXParser.java    From lemminx with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void startDocument(XMLLocator locator, String encoding, NamespaceContext namespaceContext,
		Augmentations augs) throws XNIException {
	this.locator = locator;
	super.startDocument(locator, encoding, namespaceContext, augs);
}