Import and export

From FreeMind
Revision as of 19:40, 10 September 2004 by 194.39.131.40 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Export and import in general

Export and import from MindManager

Indirect Mindmanager 4.0 to FreeMind conversion

How I converted all my mindmanager-mindmaps to freemind in one go. This works for me. Perhaps not for you. Mindmanager 4.0: MMScript?-Editor has a problem with: Dim mm As MmImageType?

  1. Download Download XSLT transformations sheets from Christoph Rissner from http://courses.iicm.edu/~hkrott/site/docs/seminar/sem2002_mindmaps.tar.gz and extract. You need some of those files in step 4 an step 8.
  2. Open Mindmap in Mindmanager 2002 (With Mindmanager 4.0 I had a problem with "Dim mm As MmImageType?". You CAN use further the MMScript?-Editor after the 21-days-trial-tim)
  3. Menu->Tools->MMScript?-Editor
  4. MMScript?-Editor: Menu->Open File->exportXML.MMScript? (see step 1)
  5. Menu->Makro->Ausführen (or key "F5")
  6. (x) Export whole map, Choose destination file, (OK)
  7. Copy all xml-Files in a new directory or make of cource a backup of all your mindmaps! Sorry windows, with linux the following conversion is very easy. Perhaps do it with windows with a batch-file or something else.
  8. Save the following bash-script to "mmtofmconvert" and make it executable with "chmod a+x mmtofmconvert":
  #! /bin/sh
  # mmtofm-convert
  # Leerzeichen in Dateinamen in _ umwandeln
  for f in *\ *; do mv "$f" "`echo $f | tr \  _`"; done
  # xml-Dateien in mm umwandeln
  # Pfad zur Datei mm2fm.xslt muss angepasst werden! See step 1
  # xsltproc:  http://xmlsoft.org/XSLT/
  for f in *.xml; do xsltproc -o `basename $f .xml`.mm /home/pete/mm2fm.xslt $f; done 
  # ACHTUNG! Entferne alle xml und mmp-Dateien. 
  # Attention! Delete all xml- and mmp-files!
  #rm *.xml *.mmp
  # Codierung von utf-8 in lokal erwünschte umwandeln. With work for me.
  recode utf-8 *.mm
  1. execute scipt from step 8 in every directory with the xml-files you want to transform.
  2. the exported mindmaps have exactly the same structure like the original! I am lucky.

Regards, Peter

Direct MindManager X5 to FreeMind conversion

I received a couple of MindManager mindmaps that I had to convert to FreeMind. These mmap files turned out te be zip-files containing an XML file with the mindmap data. So I've written a basic XSLT which directly transforms this XML to the FreeMind format without the need to install MindManager. I suppose a convenient Import from MindManager could thus be provided in FreeMind using this info/xslt. I also suppose that this XSLT could be extended to transform additional specifics like edge-color, edge-width, etc, but I could not immediately figure out where such data is stored in MindManager's XML, as I do not have MindManager.


 <?xml version="1.0" encoding="iso-8859-1"?>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:ap="http://schemas.mindjet.com/MindManager/Application/2003"
 >
       <xsl:output
         method="xml"
       version="1.0"
       encoding="iso-8859-1"
       omit-xml-declaration="yes"
       indent="yes"
       />     
   <xsl:template match="/">
     <xsl:element name="map">
       <xsl:attribute name="version">0.7.1</xsl:attribute>
       <xsl:apply-templates select="ap:Map/ap:OneTopic/ap:Topic" />
     </xsl:element>
   </xsl:template>
   <xsl:template match="ap:Topic">
     <xsl:element name="node">
       <xsl:attribute name="TEXT">
         <xsl:value-of select="ap:Text/@PlainText" />
       </xsl:attribute>        <xsl:if test="ap:Text/ap:Font/@Color">
         <xsl:attribute name="COLOR">
           <xsl:value-of select="concat(#, substring(ap:Text/ap:Font/@Color, 3, 6))" />
         </xsl:attribute>
       </xsl:if>
       <xsl:variable name="OId" select="@OId" />
       <xsl:variable name="relation" select="/ap:Map/ap:Relationships/ap:Relationship[ap:ConnectionGroup[@Index=0]/ap:Connection/ap:ObjectReference/@OIdRef=$OId]" />
       <xsl:if test="$relation">
         <xsl:variable name="toId" select="$relation/ap:ConnectionGroup[@Index=1]/ap:Connection/ap:ObjectReference/@OIdRef" />
         <xsl:element name="arrowlink">
           <xsl:attribute name="ENDARROW">Default</xsl:attribute>
           <xsl:attribute name="DESTINATION">
             <xsl:value-of select="$relation/ap:ConnectionGroup[@Index=1]/ap:Connection/ap:ObjectReference/@OIdRef" />
           </xsl:attribute>
           <xsl:attribute name="STARTARROW">None</xsl:attribute>
         </xsl:element>
       </xsl:if>
       <xsl:variable name="toId" select="/ap:Map/ap:Relationships/ap:Relationship/ap:ConnectionGroup[@Index=1]/ap:Connection/ap:ObjectReference[@OIdRef=$OId]/@OIdRef" />
       <xsl:if test="$toId">
         <xsl:attribute name="ID">
           <xsl:value-of select="$toId" />
         </xsl:attribute>
       </xsl:if>
       <xsl:apply-templates select="ap:SubTopics"/>
     </xsl:element>
   </xsl:template>
 </xsl:stylesheet>

Mmap format is a jar file

MindManager's file format of .mmap files is a zipped file:

/home/dgriff> jar tvf Requirements.mmap
  1782 Mon Jun 14 15:00:38 BST 2004 bin/C96CF30F-3F6E-460B-8D5A-ED5F65E852D4.bin
102572 Mon Jun 14 15:00:38 BST 2004 Document.xml
  2265 Mon Jun 14 15:00:38 BST 2004 xsd/MindManagerDelta.xsd
 48314 Mon Jun 14 15:00:38 BST 2004 xsd/MindManagerApplication.xsd
     0 Mon Jun 14 15:00:38 BST 2004 xsd/
  5037 Mon Jun 14 15:00:38 BST 2004 xsd/MindManagerCore.xsd
     0 Mon Jun 14 15:00:38 BST 2004 bin/
 13615 Mon Jun 14 15:00:38 BST 2004 xsd/MindManagerPrimitive.xsd
 13518 Mon Jun 14 15:00:38 BST 2004 Preview.png

Dave Griffiths

---

If that is the case, it should be possible to create XSLT that converts directly between FreeMind's and MindManager's XML. Additionally, one should be also able to get the contents of .mmap by renaming a copy of it to .zip and opening in favorite zip application.

An advantage of this approach should be obvious; you don't need MindManager to covent a MindManager's map to FreeMind's map. Therefore, you do it on any operating system you like.

This all surely does apply only from certain version of MindManager above. That should be clarified.

It is not true for files saved using MindManager 4.0 Standard Edition.

To fix problems with character encoding

Try to change the encoding="UTF-8" to encoding="iso-8859-1" in the xslt sheet posted above.