<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="DAV:" xmlns:y="SAP:">
  <xsl:output method='html'/>
  <xsl:param name="resourcename"/>
  <xsl:param name="resourceid"/>
  <xsl:param name="parentlink"/>
  <xsl:param name="lastmodifieduser"/>  
  <xsl:param name="lastmodified"/>  
  <xsl:param name="righttoleft"/>
  <xsl:param name="event"/>
  


  <xsl:template match="/">
  <xsl:output encoding="UTF-8" />
  
  
<xsl:comment xml:space="preserve">


<xsl:apply-templates select="notification/title/textspan[@pEventid=$event]"><xsl:with-param name="outputFormat" select="'plaintext'"/></xsl:apply-templates>

</xsl:comment>
  

  <html><xsl:if test="$righttoleft='true'"><xsl:attribute name="dir">rtl</xsl:attribute></xsl:if>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>
	  <xsl:apply-templates select="notification/title/textspan[@pEventid=$event]"/>
	  <xsl:apply-templates select="notification/title/textspan[@pEventid='span1']"/>
	  </title>
	
    </head>
  </html>
  </xsl:template>

  <xsl:template match="textspan">
    <xsl:param name="outputFormat" select="'plaintext'"/>
	<xsl:apply-templates select="resourcename|resourceid|parentlink|lastmodifieduser|lastmodified|event|text()"><xsl:with-param name="outputFormat" select="$outputFormat"/></xsl:apply-templates>
  </xsl:template>


  <xsl:template match="text()">
    <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="."/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="."/></xsl:if>
  </xsl:template>

  <xsl:template match="resourcename">
    <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="$resourcename"/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="$resourcename"/></xsl:if>
  </xsl:template>

  <xsl:template match="parentlink">
    <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="$parentlink"/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="$parentlink"/></xsl:if>
  </xsl:template>
  
  <xsl:template match="lastmodifieduser">
    <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="$lastmodifieduser"/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="$lastmodifieduser"/></xsl:if>
  </xsl:template>
  
  <xsl:template match="lastmodified">
    <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="$lastmodified"/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="$lastmodified"/></xsl:if>
  </xsl:template>
  
    
  <xsl:template match="resourceid">
     <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="$resourceid"/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="$resourceid"/></xsl:if>
  </xsl:template>
 
 <xsl:template match="event">
    <xsl:param name="outputFormat" select="'plaintext'"/>
    <xsl:if test="$outputFormat='HTML'"><span tabindex="0"><xsl:value-of select="$event"/></span></xsl:if>
    <xsl:if test="not($outputFormat='HTML')"><xsl:value-of select="$event"/></xsl:if>
  </xsl:template>
 
  
</xsl:stylesheet>
