Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Export from Freemind to yEd - simple XSL

+1 vote

Regarding my feature request for this export I found one step more. It could be easily done with an XSLT which creates a simple CSV which can be imported to yEd via the Excel-Import.

 

This is my XML-code:

Code:
<map version="0.9.0">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net  -->
<node CREATED="1327478699125" ID="ID_1202573115" MODIFIED="1327478699125" TEXT="Start">
<node CREATED="1327478715593" ID="ID_1274856431" MODIFIED="1327478717437" POSITION="right" TEXT="a">
<node CREATED="1327478748546" ID="ID_1587295463" MODIFIED="1327478749515" TEXT="4"/>
</node>
<node CREATED="1327478718296" ID="ID_325575686" MODIFIED="1327478718906" POSITION="right" TEXT="b"/>
<node CREATED="1327478719687" ID="ID_1032928779" MODIFIED="1327478720500" POSITION="right" TEXT="c">
<node CREATED="1327478734953" ID="ID_349051169" MODIFIED="1327478736734" TEXT="1"/>
<node CREATED="1327478737500" ID="ID_1200348443" MODIFIED="1327478739046" TEXT="2"/>
<node CREATED="1327478742234" ID="ID_1104719965" MODIFIED="1327478743765" TEXT="3"/>
</node>
</node>
</map>


This should be the result - a CSV-table with a Node-Ancestor-data for each node:

Code:

Node, Ancestor
Start,-
a, Start
b, Start
c, Start
4, a
1, c
2, c
3, c


Who can help?

Thanks

Peter

in Help by (780 points)

2 Answers

+1 vote

Try the following XSLT to convert the freemind format to a TGF (Trivial Graph Format) which can be opened with yEd. Copy this to a file, save it as mm2tgf.xsl and use it in the Freemind export dialog.

 

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text" encoding="windows-1252"/>


<xsl:template match="/">
    <xsl:apply-templates select="map"/>
</xsl:template>


<xsl:template match="map">
    <xsl:apply-templates select="node"/>
    <xsl:text>#&#xA;</xsl:text>
    <xsl:apply-templates select="node" mode="links"/>
</xsl:template>

<xsl:template match="node">
    <xsl:value-of select="@ID"/>
    <xsl:text>&#09;</xsl:text>
    <xsl:value-of select="@TEXT"/>
    <xsl:text>&#xA;</xsl:text>
    <xsl:apply-templates select="node"/>
</xsl:template>

<xsl:template match="node" mode="links">
    <xsl:variable name="source" select="@ID" />
    <xsl:for-each select="node">
        <xsl:value-of select="$source"/>
        <xsl:text>&#09;</xsl:text>
        <xsl:value-of select="@ID"/>
        <xsl:text>&#xA;</xsl:text>
    </xsl:for-each>
    <xsl:apply-templates select="node" mode="links"/>
</xsl:template>

</xsl:stylesheet>

by
works fine on this side, thanks!
0 votes

Both of the following converters seem to be promising but additional changes to the resulting file may be required:

by [yWorks] (26.8k points)
Thanks for the info, but on base of my zero-level-knowledge I just spent some hours with try&Error&Error and start reading books for Dummies and so to modify this template.

At the moment I don't have a solution.
Legal Disclosure | Privacy Policy
...