resolving NAMESPACE problems

8 views
Skip to first unread message

Jim Steel

unread,
Mar 20, 2012, 7:12:39 AM3/20/12
to Sunny Phung, tef...@googlegroups.com

OK,

The basic thing with NAMESPACEs is that the NAMESPACE statement can point
to three kinds of URIs:
1) a physical URI, I.e. An http://blah.com/foo.ecore or
platform:/resource/foo/bar.ecore file that directly resolves to an actual
ecore file
2) a logical URI that has been registered by some ecore package as part of
the eclipse platform you're running. For example, if you see something
like NAMESPACE http://www.eclipse.org/emf/2002/Ecore, that doesn't work
if, for example, you put that URL in your web browser, it isn't there.
However, the EMF plugins themselves register that URI with the Ecore.ecore
package, so that eclipse knows to resolve it when you ask for the ecore
with that URI
3) a logical URI that has been registered with tefkat itself. If you look
in Preferences->Tefkat, there is a table of aliases from one URI to
another. This is a way where you can put, for example "http://uml" in
there as the URI Source, and a physical URI (type (1) above) as the
target, so that you don't have to use some long platform:/resource/....
URI every time you want to refer to the ecore in a transformation. The
tefkat tutorial has some information about using this kind of URIs.

If you include a URI which isn't one of these three kinds, then the tefkat
resource won't load properly, and all of those typeNames on mofInstances
will be null.

Hope that helps,

Jim.


Reply all
Reply to author
Forward
0 new messages