Showing:

Documentation
Parameters
Used by
References
Imported modules
Imported from
Source

Table of Contents

Group by:

personal.xsl - main file

Main stylesheet personal.xsl
Documentation

Description

Created on: Oct 6, 2009

Author: unknown

Personal information transformation stylesheet.

For each person we present in a table representation information like:

  • Family name
  • Given name
  • Their manager
  • The subordinates

Imported modules
[ top ]
Stylesheet utility.xsl
Documentation

Description

Created on: Oct 6, 2009

Author: unknown

Utility functions that extract information about a person

Imported from
[ top ]
Template /
Documentation

Description

Generates the table in which the persons will be presented
Namespace No namespace
Match /
Mode #default
Import precedence 1
Source
<xsl:template match="/">
  <html>
    <xsl:element name="table">
      <xsl:attribute name="border">2</xsl:attribute>
      <tr>
        <xsl:attribute name="color">#FFFFFF</xsl:attribute>
        <xsl:attribute name="bgcolor">#336666</xsl:attribute>
        <xsl:attribute name="align">center</xsl:attribute>
        <td>
          <font name="Arial" size="3">
            <b>Name</b>
          </font>
        </td>
        <td>
          <font name="verdana" size="3">
            <b>Email</b>
          </font>
        </td>
        <td>
          <font name="verdana" size="3">
            <b>Link</b>
          </font>
        </td>
      </tr>
      <xsl:apply-templates/>
    </xsl:element>
  </html>
</xsl:template>
Stylesheet location personal.xsl
[ top ]
Template //person
Documentation

Description

Extract information about a person
Namespace No namespace
Match //person
Mode #default
References
Import precedence 1
Source
<xsl:template match="//person">
  <xsl:element name="tr">
    <xsl:attribute name="align">center</xsl:attribute>
    <xsl:element name="td">
      <font name="verdana" size="3">
        <xsl:attribute name="width">120</xsl:attribute>
        <i>
          <xsl:value-of select="f:getDisplayName(.)"/>
        </i>
      </font>
    </xsl:element>
    <xsl:element name="td">
      <xsl:attribute name="width">120</xsl:attribute>
      <font name="verdana" size="3">
        <xsl:value-of select="email/text()"/>
      </font>
    </xsl:element>
    <xsl:element name="td">
      <xsl:call-template name="subordinatesManagerInfo">
        <xsl:with-param name="person" select="."/>
      </xsl:call-template>
    </xsl:element>
  </xsl:element>
</xsl:template>
Stylesheet location personal.xsl
[ top ]
Template subordinatesManagerInfo
Documentation

Description

Generates information about the subordinates and the manager of the given person.

Parameters

person The person for which to generate the information

Namespace No namespace
Used by
Template //person
Parameters
QName Namespace
person No namespace
Import precedence 1
Source
<xsl:template name="subordinatesManagerInfo">
  <xsl:param name="person"/>
  <font color="black" name="verdana" size="3">
    <xsl:value-of select="./link/@subordinates"/>
    <xsl:value-of select="./link/@manager"/>
  </font>
</xsl:template>
Stylesheet location personal.xsl
[ top ]
Function f:getDisplayName
Documentation

Description

Builds a string representation of the name of the person to be displayed.

Parameters

person The person for which to compute a display name

Return

A display form of the name of that person
Namespace functions.namespace
Type xs:string
Used by
Template //person
Parameters
QName Namespace
person No namespace
Import precedence 0
Source
<xsl:function as="xs:string" name="f:getDisplayName" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xsl:param name="person"/>
  <xsl:value-of select="$person/name/family/text()"/>
  <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
  <xsl:value-of select="$person/name/given/text()"/>
</xsl:function>
Stylesheet location utility.xsl
[ top ]
Output (default)
Namespace No namespace
Output properties
method encoding indent
xhtml UTF-8 yes
Source
<xsl:output encoding="UTF-8" exclude-result-prefixes="f" indent="yes" method="xhtml"/>
Stylesheet location personal.xsl
[ top ]