Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Q: Pretty printing of namespaces

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Q: Pretty printing of namespaces
  • Date: Mon, 29 Sep 2003 16:59:06 -0700

In order to have XML docs easily human readable, I'm trying to remove as much namespace clutter as possible from third-party XML documents autogenerated and merged from multiple sources.

Does anyone know rules and/or code that removes redundant namespace declarations in XML documents, either by strictly retaining semantics or by slighly relaxing them?

Possibly by reusing prefixes already declared "further up", by moving common namespace declarations into parent elements, by renaming prefixes that refer to the same namespace, by removing prefixes that refer to the default namespace, etc. This seems to be not so trivial.

Any pointers to related discussions, rules and/or [xom] code?

Thanks for any help,
Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page