Hi,

Seems to be a variety of views here all from including trying to  do away with 
names spaces if we can :-) Certainly no consensus.

My original suggestion was just to have the standard URLs predefined but still 
use name space names in MXML code.

The name space URIs are defined in flex-config.xml so It would be possible to 
omit them from the code. We would  have to specify a default name space name 
(mx, s etc) but would still have to use name space names when specifying 
components eg Have to use <mx:List> or <s:List>  not <List>

Like this perhaps:
         <namespace>
            <uri>http://www.apache.org/flex</uri>
            <manifest>apache-manifest.xml</manifest>
            <name>a</name>
         </namespace>
         <namespace>
            <uri>library://ns.adobe.com/flex/spark</uri>
            <manifest>spark-manifest.xml</manifest>
            <name>s</name>
         </namespace>
         <namespace>
            <uri>library://ns.adobe.com/flex/mx</uri>
            <manifest>mx-manifest.xml</manifest>
            <name>mx</name>
         </namespace>

The only down side and this may be a big one is that the MXML files would no 
longer be 100% valid XML. Which may cause some issues for 3rd party tools IDEs 
etc etc 

We could take this a step further if we specified an order to look through the 
standard name spaces ie Apache then Spark then MX ie the order they are listed 
in the  flex-config.xml.

My objective here is to make standard MXML code a bit easier for humans to 
read. Here what some code would look like. You would still need to use some 
namespace names but not all over the place.

<Application> <-- found in Spark (not mx) namespace  -->
        <Declarations> <-- found in fx namesapce -->
                <PostCodeValidator id="pcv"/>  <-- found in apache namespace -->
        <Declarations>

        <mx:List id="country" /> <-- Wanted mx one not spark one so needed to 
specify name space name -->
</Application>

I don't imagine that the MXML compiler changes would be that hard to make this 
happen and wouldn't break any existing code or force it to change.

Thanks,
Justin

Reply via email to