Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362955 - User-declared namespace prefix (needs syntax change)
Summary: User-declared namespace prefix (needs syntax change)
Status: NEW
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 18:17 EDT by Vlad Gheorghe CLA
Modified: 2016-04-06 10:43 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Gheorghe CLA 2011-11-04 18:17:15 EDT
It would be useful that the prefix used to reference to an imported package in a MTL module to be defined by the user.

The enhanced syntax would be like:
<mtl>
module Mod1(mymm1='http://example.org/mm1/1')
</mtl>

Note. This feature is similar to xml namespaces.
e.g.
<elem  xmlns:mymm1='http://example.org/mm1/1'>
  <mymm1:A/>
</elem>
Comment 1 Ed Willink CLA 2011-11-05 00:44:56 EDT
(In reply to comment #0)
> The enhanced syntax would be like:
> <mtl>
> module Mod1(mymm1='http://example.org/mm1/1')
> </mtl>

I think 

    module Mod1(mymm1:'http://example.org/mm1/1')

would be more consistent with other name:type declarations.
Comment 2 Vlad Gheorghe CLA 2011-11-05 08:36:58 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > The enhanced syntax would be like:
> > <mtl>
> > module Mod1(mymm1='http://example.org/mm1/1')
> > </mtl>
> 
> I think 
> 
>     module Mod1(mymm1:'http://example.org/mm1/1')
> 
> would be more consistent with other name:type declarations.

The syntax  name:Type  is used to declare new local variables and parameters, with the given name.
  (  <variable> ':' <type> )


In the case at hand the name is just an alias for an *existing* package (hence the equivalence '=' sign ).

IMHO, using the same syntax would be confusing.
Comment 3 Laurent Goubet CLA 2016-04-06 10:43:13 EDT
Could be interesting for disambiguation of types sharing the same namespace as well.