flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject [DISCUSS] Handling of namespaces and xml
Date Tue, 17 May 2016 14:11:12 GMT

I am currently working on compiling the examples in asjs with maven. The reason for not having
any [ASJS][FALCON] whatsoever, is that this could apply/affect all types of Flex SKDs.

Currently we have the flex-config.xml in the frameworks directory. This defines a lot of namespace
elements in which - sometimes multiple - manifest files are assigned to one and the same namespace
uri. I would interpret this as the compiler creating a map for each namespace uri and adding
the classes defined in each of the manifests to these maps. This is probably why the namespace
"library://ns.apache.org/flexjs/basic" contains classes of multiple SWC modules.

The downside is now that I always have to reference the framework directory in order for the
compiler to find the flex-config and hereby find the definitions of all classes in the SDK.
With maven Flexmojos used to trick the compiler by packing up all these files in a zip and
deploying that. When using it, this zip was unpacked and the compiler used this unpacked directory.

For me this seems rather ugly and hacky. I would like to propose a little change, that should
not affect any of the old SDKs or the Ant build.

The manifests are xml files, we could add a targetNamepsace attribute to the root-element.
Next we could pack the manifest xml files inside the SWCs (eventually inside a "manifests"
directory) this would make a SWC self contained. It would allow the library developer to define
which classes he wants to expose using which namespace. The ideal solution would be that the
compiler knows about this and looks in the SWCs for these definitions. I would however also
assume this would involve some tweaking of the compiler. The other option would be that I
generate one unified manifest-xml for each namespace referenced in the classpath in the target
directory and pass that to the compiler.

While we are at it, I would also propose defining XML Schemas for each of the Xml formats
we use and to reference these in the files, this allows automatic validation of xml content
in the IDE.

What do you think?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message