source: freemind/trunk/fuentes/freemind/accessories/freemind2flash.xsl @ 68

Last change on this file since 68 was 68, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 4.1 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                version="1.0">
4
5  <!--
6/*FreeMind - A Program for creating and viewing Mindmaps
7 *Copyright (C) 2006  Christian Foltin <christianfoltin@users.sourceforge.net>
8 *See COPYING for Details
9 *
10 *This program is free software; you can redistribute it and/or
11 *modify it under the terms of the GNU General Public License
12 *as published by the Free Software Foundation; either version 2
13 *of the License, or (at your option) any later version.
14 *
15 *This program is distributed in the hope that it will be useful,
16 *but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 *GNU General Public License for more details.
19 *
20 *You should have received a copy of the GNU General Public License
21 *along with this program; if not, write to the Free Software
22 *Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23 */
24     
25  -->
26
27  <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
28    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
29 
30<!-- fc, 20.10.2004: The following parameter is set by freemind. -->
31<xsl:param name="destination_dir">./</xsl:param>
32<xsl:param name="area_code"></xsl:param>
33<xsl:param name="folding_type">html_export_no_folding</xsl:param>
34        <!-- possible values:
35                html_export_fold_all,
36                html_export_no_folding,
37                html_export_fold_currently_folded,
38                html_export_based_on_headings: this means, that approx. five levels are given, more deeper nodes are folded.
39                As of the time being, this parameter is not used.
40                -->
41<!--
42   
43    -->
44  <xsl:template match="/">
45    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
46      <head>
47<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
48                <title><xsl:call-template name="output-title" /></title>
49        <xsl:element name="script">
50            <xsl:attribute name="type">text/javascript</xsl:attribute>
51            <xsl:attribute name="src">./<xsl:value-of select="$destination_dir"/>flashobject.js</xsl:attribute>
52                        <xsl:text> </xsl:text><!-- this space is a trick, such that firefox displays the flash...  :( -->
53                </xsl:element>
54<style type="text/css">
55       
56        /* hide from ie on mac \*/
57        html {
58                height: 100%;
59                overflow: hidden;
60        }
61       
62        #flashcontent {
63                height: 100%;
64        }
65        /* end hide */
66
67        body {
68                height: 100%;
69                margin: 0;
70                padding: 0;
71                background-color: #9999ff;
72        }
73
74</style>
75      </head>
76                <body>
77        <div id="flashcontent">
78                 Flash plugin or Javascript are turned off.
79                 Activate both  and reload to view the mindmap
80        </div>
81       
82        <script type="text/javascript">
83                var fo = new FlashObject("./<xsl:value-of select="$destination_dir"/>visorFreemind.swf", "visorFreeMind", "100%", "100%", 8, "#9999ff");
84                fo.addParam("quality", "high");
85                fo.addParam("bgcolor", "#ffffff");
86                fo.addParam("allowScriptAccess", "true");
87                fo.addVariable("openUrl", "_blank");
88                fo.addVariable("initLoadFile", "./<xsl:value-of select="$destination_dir"/>map.mm");
89                fo.addVariable("startCollapsedToLevel","5");
90                fo.write("flashcontent");
91        </script>
92                </body>
93    </html>
94  </xsl:template>
95
96<!--
97        fc, 22.3.2013: tracing doesn't work. If you want to try, replace in the flash build.xml
98        -trace off by -trace Flashout.traceReplacer
99                fo.addVariable("FLASHOUT_ENABLE", "TRUE");
100                fo.addVariable("FLASHOUT_PORT", "1024");
101 -->
102
103<!-- from toxhtml.xsl -->
104
105<xsl:template name="output-title">
106        <!-- look if there is any node inside the map (there should never be
107                none, but who knows?) and take its text as the title -->
108        <xsl:choose>
109        <xsl:when test="/map/node/@TEXT">
110                <xsl:value-of select="/map/node/@TEXT" />
111        </xsl:when>
112        <xsl:when test="/map/node/richcontent[@TYPE='NODE']">
113                <xsl:apply-templates select="/map/node/richcontent[@TYPE='NODE']/html/body" mode="strip-tags" />
114        </xsl:when>
115        <xsl:otherwise>
116                <xsl:text>FreeMind2HTML Mindmap</xsl:text>
117        </xsl:otherwise>
118        </xsl:choose>
119</xsl:template>
120
121       
122        <xsl:template match="text()|@*"  mode="strip-tags">
123                  <xsl:value-of select="string(.)"/>
124        </xsl:template>
125
126
127</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.