· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Doc Book Ko Xsl

<?xml version="1.0" encoding="euc-kr"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version='1.0'>

<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>

<!-- ´ÚºÏ ÇÑ±Û ½ºÅ¸ÀϽÃÆ® (http://kldp.net/projects/docbook/) -->
<!-- $Id: DocBookKoXsl,v 1.3 2005/03/07 05:20:12 kss Exp kss $ -->

<xsl:template name="person.name">
  <!-- Formats a personal name. Handles corpauthor as a special case. -->
  <xsl:param name="node" select="."/>
  <xsl:param name="lang">
    <xsl:choose>
      <xsl:when test="$node[@lang]">
        <xsl:value-of select="$node[@lang]"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="l10n.language"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:param>

  <xsl:variable name="style">
    <xsl:choose>
      <xsl:when test="$node/@role">
        <xsl:value-of select="$node/@role"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="gentext.template">
          <xsl:with-param name="context" select="'styles'"/>
          <xsl:with-param name="name" select="'person-name'"/>
        </xsl:call-template>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>

  <xsl:choose>
    <!-- the personname element is a specialcase -->
    <xsl:when test="$node/personname">
      <xsl:call-template name="person.name">
        <xsl:with-param name="node" select="$node/personname"/>
      </xsl:call-template>
    </xsl:when>

    <!-- handle corpauthor as a special case...-->
    <xsl:when test="name($node)='corpauthor'">
      <xsl:apply-templates select="$node"/>
    </xsl:when>

    <xsl:otherwise>
      <xsl:choose>
        <xsl:when test="$style = 'family-given'">
          <xsl:call-template name="person.name.family-given">
            <xsl:with-param name="node" select="$node"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$style = 'last-first'">
          <xsl:call-template name="person.name.last-first">
            <xsl:with-param name="node" select="$node"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:when test="$lang='ko' or $lang='zh_cn' or $lang='zh_tw'">
          <xsl:call-template name="person.name.familygiven">
            <xsl:with-param name="node" select="$node"/>
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:call-template name="person.name.first-last">
            <xsl:with-param name="node" select="$node"/>
          </xsl:call-template>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

<xsl:template name="person.name.familygiven">
  <xsl:param name="node" select="."/>

  <xsl:apply-templates select="$node//surname[1]"/>
  <xsl:apply-templates select="$node//firstname[1]"/>

</xsl:template>

<xsl:output method="html" indent="yes"/>

</xsl:stylesheet>



ID
Password
Join
A plucked goose doesn't lay golden eggs.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-03-07 14:20:12
Processing time 0.0028 sec