Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: third_party/xdg-utils/scripts/xsl/sharedmime2mimelnk.xsl

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info">
5 <xsl:output method="text"
6 encoding="UTF-8"
7 indent="no"/>
8 <xsl:template match="/">
9 <xsl:for-each select='mime:mime-info/mime:mime-type[@type=$type]'>
10 <xsl:text>[Desktop Entry]&#10;</xsl:text>
11 <xsl:text># Installed by xdg-mime from </xsl:text><xsl:value-of select=" $source"/><xsl:text>&#10;</xsl:text>
12 <xsl:text>Type=MimeType&#10;</xsl:text>
13 <xsl:text>MimeType=</xsl:text><xsl:value-of select="@type"/><xsl:text>&# 10;</xsl:text>
14 <xsl:text>Icon=</xsl:text><xsl:value-of select="translate(@type,'/','-') "/><xsl:text>&#10;</xsl:text>
15 <xsl:if test="mime:sub-class-of">
16 <xsl:text>X-KDE-IsAlso=</xsl:text><xsl:value-of select="mime:sub-clas s-of/@type"/><xsl:text>&#10;</xsl:text>
17 </xsl:if>
18 <xsl:if test="mime:glob">
19 <xsl:text>Patterns=</xsl:text>
20 <xsl:for-each select='mime:glob[@pattern]'>
21 <xsl:value-of select="@pattern"/><xsl:text>;</xsl:text>
22 </xsl:for-each>
23 <xsl:text>&#10;</xsl:text>
24 </xsl:if>
25 <xsl:text>Comment=</xsl:text><xsl:value-of select="mime:comment[not(@xml :lang)]"/><xsl:text>&#10;</xsl:text>
26 <xsl:for-each select='mime:comment[@xml:lang]'>
27 <xsl:sort select='@xml:lang'/>
28 <xsl:text>Comment[</xsl:text><xsl:value-of select="@xml:lang"/><xsl:te xt>]=</xsl:text><xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
29 </xsl:for-each>
30 </xsl:for-each>
31 </xsl:template>
32 </xsl:stylesheet>
OLDNEW
« no previous file with comments | « third_party/xdg-utils/scripts/xsl/sharedmime-list.xsl ('k') | third_party/xdg-utils/tests/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698