Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » XMLResource with xmlns=""
XMLResource with xmlns="" [message #619503] Wed, 21 April 2010 05:38
Mickael Istria is currently offline Mickael Istria
Messages: 735
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

I am trying to import an XML file in EMF with a factory generated with xsd2ecore:

Resource resource = new jpdl32ResourceFactoryImpl().createResource(sourceJBPMUri);
options.put(Collections.EMPTY_MAP);
resource.load(options);

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?

Regards,
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Previous Topic:[Announce] MoDELS 2010 Call for Papers
Next Topic:XMLResource with xmlns=""
Goto Forum:
  


Current Time: Wed Jul 23 08:04:04 EDT 2014

Powered by FUDForum. Page generated in 0.01734 seconds