목록으로 2012.11.23. 15:36
XML

124

youtube

<?xml version="1.0" encoding="euc-kr"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
  <head><title>XSL 연습 </title></head>
  <body>
  <center>
  <xsl:variable name="bCount" select="count(//회원)"/>
  <xsl:variable name="bTotal" select="sum(//월저축액)"/>
  <xsl:variable name="bAverage" select="$bTotal div $bCount"/>
  <h1> 주 소 록 </h1>
  <hr/>
  <table border="1">
  <tr>
       <th bgcolor="ssee11" rowspan="2"> 번호 </th>
       <th bgcolor="wwee22" rowspan="2"> 이름 </th>
       <th bgcolor="rree33" rowspan="2"> 생년월일 </th>
       <th bgcolor="ggee44" colspan="2"> 연락처 </th>
       <th bgcolor="ffee55" rowspan="2"> 월저축액 </th>
       <th bgcolor="ffee22" rowspan="2"> 나이 </th>
  </tr>
  <tr>
       <th bgcolor="eegg01"> 전화번호</th>
       <th bgcolor="eegg22"> 주소</th>
  </tr>
  <xsl:apply-templates select="주소록/회원"/>
  <tr>
  <td align="center" colspan="2">인원수</td>
  <td align="center" colspan="2"><xsl:value-of select="$bCount"/>명</td>
  <td align="center" colspan="2">월저축액 합계 :<xsl:value-of select="format-number($bTotal,'###,###')"/> 원<br/> </td>
  <td align="center" colspan="1">월저축액 평균 :<xsl:value-of select="format-number($bAverage,'###,###')"/> 원<br/> </td>

  </tr>
  </table>
  </center>
  </body>
  </html>
  </xsl:template>

 <xsl:template match="회원">
 <tr>
    <td align="center"><xsl:number/></td>
    <td><xsl:value-of select="이름"/></td>
    <td><xsl:value-of select="생일/년"/>.
        <xsl:value-of select="생일/월"/>.
        <xsl:value-of select="생일/일"/>.</td>
    <td><xsl:value-of select="연락처/전화"/></td>
    <td><xsl:value-of select="연락처/주소1"/>
        <xsl:value-of select="연락처/주소2"/></td>
    <td align="right"><xsl:value-of select="format-number(월저축액,'###,###')"/></td>
    <td align="center"><xsl:value-of select="2012-number(생일/년)"/>세</td>
 </tr>
 </xsl:template>
 </xsl:stylesheet>
 
 
   

 

댓글 0

댓글 작성 권한이 없습니다. 로그인하기

NO
TITLE
섬네일
C언어
profile 너에게제공 | 11. 29 | 조회
57
C언어 B
C언어
profile 너에게제공 | 11. 29 | 조회
56
C언어 A
C언어
profile 너에게제공 | 11. 29 | 조회
55
C언어 백업
| 11. 27 | 조회
54
XML
124 | 11. 23 | 조회
53
XML 124
XML
dqw | 11. 23 | 조회 285
52
XML 124
profile 너에게제공 | 11. 23 | 조회
51
profile 너에게제공 | 11. 23 | 조회
50
C언어
asf | 11. 23 | 조회
49
C언어 af
C언어
profile 너에게제공 | 11. 22 | 조회
48
C언어 실습
C언어
| 11. 22 | 조회
47
C언어
C언어
profile 너에게제공 | 11. 22 | 조회
46
C언어 ㄹㅈ
C언어
profile 너에게제공 | 11. 22 | 조회
45
C언어 BMI
JSP
전장호 | 11. 21 | 조회
44
JSP f