<?xml version="1.0"?> 
<!--
Created by Joseph Reagle (W3C) September 2000
Based on http://www.w3.org/TR/2000/WD-P3P-20000510

0. Create the HTML page
1. The following data: //DATA-GROUP/ref[values] are collected for
2. the following puroses: //PURPOSE/*
3. That the data is distributed to //RECIPIENT 
4. and retained for the following reason //RETENTION
5. The users has //ACCESS to the data
6. If the users has any disputes or concerns regarding the privacy practices
the should contact the $resolution-type <a href="$service">$short-description
-->

<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:p3p="http://www.w3.org/2000/P3Pv1">

<xsl:template match="/">
   <html>
      <xsl:apply-templates select="/p3p:POLICY"/>
   </html>
</xsl:template>

<xsl:template match="p3p:POLICY">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>Autogenerated Natural Language P3P Statement</title>
      <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/base" />
      <style>
      <xsl:comment>
      body { background-color: rgb(204,230,230) }
      .explaination { background-color: rgb(204,230,230)}
      .practices {background-color: white }
      </xsl:comment>
      </style>
   </head>
   <body>
   <div class="explaination">
      <h1><xsl:value-of select="p3p:ENTITY/p3p:DATA-GROUP/p3p:DATA[@ref='#business.name']" />
      P3P Privacy Practices.</h1>
      <p>This page is an automatically generated English version of
      <xsl:value-of select="p3p:ENTITY/p3p:DATA-GROUP/p3p:DATA[@ref='#business.name']" />'s
      P3P Privacy statement. That means that this page is basically what your P3P
      agent (your Web browser) is being told the site's privacy practices are.
      Consequently, it might not explain the practices in context as well as the
      <a href="{/p3p:POLICY/@discuri}">privacy practices written for
      humans</a>, but the benefit is that it is very explicit. 
      </p>
      </div>

      <div class="practices">
      <!-- output CONSEQUENCE if it exists -->
      <xsl:apply-templates select="p3p:STATEMENT/p3p:CONSEQUENCE"/>

      <!-- output the data purposes -->
      <p><xsl:value-of select="p3p:ENTITY/p3p:DATA-GROUP/p3p:DATA[@ref='#business.name']" />
      uses the following information:</p>
      <ul>
         <xsl:for-each select="p3p:STATEMENT/p3p:DATA-GROUP/p3p:DATA[@ref]">
            <li><xsl:value-of select="@ref"/></li>
         </xsl:for-each>
      </ul>

      <!-- instantiate the ACCESS template below -->
      <xsl:apply-templates select="p3p:ACCESS"/>

      <!-- instantiate the PURPOSE template below -->
      <xsl:apply-templates select="p3p:STATEMENT/p3p:PURPOSE"/>

      <!-- instantiate the RECIPIENT template below -->
      <xsl:apply-templates select="p3p:STATEMENT/p3p:RECIPIENT"/>

      <!-- instantiate the RETENTION template below -->
      <xsl:apply-templates select="p3p:STATEMENT/p3p:RETENTION"/>
      
      <!-- instantiate the DISPUTES-GROUP template below -->
      <xsl:apply-templates select="p3p:DISPUTES-GROUP"/>

      <!-- output the business contact info -->
      <p>Contact information for <xsl:value-of select="p3p:ENTITY/p3p:DATA-GROUP/p3p:DATA[@ref='#business.name']" />
      follows:
      <quote>
         <xsl:for-each select="p3p:ENTITY/p3p:DATA-GROUP/p3p:DATA[@ref]">
         <dd><xsl:value-of select="." /></dd>
         </xsl:for-each>
      </quote></p>
   </div>      
   </body>
