1 <?xml version="1.0" encoding="UTF-8"?>
4 Document : mmap2vym.xsl
5 Author : Clemens Kraus (http://www.clemens-kraus.de)
6 Uwe Drechsel <vym@InSilmaril.de>
8 Description: transforms exported MindManager-files (version x5/6) into vym-format.
9 Bugs : First Version, work still in progress!
10 Todo : - xlinks still to be implemented
11 - codes/symbols still to be implemented
12 - Multimap links (.mmap) still to be implemented
15 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
16 xmlns:xlink="http://www.w3.org/1999/xlink"
17 xmlns:ap="http://schemas.mindjet.com/MindManager/Application/2003"
18 xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl math func"
19 xmlns:math="http://exslt.org/math"
20 xmlns:func="http://exslt.org/functions"
23 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
24 <xsl:param name="filenamep" />
25 <xsl:variable name="filename" select="$filenamep"/>
26 <!--<xsl:variable name="maxxCoord"><xsl:value-of select="math:max(map//xCoord)" /></xsl:variable>-->
29 <xsl:template match="/">
30 <xsl:element name="vymmap">
31 <!-- default settings: -->
32 <xsl:attribute name="comment">Converted from MindManager to vym
33 using mmap2vym.xsl</xsl:attribute>
35 <xsl:variable name="author" select="concat(/ap:Map/ap:DocumentGroup/ap:Author/@UserName, ' ', /ap:Map/ap:DocumentGroup/ap:Author/@UserEmail)" />
36 <xsl:if test="$author">
37 <xsl:attribute name="author"><xsl:value-of select="$author"/></xsl:attribute>
40 <xsl:element name="mapcenter">
41 <!-- recurse to map title node ... -->
42 <xsl:apply-templates select="ap:Map/ap:OneTopic/ap:Topic/ap:SubTopics" />
47 <xsl:template match="ap:Topic/ap:Text">
48 <xsl:element name="heading">
49 <xsl:value-of select="@PlainText" />
54 <xsl:template match="ap:Topic">
55 <xsl:element name="branch">
56 <xsl:call-template name="position" />
57 <!-- =============================== hyperlink ================================
58 <xsl:variable name="url" select="ap:Hyperlink" />
60 <xsl:attribute name="url"><xsl:value-of select="ap:Hyperlink/@Url"/></xsl:attribute>
62 <xsl:variable name="rect" select="ap:SubTopicShape/@SubTopicShape" />
63 <xsl:if test="contains($rect, 'Rectangle')">
64 <xsl:attribute name="frameType">Rectangle</xsl:attribute>
67 <xsl:apply-templates/>
72 <!-- =============================== position ================================ -->
73 <xsl:template name="position">
74 <xsl:if test="ap:Offset/@CX!=''">
75 <xsl:attribute name="relPosX">
76 <xsl:value-of select="ap:Offset/@CX *3"/>
79 <xsl:if test="ap:Offset/@CY!=''">
80 <xsl:attribute name="relPosY">
81 <xsl:value-of select="floor( ap:Offset/@CY *3 )"/>
87 <!-- =============================== Icons ================================ -->
88 <xsl:template match="ap:Icon">
89 <xsl:element name="standardFlag">
91 <xsl:when test="@IconType ='urn:mindjet:ExclamationMark'">exclamationmark</xsl:when>
92 <xsl:when test="@IconType ='urn:mindjet:SmileyHappy'">smiley-good</xsl:when>
93 <xsl:when test="@IconType ='urn:mindjet:SmileySad'">smiley-sad</xsl:when>
95 <xsl:message>Unknown Flag found: <xsl:value-of select="@IconType"/></xsl:message>