Filename : /home/admin/www/dansemusique.net/statique/util/dyna/req_arr_adherents_xslt.php
<?php
 
function  xsl_str__e_mails()
{
// EOT=HEREDOX  'EOT'=NOWDOC
$xsl_str = <<<'EOT'
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet SYSTEM "../util/lib-xml-xsl/xsl-html.dtd">
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" 
            indent="no" 
            encoding="ISO-8859-1" 
            omit-xml-declaration = "yes" /> 
 
<xsl:preserve-space elements="no" />  
 
<xsl:template match="/">
 
<xsl:for-each select="adherents/adherent[valide='y']">
 
     <xsl:sort select="concat(@nom, @prenom)"
                order='ascending'
                data-type='text' />
 
	   <!-- Une virgule comme s�parateur, car un ; peut appara�tre dans une ECS pour un e-mails avec caract�res accentu�s -->
		<xsl:for-each select="./e_mails">
			<xsl:if test="e_mail[text()]"><xsl:value-of select="e_mail" />,</xsl:if>
		</xsl:for-each>
 
</xsl:for-each>
</xsl:template>
 
</xsl:stylesheet>
EOT;
 
return $xsl_str;
}
 
 
function  xsl_str__liste_element($dom_path, $element)
{
$xsl_text_function = 'text()';
$xsl_test = $element . '[' . $xsl_text_function . ']';
$xsl_str = <<<"EOT"
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet SYSTEM "../util/lib-xml-xsl/xsl-html.dtd">
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" 
            indent="no" 
            encoding="ISO-8859-1" 
            omit-xml-declaration = "yes" /> 
 
<xsl:preserve-space elements="no" />  
 
<xsl:template match="/">
 
<xsl:for-each select="adherents/adherent[valide='y']">
 
     <xsl:sort select="concat(@nom, @prenom)"
                order='ascending'
                data-type='text' />
 
		<xsl:for-each select="$dom_path">
			<xsl:if test="$xsl_test"><xsl:value-of select="$element" />,</xsl:if>
		</xsl:for-each>
 
</xsl:for-each>
</xsl:template>
 
</xsl:stylesheet>
EOT;
 
return $xsl_str;
}
 
 
function  xsl_str__liste_attribute($dom_path, $attribute)
{
$xsl_str = <<<"EOT"
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet SYSTEM "../util/lib-xml-xsl/xsl-html.dtd">
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" 
            indent="no" 
            encoding="ISO-8859-1" 
            omit-xml-declaration = "yes" /> 
 
<xsl:preserve-space elements="no" />  
 
<xsl:template match="/">
	<xsl:for-each select="$dom_path">
		<xsl:if test="not(@$attribute = '')"><xsl:value-of select="@$attribute" />,</xsl:if>
	</xsl:for-each>
</xsl:template>
 
</xsl:stylesheet>
EOT;
 
return $xsl_str;
}
 
 
function  xsl_str__liste_adherents()
{
$xsl_str = <<<'EOT'
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet SYSTEM "../util/lib-xml-xsl/xsl-html.dtd">
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" 
            indent="no" 
            encoding="ISO-8859-1" 
            omit-xml-declaration = "yes" /> 
 
<xsl:preserve-space elements="no" />  
 
<xsl:template match="/">
 
<xsl:for-each select="adherents/adherent[valide='y']">
 
     <xsl:sort select="concat(@nom, @prenom)"
                order='ascending'
                data-type='text' />
 
		<xsl:for-each select=".">
		    <xsl:if test="not(@id_adh = '')"><![CDATA[   <option value="]]><xsl:value-of select="@id_adh" /><![CDATA[">]]><xsl:value-of select="@nom" /><![CDATA[ ]]><xsl:value-of select="@prenom" /><![CDATA[</option>
]]></xsl:if>
		</xsl:for-each>
 
</xsl:for-each>
</xsl:template>
 
</xsl:stylesheet>
EOT;
 
return $xsl_str;
}
 
 
function  xsl_str__liste_prof_uniq()
{
$xsl_str = <<<'EOT'
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet SYSTEM "../util/lib-xml-xsl/xsl-html.dtd">
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" 
            indent="no" 
            encoding="ISO-8859-1" 
            omit-xml-declaration = "yes" /> 
 
<xsl:preserve-space elements="no" />  
 
<xsl:key name="key_prof" match="activite" use="@professeur"/>
<xsl:template match="/"> <!-- generate-id(key('key_prof', @professeur)[1]) -->
	<xsl:for-each select="/adherents/adherent/activites/activite[generate-id() = generate-id(key('key_prof', @professeur)[1])]">
		<xsl:if test="not(@professeur = '')"><xsl:value-of select="@professeur" />,</xsl:if>
	</xsl:for-each>
</xsl:template>
 
</xsl:stylesheet>
EOT;
 
return $xsl_str;
}
 
?>

    Driven by DokuWiki Recent changes RSS feed        
   
Nous vous rappelons que vous disposez d'un droit d'accès, de modification, de rectification et de suppression des données qui vous concernent. Pour exercer ce droit, adressez-vous au webmaster .