[jdom-interest] Namespace patch

bob bob at accurev.com
Mon Aug 28 23:24:17 PDT 2000


	http://code.werken.com/nspatch.txt


Patchfile (cvs diff -u -R) against the CVS tree as it
stood an hour ago.

adds:

	void Element.addNamespaceDeclaration()
	Map Element.getNamespaceDeclarations()
	Map Element.getNamespaceDeclarations(boolean recursive)

Alters DOMBuilder and SAXBuilder to Do The Right Thing upon
xmlns attributes.

Modified XMLOutputter (but *not* DOMOutputter yet) to reproduce
document in whole, including 'unused' xmlns: attributes.

getNamespaceDeclarations() returns Map, because it makes my
life easier in XPath.  You might instead prefer a Set or similar.

But uniqueness-by-prefix is a requirement, so simple identity
comparison of Namespace objects wouldn't be sufficient.

	-bob




More information about the jdom-interest mailing list