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 09:38
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 789
Registered: July 2009
Location: Grenoble, France
Senior Member

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.
Previous Topic:[Announce] MoDELS 2010 Call for Papers
Next Topic:XMLResource with xmlns=""
Goto Forum:

Current Time: Sun Nov 29 23:09:34 GMT 2015

Powered by FUDForum. Page generated in 0.06548 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software