001    package com.thaiopensource.datatype.xsd;
002    
003    import org.relaxng.datatype.ValidationContext;
004    
005    class EntityDatatype extends NCNameDatatype {
006      boolean allowsValue(String str, ValidationContext vc) {
007        return vc.isUnparsedEntity(str);
008      }
009    
010      Object getValue(String str, ValidationContext vc) {
011        if (!allowsValue(str, vc))
012          return null;
013        return super.getValue(str, vc);
014      }
015    }