Element e = (Element) nl.item(i);
noSchemaToRDF(obj,e,s,ctx);
break;
case Node.TEXT_NODE:
String value = ((Text) nl.item(i)).getNodeValue().trim();
Literal lit = null;
if (elem.hasAttributeNS(XML,"lang"))
lit = m.createLiteral(value, elem.getAttributeNS(XML,"lang"));
else
lit = ctx.getModel().createLiteral(value);
stmt = ctx.getModel().createStatement(obj,RDF.value,lit);
if (!value.equals("")) {
ctx.getModel().add(stmt);
if (s!=null) s.add(stmt.createReifiedStatement());
}
}
}
return true;
}
else { // looks like a simple type
String value = XMLBean.getValue(elem);
if (value!=null && ctx.isPreserved()) value = value.trim();
if (value==null) value = "";
Literal l = m.createLiteral(value);
stmt = m.createStatement(subject,prop,l);
m.add(stmt);
if (seq != null && stmt!=null) seq.add(stmt.createReifiedStatement());
return true;
}