|XMLResource with xmlns="" [message #619503]
||Wed, 21 April 2010 09:38
|| Mickael Istria
Registered: July 2009
Location: Grenoble, France
I am trying to import an XML file in EMF with a factory generated with xsd2ecore:
Resource resource = new jpdl32ResourceFactoryImpl().createResource(sourceJBPMUri);
However, most of targeted file have their xmlns blank (we can read the xmlns="" in the top-level element). Then the factory tells me the following:
java.lang.RuntimeException: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'null' not found.
If I set the xmlns to the right value manually, everything goes well, but I'd like to know how to ignore this xmlns (since I know the target factory and so on), or how to specify it while loading the resource, rather than altering the resource.
I've tried to load the resource with option jpdl32ResourceImpl.NO_NAMESPACE_SCHEMA_LOCATION="true", but this did not do the trick. I also tried to play with the XMLResource.OPTION_SCHEMA_LOCATION without success.
Does anybody have an idea of how to bypass this dummy xmlns value?
Mickael Istria - BonitaSoft S.A.
Powered by FUDForum
. Page generated in 0.01488 seconds