#16 Namespace prefix handling


From my understanding the way to add a wanted prefix to an element is to use @Namespace(reference="something"). But that sort of destroys the idea of having a prefix which is supposed to operate as an alias, not having to type the long URLs.
When I tried @Namespace(prefix="something") the generated XML contained an empty xmlns declaration as well.
My suggestion is that declaring @Namespace(prefix="something") means that only the prefix is added to the element name, no xmlns declaration.
If this is not possible due to some additional need to use prefix to set empty xmlns then I suggest that you introduce something like @Namespace(alias="something") that will only prepend the element.


  • Niall Gallagher

    Niall Gallagher - 2011-04-08

    This is the way it works now, if you have already added the URL then it does not get added again if its within scope.

  • Niall Gallagher

    Niall Gallagher - 2011-04-28

    You can do this already, if you declare only the namespace, it will inherit the prefix from any previous declaration.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks