namespace prefixes in modules

Description

Hi,

at this time, it isn't possible to have different modules with different
namespaces but the same namespace prefix in rome. The problem is:
RSS090Generator, RSS091UserlandGenerator, Atom03Generator and Atom10Generator
are using generateModuleNamespaceDefs in BaseWireFeedGenerator, which tries to
add all modules namespaces to the DOM and afterwards the not needed namespaces
are removed by purgeUnusedNamespaceDeclarations in the same class.

Now i went into trouble when trying to implement two modules with different
version of a rss-extension that use both the same prefix (they are never used in
the same feed of course but in the same application). This results in a JDOM
exception when trying to add a further namespace with the same prefix that isn't
needed in the feed.

My solution is: Instead of first adding all available module-namespaces to the
feed and afterwards removing those not needed by traversing the dom, I'm adding
all the elements in my modules with namespaces added locally and afterwards
traversing the complete dom, removing the local namespaces an collecting them
for attaching at root level.

A patch will follow soon.

Greetings,

Martin

Environment

None

Attachments

1

Activity

Show:

Martin Kurz October 8, 2013 at 10:00 PM

We recently moved to GitHub. The issue is now located here: https://github.com/rometools/rome/issues/114

Former user September 15, 2011 at 6:55 PM

Attachment namespaces.patch has been added with description: http://java.net/jira/secure/attachment/26752/namespaces.patch

Martin Kurz December 13, 2008 at 3:02 PM

Created an attachment (id=26)
patch for adding just the used namespaces in feed

UNRESOLVED

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created December 13, 2008 at 3:01 PM
Updated October 8, 2013 at 10:00 PM
Resolved December 13, 2008 at 3:02 PM