From 8a9944e03b60e75263c8b4918ded63ed3525de6a Mon Sep 17 00:00:00 2001
From: Nick Roy <nroy@internet2.edu>
Date: Wed, 24 Jan 2018 14:19:54 -0700
Subject: [PATCH] Added 'Complies' column

---
 lib/baseline_report_csv.xsl | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/lib/baseline_report_csv.xsl b/lib/baseline_report_csv.xsl
index 479ce82..7c07b38 100644
--- a/lib/baseline_report_csv.xsl
+++ b/lib/baseline_report_csv.xsl
@@ -31,6 +31,7 @@ IdPs:
 	  8. IdP Tech contact or NONE
 	  9. IdP Admin contact or NONE
 	  10. IdP Security contact or NONE
+	  11. IdP complies with baseline expectations "Y" or "N"
 	
 	The IdP Display Name field is set to "NONE" if neither mdui:DisplayName nor 
 	md:OrganizationDisplayName exist in the entity descriptor. The IdP Discovery 
@@ -50,6 +51,7 @@ SPs:
 	  8. SP Tech contact or NONE
 	  9. SP Admin contact or NONE
 	  10. SP Security contact or NONE
+	  11. SP complies with baseline expectations "Y" or "N"
 
 	The SP Display Name field is set to "NONE" if neither mdui:DisplayName nor
 	md:OrganizationDisplayName exist in the entity descriptor. The SP Discovery
@@ -82,7 +84,7 @@ SPs:
 
 	<!-- output the heading line -->
 	<xsl:template match="/">
-		<xsl:text>entityID,timestamp,Organization Display Name,Entity Type,Entity Display Name,Privacy URL,Logo Present,Tech Contact,Admin Contact,Security Contact</xsl:text>
+		<xsl:text>entityID,timestamp,Organization Display Name,Entity Type,Entity Display Name,Privacy URL,Logo Present,Tech Contact,Admin Contact,Security Contact,Complies</xsl:text>
 		<xsl:text>&#x0a;</xsl:text>
 		<xsl:apply-templates/>
 	</xsl:template>
@@ -234,6 +236,17 @@ SPs:
 			</xsl:otherwise>
 		</xsl:choose>
 		
+		<!-- output "Y" (complies) or "N" (does not comply) with baseline expectations -->
+		<xsl:text>,</xsl:text>
+		<xsl:choose>
+			<xsl:when test="$privacyURL != 'NONE' and $logo != '' and $techContact != '' and $adminContact != '' and ($rEFEDSSecurityContact != '' or $inCommonSecurityContact != '')">
+				<xsl:text>Y</xsl:text>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:text>N</xsl:text>
+			</xsl:otherwise>
+		</xsl:choose>
+		
 		<!-- output "hide" or "show" depending on the hide-from-discovery entity attribute -->
 <!--
 		<xsl:text>,</xsl:text>
@@ -403,6 +416,17 @@ SPs:
 				<xsl:text>NONE</xsl:text>
 			</xsl:otherwise>
 		</xsl:choose>
+		
+		<!-- output "Y" (complies) or "N" (does not comply) with baseline expectations -->
+		<xsl:text>,</xsl:text>
+		<xsl:choose>
+			<xsl:when test="$privacyURL != 'NONE' and $logo != '' and $techContact != '' and $adminContact != '' and ($rEFEDSSecurityContact != '' or $inCommonSecurityContact != '')">
+				<xsl:text>Y</xsl:text>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:text>N</xsl:text>
+			</xsl:otherwise>
+		</xsl:choose>
 
 		<!-- output the registrar ID -->
 <!--