XMLBean t = def.get_type(ctx);
if (t instanceof simpleType) {
// an empty, as opposed to nil, element is null
if (value==null) value = "";
if (is_nillable() && elem.hasAttributeNS(schema.XSI,"nil") && elem.getAttributeNS(schema.XSI,"nil").equals("true"))
stmt = m.createStatement(subject,prop,RDF.nil);
// if a simple type is nil there is no content or attributes
// initialise restriction set according to level of restriction checking required
else {
Boolean b = ((simpleType) t).toRDF(subject, prop, elem, value, seq, null, ctx);