public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier)
throws XNIException, IOException {
String systemId = resourceIdentifier.getExpandedSystemId();
String publicId = resourceIdentifier.getPublicId();
String namespace = resourceIdentifier.getNamespace();
XMLInputSource is = null;
String schema = null;
if (systemId == null)
{
if(publicId == null)
{
if(namespace == null)
{
return null;
}
else
{
systemId = namespace;
}
}
else
{
systemId = publicId;
}
}
if(referringSchemaNamespace != null && referringSchemaNamespace.equals(systemId))
{
if(referringSchemaInputSource!=null)
{
return referringSchemaInputSource;
}
}
else if ((schema = (String) entities.get(systemId)) != null && !schema.equals(""))
{
is = new XMLInputSource(publicId, systemId, systemId,new StringReader(schema),null);
}
//if(is == null)
//{
// throw new IOException();