All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.msv.verifier.identity.Matcher Maven / Gradle / Ivy

There is a newer version: 2.2.5.1
Show newest version
/*
 * @(#)$Id: Matcher.java,v 1.4 2003/06/09 20:37:43 kk122374 Exp $
 *
 * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * This software is the proprietary information of Sun Microsystems, Inc.  
 * Use is subject to license terms.
 * 
 */
package com.sun.msv.verifier.identity;

import org.relaxng.datatype.Datatype;
import org.xml.sax.SAXException;

/**
 * Base abstract implementation of XPath matcher.
 * 
 * XPath mathcer tracks the startElement event and the endElement event.
 * The characters event is also used by some derived classes.
 * 
 * @author Kohsuke KAWAGUCHI
 */
public abstract class Matcher {
    
    protected final IDConstraintChecker owner;
    Matcher( IDConstraintChecker owner ) {
        this.owner = owner;
    }
    
    protected abstract void startElement( String namespaceURI, String localName ) throws SAXException;
    protected abstract void onAttribute( String namespaceURI, String localName, String value, Datatype type ) throws SAXException;
    protected abstract void endElement( Datatype type ) throws SAXException;
    
    protected void characters( char[] buf, int start, int len ) throws SAXException {
        // do nothing by default.
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy