Where is empathy-log.xsl?

0

Conversation logs saved by Empathy are in XML format. Each one links to a stylesheet "empathy-log.xsl":

<?xml-stylesheet type="text/xsl" href="empathy-log.xsl"?>

I've trawled my hard drive and the web but cannot find it (there is a empathy-log-manager.xsl but this is different). Does it even exist? If there is no such file I'll create my own but I'd rather use the one provided.

Tom Savage

Posted 2010-06-12T13:22:36.437

Reputation: 692

Answers

1

I also was unable to find empathy-log.xsl so I wrote my own. For anyone unable to do so I provide mine here:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" /> 
<xsl:template match="/">
 <html>
 <head>
 <style type="text/css">
 ul { list-style-type:none; padding:0; }
 li { border:0.15em solid #ddd; margin-bottom:0.6em; padding:0.3em 0.3em 0 0.3em; background-color:#ffc; font-size:smaller; font-weight:bold; }
 div { font-size:larger; font-weight:normal; border-top:0.1em solid #8F8FFF; padding:0.3em; }
 </style>
 </head>
 <body>
 <ul>
  <xsl:for-each select="log/message[position()=1 or @name != preceding-sibling::message[1]/@name]">
   <li>
    <xsl:value-of select="@name"/>
    <div><xsl:value-of select="."/></div>
    <xsl:call-template name="nextText" />
   </li>
  </xsl:for-each>
 </ul>
 </body>
 </html>
</xsl:template>

<xsl:template name="nextText">
 <xsl:if test="@name = following-sibling::message[1]/@name">
  <xsl:for-each select="following-sibling::message[1]">
   <div><xsl:value-of select="."/></div>
   <xsl:call-template name="nextText"/>
  </xsl:for-each>
 </xsl:if>
</xsl:template>
</xsl:stylesheet>

Copy this code into a file empathy-log.xsl in the same folder as your logfile and rename the logfile to an .xml file. Now open the file in your browser.

Daniel Calliess

Posted 2010-06-12T13:22:36.437

Reputation: 361

0

You can use the locate-command to get the path of a file:

$ locate empathy-log.xsl

Just to be sure you should update the file-database before using locate:

$ sudo updatedb

dmarth

Posted 2010-06-12T13:22:36.437

Reputation: 66

Thanks but I'm certain the file isn't on my machine. I tried using locate anyways but it returned nothing. – Tom Savage – 2010-06-12T13:40:33.807