Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362955

Summary: User-declared namespace prefix (needs syntax change)
Product: [Modeling] Acceleo Reporter: Vlad Gheorghe <vlad.gheorghe>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: ed, laurent.goubet
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.