Skip to main content

Remove Foreign Namespaces

Remove namespaces (topic) · Remove namespaces (project)

Cleanup ⚡ tab → Styling group

Removes all non-MadCap namespace declarations, attributes and elements from your topics — the typical leftovers of Word imports, such as xmlns:o, xmlns:w, <o:p> elements and o:gfxdata attributes. Text content is always preserved.

What gets removed​

  • Foreign namespace declarations (xmlns:o, xmlns:w, xmlns:v, xmlns:st1, ...)
  • Attributes in foreign namespaces (e.g. o:gfxdata)
  • Elements in foreign namespaces (e.g. <o:p>) — these are unbound, so their text content survives

MadCap namespaces, the standard XHTML namespace, and xml: attributes are always kept.

Remove namespaces in the current topic​

  1. Open the topic.
  2. Click Remove namespaces (topic) in the Styling group.
  3. Confirm. The document is saved and backed up first.
  4. If nothing foreign is found, you are told so; otherwise the topic is cleaned, saved, and reloaded in the editor.

Remove namespaces in the whole project​

  1. Click Remove namespaces (project).
  2. Confirm. The scope is the whole Content folder including sub-folders — topics and snippets.
  3. Only the affected files are backed up to a ZIP archive (in your configured backup folder) and checked out of source control before they are cleaned.
  4. A summary reports how many files were cleaned and where the backup ZIP is.

Notes​

  • Files that cannot be parsed as XML are skipped and listed in the summary — they are never half-cleaned.
  • There is no dry-run mode; the ZIP backup is your undo. Restore it with Backup and Restore.
  • Run Validate XML first if you suspect broken markup — namespace cleaning requires valid XML.