Package org.relaxng.datatype

Examples of org.relaxng.datatype.DatatypeException


     */
    public UnionType( String nsUri, String newTypeName, XSDatatype[] memberTypes ) throws DatatypeException {
        super(nsUri,newTypeName);

        if(memberTypes.length==0)
            throw new DatatypeException(localize(ERR_EMPTY_UNION));
       
        XSDatatypeImpl[] m = new XSDatatypeImpl[memberTypes.length];
        System.arraycopy( memberTypes, 0, m, 0, memberTypes.length );
       
        for( int i=0; i<m.length; i++ )
            if( m[i].isFinal(DERIVATION_BY_UNION) )
                throw new DatatypeException(localize(
                    ERR_INVALID_MEMBER_TYPE, m[i].displayName() ));
       
        this.memberTypes = m;
    }
View Full Code Here


    }
   
    protected void _checkValid(String content, ValidationContext context) throws DatatypeException {
        // what is the appropriate implementation for union?
        if( checkFormat(content,context) )        return;
        else    throw new DatatypeException();
    }
View Full Code Here

TOP

Related Classes of org.relaxng.datatype.DatatypeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.