protected Element _parse(String value, IRI baseUri) throws ParseException, IRISyntaxException {
if (value == null) return null;
FOMFactory fomfactory = (FOMFactory) factory;
Parser parser = fomfactory.newParser();
ByteArrayInputStream bais = new ByteArrayInputStream(value.getBytes());
ParserOptions options = parser.getDefaultParserOptions();
options.setCharset(getXMLStreamReader().getCharacterEncodingScheme());
options.setFactory(fomfactory);
Document doc = parser.parse(bais, baseUri.toString(), options);
return doc.getRoot();
}