-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmac_file_association.xslt
50 lines (42 loc) · 1.19 KB
/
mac_file_association.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="/plist/dict">
<dict>
<xsl:variable name="test" select="./key[text()='CFBundleDocumentTypes']"/>
<xsl:value-of select="$test"/>
<xsl:choose>
<xsl:when test="count($test) > 0 "/>
<xsl:otherwise>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeOSTypes</key>
<array>
<string>MM</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>FreeMindWindowIconModern-MM.icns</string>
<key>CFBundleTypeName</key>
<string>Mindmap</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>mm</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
<key>NSHighResolutionCapable</key><true/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
</dict>
</xsl:template>
<xsl:template match="/ | node() | @* | comment() | processing-instruction()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>