[jdom-interest] printAdditionalNamespaces() in XMLOutputter
Keith M. Hughes
sw at hideho.org
Fri Nov 15 19:43:47 PST 2002
I am using JDOm for a Web publishing system that I am writing. JDOM is a
great package and has made my life much easier and I am trying to use it
to make my life even easier.
I want to have an XML outputter with functionality something like the
XSLT exclude-result-prefixes attribute. I want to be able to tell the
outputter that various namespaces should not be included in the output
of the outputter and refer to those namespaces by their prefix. I have
modified the XMLOutputter class supplied with JDOM, but want a solution
that won't break everytime I download a new version of JDOM when I
forget to apply my patch.
The easiest solution would be to make the routine
XMLOutputter.printAdditionalNamespaces() protected rather than private.
Then I can override the method in a subclass and still use most of the
XMLOutputter methods as-is.
Is there a better way to do this? Is it asking too much to have the
method changed from private to protected?
Thanks for your time,
More information about the jdom-interest