001    package com.thaiopensource.relaxng.impl;
002    
003    import org.relaxng.datatype.Datatype;
004    import org.relaxng.datatype.DatatypeBuilder;
005    import org.relaxng.datatype.DatatypeException;
006    import org.relaxng.datatype.ValidationContext;
007    
008    class BuiltinDatatypeBuilder implements DatatypeBuilder {
009      private final Datatype dt;
010    
011      BuiltinDatatypeBuilder(Datatype dt) {
012        this.dt = dt;
013      }
014    
015      public void addParameter(String name,
016                               String value,
017                               ValidationContext context) throws DatatypeException {
018        throw new DatatypeException(SchemaBuilderImpl.localizer.message("builtin_param"));
019      }
020    
021      public Datatype createDatatype() {
022        return dt;
023      }
024    }