</xsl:template>

   <!-- Template for outputing CONSEQUENCE -->
      <xsl:template match="p3p:CONSEQUENCE">
      <p>
      <xsl:value-of select="//p3p:ENTITY/p3p:DATA-GROUP/p3p:DATA[@ref='#business.name']" />
      collects this information with the intended consequence of: <xsl:value-of select="text()" />
      </p>
   </xsl:template>


   <!-- Template for outputing DISPUTES-GROUP -->
      <xsl:template match="p3p:DISPUTES-GROUP">
      <p><img align="left" src="{p3p:DISPUTES/p3p:IMG[@src]}" />If you have any concerns with
      (or would like to <a href="http://www.w3.org/TR/P3P/#DISPUTES">dispute</a>)
      our treatment of your information under this privacy policy, you can contact
      <a href="{p3p:DISPUTES/@service}"><xsl:value-of select="p3p:DISPUTES/@short-description" /></a>, a <xsl:value-of
      select="p3p:DISPUTES/@resolution-type" /> dispute resolution service.
      <xsl:apply-templates/> </p> <!-- disclose the remedies -->
   </xsl:template>

      <!-- Template for outputing DISPUTES-GROUP/REMEDIES -->
         <xsl:template match="p3p:REMEDIES">
         In the event the the dispute service accepts your claim the remedies
         available to you inlude:
         <ul><xsl:apply-templates/></ul>
         </xsl:template>
      
         <xsl:template match="p3p:correct">
           <li>Errors or wrongful actions arising in connection with the
           privacy policy will be remedied by the service. </li>
         </xsl:template>
         <xsl:template match="p3p:money">
           <li>If the service provider violates its privacy policy it will
           pay the individual an amount specified in the human readable
           privacy policy or the amount of damages. </li>
         </xsl:template>
         <xsl:template match="p3p:law">
           <li>Remedies for breaches of the policy statement will be determined
           based on the law referenced in the human readable description. </li>
         </xsl:template>

   <!-- Template for outputing ACCESS -->
      <xsl:template match="p3p:ACCESS">
      <p>We provide you the following <a href="http://www.w3.org/TR/P3P/#ACCESS">access</a>
      (the ability to view identifiable information and address questions or
      concerns):
      <ul><xsl:apply-templates/></ul></p>
      </xsl:template>
      

      <xsl:template match="p3p:nonident">
        <li>Identifiable Data is Not Used </li>
      </xsl:template>
      <xsl:template match="p3p:all">
        <li>All Identifiable Information: access is given to all identifiable information. </li>
      </xsl:template>
      <xsl:template match="p3p:contact_and_other">
        <li>Identifiable Contact Information and Other Identifiable Information:
        access is given to identifiable online and physical contact information
        as well as to other information linked to an identifiable person. </li>
      </xsl:template>
      <xsl:template match="p3p:ident_contact">
        <li>Identifiable Contact Information: access is given to identifiable
        online and physical contact information (e.g., users can access
        things such as a postal address). </li>
      </xsl:template>
      <xsl:template match="p3p:other_ident">
        <li>Other Identifiable Information: access is given to certain other
        information linked to an identifiable person (e.g., users can
        access things such as their online account charges). </li>
      </xsl:template>
      <xsl:template match="p3p:none">
        <li>None: no access to identifiable information is given. </li>
      </xsl:template>
  

   <!-- Template for outputing PURPOSES -->
      <xsl:template match="p3p:PURPOSE">
      <p>This data is collected for the 
      <a href="http://www.w3.org/TR/P3P/#PURPOSE">purposes</a> of
      <ul><xsl:apply-templates/></ul></p>
   </xsl:template>

      <xsl:template match="p3p:current">
        <li>Completion and Support of Current Activity</li>
      </xsl:template>
      <xsl:template match="p3p:admin">
        <li>Web Site and System Administration</li>
      </xsl:template>
      <xsl:template match="p3p:develop">
        <li>Research and Development</li>
      </xsl:template>
      <xsl:template match="p3p:customization">
        <li>Affirmative Customization</li>
      </xsl:template>
      <xsl:template match="p3p:tailoring">
        <li>One-time Tailoring</li>
      </xsl:template>
      <xsl:template match="p3p:pseudonym">
        <li>Pseudononymous Profiling</li>
      </xsl:template>
      <xsl:template match="p3p:profiling">
        <li>Individual Profiling </li>
      </xsl:template>
      <xsl:template match="p3p:contact">
        <li>Contacting Visitors for Marketing of Services or Products</li>
      </xsl:template>
      <xsl:template match="p3p:otherpurposes">
        <li>and &quot;<xsl:value-of select="." />&quot;</li>
      </xsl:template>


      <!-- Template for outputing RECIPIENTs -->
      <xsl:template match="p3p:RECIPIENT">
         <p>The data is shared with the following  
         <a href="http://www.w3.org/TR/P3P/#RECIPIENT">recipients</a>:
         <ul><xsl:apply-templates/></ul></p>
      </xsl:template>

      <xsl:template match="p3p:ours">
        <li>Ourselves and/or our agents</li>
      </xsl:template>
      <xsl:template match="p3p:delivery">
        <li>Delivery services possibly following different practices</li>
      </xsl:template>
      <xsl:template match="p3p:same">
        <li>Legal entities following our practices</li>
      </xsl:template>
      <xsl:template match="p3p:other-recipient">
        <li>Legal entities following different practices</li>
      </xsl:template>
      <xsl:template match="p3p:unrelated">
        <li>Unrelated third parties</li>
      </xsl:template>
      <xsl:template match="p3p:pseudonym">
        <li>Pseudononymous Profiling</li>
      </xsl:template>
      <xsl:template match="p3p:public">
        <li>Public fora</li>
      </xsl:template>

      <!-- Template for outputing RETENTION -->
      <xsl:template match="p3p:RETENTION">
         <p>The data is  
         <a href="http://www.w3.org/TR/P3P/#RETENTION">retained</a> as follows:
         <ul><xsl:apply-templates/></ul></p>
      </xsl:template>

      <xsl:template match="p3p:no-retention">
        <li>No Retention:
            Information is not retained for more than a brief period
            of time necessary to make use of it during the course
            of a single online interaction.
        </li>
      </xsl:template>
      <xsl:template match="p3p:stated-purpose">
        <li>For the stated purpose:
            Information is retained to meet the stated purpose. This
            requires information to be discarded at the earliest
            time possible. 
        </li>
      </xsl:template>
      <xsl:template match="p3p:legal-requirement">
        <li>As required by law or liability under applicable law:
            Information is retained to meet a stated purpose, but
            the retention period is longer because of a legal
            requirement or liability. 
        </li>
      </xsl:template>
      <xsl:template match="p3p:business-practices">
        <li>Determined by service provider's business practice:
            Information is retained under a service provider's stated
            business practices. Please see 
            <a href="{/p3p:POLICY/@discuri}"> 
               <xsl:value-of select="/p3p:POLICY/@discuri" />
            </a>
            for more information.
        </li>
      </xsl:template>
      <xsl:template match="p3p:indefinitely">
        <li>Indefinitely: Information is retained for an
            indeterminate period of time. 
        </li>
      </xsl:template>

</xsl:stylesheet>  

