Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2960

Automatic cleanup of unwanted namespaces during export

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.2
    • 4.1.2, 4.2, 4.2.1
    • core
    • None
    • Yes
    • Yes

      See MAGNOLIA-2756 for a background.
      We have several unwanted namespaces in the xml export, and the way jackrabbits handles the namespace registry makes really hard to remove them and avoiding to see them showing up again in future exports... looks like it's enough to import any kind of xml file with a namespace to definitively "infect" the instance and make that namespace show up everywhere.

      While with MAGNOLIA-2756 now we have clean bootstrap file, it's still to easy for a single unwanted namespace to slip in and corrupt xml export, so I'd like a more definitive solution...

      I've coded a patch for a Sax filter that cleanups namespaces on the fly during export and I've added this to MetadataUuidFilter (already used by default during export) so that it's enabled by default.
      If for any reason the stripping of unwanted namespaces is not wanted, the user can just set the new "magnolia.export.keep_extra_namespaces" property.
      The list of namespaces is taken from MAGNOLIA-2756. Last but not least, there is a new unit test added for this.

      Since I'd like to see if other agree for adding this as a default, I'm attaching the patch here before committing. Please shout if you see reasons why this should not be on by default.

        Acceptance criteria

              fgiust Fabrizio Giustina
              fgiust Fabrizio Giustina
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD