Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Referencing models with names that conflict with OCL syntax
Referencing models with names that conflict with OCL syntax [message #487303] Tue, 22 September 2009 17:36 Go to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I am just wondering if there is a way of escaping the special characters
which can occur when you references models in registry. For example, some
model names have '.' in their names (such as com.sun.java.xml.ns.javaee
which are generated from xsd nsUris) and this conflicts with OCLs syntax
when referencing the model from oclAsType. Or maybe there is a way to
specify the original nsUri like QVT's modeltype?

Thanks in advance.
Derek
Re: Referencing models with names that conflict with OCL syntax [message #487395 is a reply to message #487303] Wed, 23 September 2009 05:45 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Derek

Your question seems slightly confused, so I'll try to answer a couple of
adjacent questions.

OCL has an official escaping mechanism for access to awkward names that
involves an "_" prefix.

e.g. myObject._package.

MDT/OCL probides an unofficial escaping mechanism partially complying
with Issue 14357 that involves surriounding double quotes

e.g. def: "<="(v:OclAny).

OCL provides no mechanism for use of URIs.

If you want to refer to an element of an external package you qualify it
with a package path e.g. xsd::XSDCardinality::finite
Installing the xsd package into the MDT/OCL Environment is your
(programmatic) responsibility.

This responsibility is alleviated when using M2M/QVTd OCL editor which
currently loads all packages from all models declared to be in scope
using the M2M/QVTd Model Registry. Both of these QVTd facilities are
planned to migrate to MDT/OCL in the next release. The use of a model
registry 'package path' may be made a bit more flexible to cover you use
case, if you care to elaborate what your expression is and how you
expect OCL to support it.

Regards

Ed Willink


Derek Palma wrote:
> Hi,
>
> I am just wondering if there is a way of escaping the special characters
> which can occur when you references models in registry. For example,
> some model names have '.' in their names (such as
> com.sun.java.xml.ns.javaee which are generated from xsd nsUris) and this
> conflicts with OCLs syntax when referencing the model from oclAsType. Or
> maybe there is a way to specify the original nsUri like QVT's modeltype?
>
> Thanks in advance.
> Derek
Previous Topic:Navigating over eContainer()
Next Topic:problem about the interactive OCL console
Goto Forum:
  


Current Time: Fri Apr 19 09:42:22 GMT 2024

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

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

Back to the top