cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/samples/ldap ldap.xml ldap.xsl README
Date Tue, 04 Apr 2000 13:41:30 GMT
stefano     00/04/04 06:41:30

  Modified:    samples/ldap ldap.xml ldap.xsl
  Removed:     samples/ldap README
  Log:
  better LDAP example that should work out-of-the-box
  
  Revision  Changes    Path
  1.3       +11 -10    xml-cocoon/samples/ldap/ldap.xml
  
  Index: ldap.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/samples/ldap/ldap.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ldap.xml	1999/12/23 01:31:27	1.2
  +++ ldap.xml	2000/04/04 13:41:29	1.3
  @@ -1,20 +1,21 @@
   <?xml version="1.0"?>
   
  +<?xml-stylesheet href="ldap1.xsl" type="text/xsl"?>
  +
   <?cocoon-process type="ldap"?>
  -<?cocoon-format type="text/xml"?>
  +<?cocoon-process type="xslt"?>
   
   <page>
   
  - <ldapdefs>
  -  <server name="searchlight">
  + <ldap-defs>
  +  <ldap-server name="searchlight">
      <initializer>com.sun.jndi.ldap.LdapCtxFactory</initializer>
  -   <ldapserverurl>ldap://dir.skyway.nsa:389</ldapserverurl>
  -   <ldapsearchbase>o=U.S. Government, c=US</ldapsearchbase>
  -  </server>
  - </ldapdefs>
  +   <ldap-serverurl>ldap://ldap.weber.edu</ldap-serverurl>
  +  </ldap-server>
  + </ldap-defs>
   
  - <query server="searchlight">
  -	uid=jmbirch
  - </query>
  + <ldap-query server="searchlight" ldap-searchbase="">
  +	sn=*Green*
  + </ldap-query>
   
   </page>
  
  
  
  1.6       +58 -61    xml-cocoon/samples/ldap/ldap.xsl
  
  Index: ldap.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/samples/ldap/ldap.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ldap.xsl	2000/03/01 16:05:35	1.5
  +++ ldap.xsl	2000/04/04 13:41:30	1.6
  @@ -1,7 +1,9 @@
   <?xml version="1.0"?>
   
  -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  +<!-- Written by James Birchfield "jmbirchfield@proteus-technologies.com" -->
   
  +<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
  +
     <xsl:template match="page">
      <xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction>
      <html>
  @@ -10,72 +12,67 @@
         LDAP Search Results
        </title>
       </head>
  -    <body bgcolor="#ffffff">
  -     <xsl:apply-templates/>
  +    <body bgcolor="#404040">
  +			<center>
  +		<h1><font color="cornsilk">LDAP Search Results</font></h1>
  +			<table width="80%" bgcolor="#000000" border="0" cellspacing="0" cellpadding="0">
  +				<tr>
  +					<td>
  +						<xsl:apply-templates/>
  +					</td>
  +				</tr>
  +			</table>
  +		</center>
       </body>
      </html>
     </xsl:template>
   
  - <xsl:template match="searchresult">
  -	<table cellspacing="0" cellpadding="6">
  -     <xsl:apply-templates select="cn"/>
  -     <xsl:apply-templates select="currentorganization"/>
  -     <xsl:apply-templates select="mail"/>
  -     <xsl:apply-templates select="telephonenumber"/>
  -     <xsl:apply-templates select="securephonenumber"/>
  + <xsl:template match="ldapsearch/searchresult">
  +	<table cellspacing="0" bordercolor="#000000" bgcolor="#000000" border="1" width="100%"
cellpadding="0" cellspacing="0">
  +		<tr>
  +			<th colspan="2" bgcolor="tan">
  +				<xsl:value-of select="@ID"/>
  +			</th>
  +		</tr>
  +		<tr>
  +			<th width="20%" align="left" bgcolor="#a0a0a0">
  +				<xsl:text>p. </xsl:text><xsl:value-of select="telephonenumber"/><br/>
  +				<xsl:text>f. </xsl:text><xsl:value-of select="facsimiletelephonenumber"/><br/>
  +			</th>
  +			<td bgcolor="#ffffff" width="80%">
  +				<table border="0">
  +					<tr>
  +						<td>
  +							<xsl:value-of select="sn"/> <xsl:text>, </xsl:text> <xsl:value-of
select="givenname"/>
  +						</td>
  +					</tr>
  +					<tr>
  +						<td>
  +							<xsl:value-of select="ou"/>
  +						</td>
  +					</tr>
  +					<tr>
  +						<td>
  +							<xsl:value-of select="title"/>
  +						</td>
  +					</tr>
  +				</table>
  +			</td>
  +		</tr>
  +		<tr>
  +			<td colspan="2" bgcolor="#d0d0d0">
  +				<xsl:text>E-mail address: </xsl:text>
  +					<a>
  +						<xsl:attribute name="href">
  +							<xsl:text>mailto:</xsl:text><xsl:value-of select="mail"/>
  +						</xsl:attribute>
  +						<xsl:value-of select="mail"/>
  +					</a>
  +			</td>
  +		</tr>
   	</table>
   	<p/>
  -  </xsl:template>
  -
  - <xsl:template match="cn">
  -	<tr>
  -	 <th bgcolor="tan" align="right">Common Name</th>
  -	 <td>
  -      <xsl:apply-templates/>
  -	 </td>
  -	</tr>
  -  </xsl:template>
  -
  - <xsl:template match="currentorganization">
  -	<tr>
  -	 <th bgcolor="tan" align="right">Org</th>
  -	 <td>
  -      <xsl:apply-templates/>
  -	 </td>
  -	</tr>
  -  </xsl:template>
  -
  - <xsl:template match="telephonenumber">
  -	<tr>
  -	 <th bgcolor="tan" align="right">Unsecure #</th>
  -	 <td>
  -      <xsl:apply-templates/>
  -	 </td>
  -	</tr>
  -  </xsl:template>
  -
  - <xsl:template match="securephonenumber">
  -	<tr>
  -	 <th bgcolor="tan" align="right">Secure #</th>
  -	 <td>
  -      <xsl:apply-templates/>
  -	 </td>
  -	</tr>
     </xsl:template>
  -
  - <xsl:template match="mail">
  -	<tr>
  -	 <th bgcolor="tan" align="right">E-mail</th>
  -	 <td>
  -      <a>
  -	   <xsl:attribute name="href">
  -        mailto:<xsl:apply-templates/>
  -	   </xsl:attribute>
  -       <xsl:apply-templates/>
  -	  </a>
  -	 </td>
  -	</tr>
  -  </xsl:template>
  -
  + 
   </xsl:stylesheet>
   
  
  
  

Mime
View raw message