<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="frwd_text"/>

<xsl:variable name="level_none">0</xsl:variable>
<xsl:variable name="level_debug">1</xsl:variable>
<xsl:variable name="level_info">2</xsl:variable>
<xsl:variable name="level_notice">3</xsl:variable>
<xsl:variable name="level_warn">4</xsl:variable>
<xsl:variable name="level_error">5</xsl:variable>
<xsl:variable name="level_critical">6</xsl:variable>
<xsl:variable name="level_fatal">7</xsl:variable>


  <xsl:template match="notification_header">To: <xsl:value-of select="to/text()"/>
From: RIPE Database Notifications &lt;<xsl:value-of select="from/text()"/>&gt;
Subject: Requested RIPE database object changes
Reply-To: ripe-dbm@ripe.net
  </xsl:template>


  <xsl:template match="mail_origin_of_request">
The mail message causing these failures had the following mail headers:

> From:     <xsl:value-of select="from/text()"/>
> Subject:  <xsl:value-of select="subject/text()"/>
> Date:     <xsl:value-of select="date/text()"/>
> Reply-To: <xsl:value-of select="reply_to/text()"/>
> MsgId:    <xsl:value-of select="msgid/text()"/>
<xsl:text>

</xsl:text>
  </xsl:template>

  <xsl:template match="ip_origin_of_request">
The update causing these changes had the following IP address:

 - From-Host: <xsl:value-of select="ip/text()"/>
 - Date/Time: <xsl:value-of select="../process_time/p_time/text()"/>
  </xsl:template>

  <xsl:template match="notif_message"><xsl:text>
  
</xsl:text>
<xsl:value-of select="message/text()"/>
  </xsl:template>

<!-- lists -->
  <xsl:template match="list">
<xsl:value-of select="text()"/><xsl:if test="not(position()=last())">, </xsl:if></xsl:template>

<!-- root node -->
  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>

  <xsl:template match="report">
     <xsl:apply-templates select="notification_header"/>
     
     <xsl:call-template name="intro"/><xsl:text>
</xsl:text>

     <xsl:call-template name="mail_from_msg"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="mail_origin_of_request" />
<xsl:apply-templates select="ip_origin_of_request" />

<xsl:call-template name="contact"/><xsl:text>

</xsl:text>

     <xsl:apply-templates select="notif_message"/>
  </xsl:template>



</xsl:stylesheet>
