<commit_before><?xml version="1.0" encoding="iso-8859-1"?>


<!--
	This stylesheet converts a notification message to a named stylesheet.
-->


<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xslt="http://apache.org/cocoon/lenya/xslt/1.0"
    xmlns:not="http://apache.org/cocoon/lenya/notification/1.0"
    xmlns="http://www.w3.org/1999/xhtml"
    >
    
<xsl:param name="server-uri"/>
<xsl:param name="document-url"/>
    
<xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>
    
<xsl:template match="/">
	<xslt:stylesheet exclude-result-prefixes="not">
		<xsl:apply-templates/>
	</xslt:stylesheet>
</xsl:template>
		
		
<xsl:template match="/not:notification[not(@enabled = 'true')]">
	
	<xslt:template match="not:notification"/>
	<xslt:template match="not:notification-subject"/>
	<xslt:template match="not:notification-comment"/>
		
	<xslt:template match="@*|node()">
		<xslt:copy><xslt:apply-templates select="@*|node()"/></xslt:copy>
	</xslt:template>
 
</xsl:template>
	
	
<xsl:template match="/not:notification[@enabled = 'true']">
	
	<xslt:template match="not:notification">
		<input type="hidden" name="notification.subject"
			value="{not:message/not:subject}"/>
		<div class="lenya-box">
			<div class="lenya-box-title">Notification</div>
			<div class="lenya-box-body">
			<table class="lenya-table-noborder">
				<tr>
					<td class="lenya-entry-caption">Recipient(s):</td>
					<td>
						<xslt:apply-templates/>
					</td>
				</tr>
				<tr>
					<td class="lenya-entry-caption">Comment:</td>
					<td>
						<textarea name="notification.message" class="lenya-form-element">
							<xsl:text/>
							<xsl:apply-templates select="not:message/not:body"/>
							<xsl:text>&#160;</xsl:text>
						</textarea>
					</td>
				</tr>
			</table>	
			</div>
		</div>
	</xslt:template>
	
	
	<xslt:template match="not:select">
		<select name="notification.tolist" class="lenya-form-element">
			<xslt:for-each select="not:users/not:user">
				<option>
					<xslt:attribute name="value"><xslt:value-of select="@email"/></xslt:attribute>
					<xslt:value-of select="@id"/>
					<xslt:if test="@name != ''">&#160;(<xslt:value-of select="@name"/>)</xslt:if>
				</option>
			</xslt:for-each>
		</select>
	</xslt:template>
	
	
	<xslt:template match="not:textarea">
		<textarea name="notification.tolist" class="lenya-form-element">&#160;</textarea>
	</xslt:template>
	
	
	<xslt:template match="not:preset">
		<xslt:variable name="user" select="not:users/not:user"/>
		<input type="hidden" name="notification.tolist">
			<xslt:attribute name="value"><xslt:value-of select="$user/@email"/></xslt:attribute>
		</input> 
		<span style="white-space: nobreak">
			<xslt:value-of select="$user/@id"/>
			<xslt:if test="@name != ''">&#160;(<xslt:value-of select="$user/@name"/>)</xslt:if>
		</span>
	</xslt:template>
	
	
	<xslt:template match="@*|node()">
		<xslt:copy><xslt:apply-templates select="@*|node()"/></xslt:copy>
	</xslt:template>
 
</xsl:template>


<xsl:template match="not:body">
	<xsl:apply-templates select="node()"/>
</xsl:template>

<xsl:template match="not:body/text()"><xsl:value-of select="."/></xsl:template>

<xsl:template match="not:document-url">
	<xsl:value-of select="$server-uri"/><xsl:value-of select="$document-url"/>
</xsl:template>
	

</xsl:stylesheet>
<commit_msg>added option [no notification] for combobox<commit_after><?xml version="1.0" encoding="iso-8859-1"?>


<!--
	This stylesheet converts a notification message to a named stylesheet.
-->


<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xslt="http://apache.org/cocoon/lenya/xslt/1.0"
    xmlns:not="http://apache.org/cocoon/lenya/notification/1.0"
    xmlns="http://www.w3.org/1999/xhtml"
    >
    
<xsl:param name="server-uri"/>
<xsl:param name="document-url"/>
    
<xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>
    
<xsl:template match="/">
	<xslt:stylesheet exclude-result-prefixes="not">
		<xsl:apply-templates/>
	</xslt:stylesheet>
</xsl:template>
		
		
<xsl:template match="/not:notification[not(@enabled = 'true')]">
	
	<xslt:template match="not:notification"/>
	<xslt:template match="not:notification-subject"/>
	<xslt:template match="not:notification-comment"/>
		
	<xslt:template match="@*|node()">
		<xslt:copy><xslt:apply-templates select="@*|node()"/></xslt:copy>
	</xslt:template>
 
</xsl:template>
	
	
<xsl:template match="/not:notification[@enabled = 'true']">
	
	<xslt:template match="not:notification">
		<input type="hidden" name="notification.subject"
			value="{not:message/not:subject}"/>
		<div class="lenya-box">
			<div class="lenya-box-title">Notification</div>
			<div class="lenya-box-body">
			<table class="lenya-table-noborder">
				<tr>
					<td class="lenya-entry-caption">Recipient(s):</td>
					<td>
						<xslt:apply-templates/>
					</td>
				</tr>
				<tr>
					<td class="lenya-entry-caption">Comment:</td>
					<td>
						<textarea name="notification.message" class="lenya-form-element">
							<xsl:text/>
							<xsl:apply-templates select="not:message/not:body"/>
							<xsl:text>&#160;</xsl:text>
						</textarea>
					</td>
				</tr>
			</table>	
			</div>
		</div>
	</xslt:template>
	
	
	<xslt:template match="not:select">
		<select name="notification.tolist" class="lenya-form-element">
		  <option value="">[no notification]</option>
			<xslt:for-each select="not:users/not:user">
				<option>
					<xslt:attribute name="value"><xslt:value-of select="@email"/></xslt:attribute>
					<xslt:value-of select="@id"/>
					<xslt:if test="@name != ''">&#160;(<xslt:value-of select="@name"/>)</xslt:if>
				</option>
			</xslt:for-each>
		</select>
	</xslt:template>
	
	
	<xslt:template match="not:textarea">
		<textarea name="notification.tolist" class="lenya-form-element">&#160;</textarea>
	</xslt:template>
	
	
	<xslt:template match="not:preset">
		<xslt:variable name="user" select="not:users/not:user"/>
		<input type="hidden" name="notification.tolist">
			<xslt:attribute name="value"><xslt:value-of select="$user/@email"/></xslt:attribute>
		</input> 
		<span style="white-space: nobreak">
			<xslt:value-of select="$user/@id"/>
			<xslt:if test="@name != ''">&#160;(<xslt:value-of select="$user/@name"/>)</xslt:if>
		</span>
	</xslt:template>
	
	
	<xslt:template match="@*|node()">
		<xslt:copy><xslt:apply-templates select="@*|node()"/></xslt:copy>
	</xslt:template>
 
</xsl:template>


<xsl:template match="not:body">
	<xsl:apply-templates select="node()"/>
</xsl:template>

<xsl:template match="not:body/text()"><xsl:value-of select="."/></xsl:template>

<xsl:template match="not:document-url">
	<xsl:value-of select="$server-uri"/><xsl:value-of select="$document-url"/>
</xsl:template>
	

</xsl:stylesheet>

{'fraction_non_alphanumeric': 0.22146859333529934, 'fraction_numerical': 0.01032143910350929, 'mean_word_length': 4.532626427406199, 'pattern_counts': {'":': 0, '<': 209, '<?xml version=': 2, '>': 209, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5521400', 'n_tokens_mistral': 2958, 'n_tokens_neox': 2411, 'n_words': 330}