금요일 사진 업로드 예정
1. 숙대 리더십교육
2. xxxxxxxxx
찍은 날은 중간고사 마지막 날
.. 최근사진중에 볼만한게 없어서 3월 사진 3장 더 ㄳ
(현재 판마로 대체) 수업중 도와줘요
금요일 사진 업로드 예정
1. 숙대 리더십교육
2. xxxxxxxxx
찍은 날은 중간고사 마지막 날
.. 최근사진중에 볼만한게 없어서 3월 사진 3장 더 ㄳ
지난주에 만들었던 booklist
employee에는 없는 새로운 개념이 다수 있으니 참고
- booklist.xml -
<?xml version="1.0" encoding="euc-kr"?>
<!-- XSL 문서 적용 -->
<?xml-stylesheet type="text/xsl" href="booklist.xsl"?>
<booklist>
<book id="b1" kind="computer">
<title>JSP And Servlet</title>
<author>이규미</author>
<publisher>인포북</publisher>
<price>25000</price>
</book>
<book id="b2" kind="computer">
<title>Inside XML</title>
<author>신민철</author>
<publisher>디지털북스</publisher>
<price>35000</price>
</book>
<book id="b3" kind="language">
<title>쉽게 배우는 영어</title>
<author>채규태</author>
<publisher>시사영어사</publisher>
<price>20000</price>
</book>
<book id="b4" kind="computer">
<title>XML 전자상거래</title>
<author>이종호</author>
<publisher>정보문화사</publisher>
<price>28000</price>
</book>
<book id="b5" kind="소설">
<title>사랑과 전쟁</title>
<author>이사랑</author>
<publisher>전쟁문화사</publisher>
<price>15000</price>
</book>
<book id="b6" kind="수필">
<title>사랑을 느끼세요</title>
<author>이사랑</author>
<publisher>사랑출판사</publisher>
<price>15000</price>
</book>
<book id="b7" kind="잡지">
<title>월간 중앙</title>
<author>중앙일보기자</author>
<publisher>중앙일보사</publisher>
<price>18000</price>
</book>
<book id="b8" kind="잡지">
<title>주간 경제지</title>
<author>조선일보기자</author>
<publisher>조선일보사</publisher>
<price>27000</price>
</book>
</booklist>
<xsl:template match='/'>
<html>
<body>
<h2><font color='blue'>Our Book's List</font></h2>
<table border='1' cellspacing='0' width='80%'>
<tr bgcolor='#ffff66'><th>title</th><th>kind</th><th>author</th><th>publisher</th><th>price</th></tr>
<xsl:apply-templates select='booklist/book'>
<xsl:sort select='price' data-type='number' order='ascending' />
</xsl:apply-templates>
<!--xsl:apply-templates select='booklist/book[@kind="잡지"]' mode='b'/-->
</table>
<p><xsl:call-template name='company'/></p>
</body></html>
</xsl:template>
<xsl:template match='//book'>
<tr>
<td><font color=''><xsl:value-of select='title'/></font></td>
<td><font color=''><xsl:value-of select='@kind'/></font></td>
<td><font color=''><xsl:value-of select='author'/></font></td>
<td><font color=''><xsl:value-of select='publisher'/></font></td>
<td><font color=''><xsl:value-of select='price'/></font></td>
</tr>
</xsl:template>
<!--
<xsl:template match='//book' mode='b'>
<tr>
<td><font color='red'><xsl:value-of select='title'/></font></td>
<td><font color='red'><xsl:value-of select='author'/></font></td>
</tr>
</xsl:template> -->
<xsl:template name='company'>
<font color='blue'>옥동자 소프트웨어</font>
</xsl:template>
</xsl:stylesheet>
수정판 (12 : 20)
- WEB306과는 다름
- Employees2.xml (04/16) -
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="employees.xsl"?>
<employees>
<employee id="123">
<name>Munson</name>
<salary payperiod="weekly">23500</salary>
<department>Development
<title>Developer</title>
</department>
</employee>
<employee id="124">
<name>Brown</name>
<salary payperiod="weekly">51000</salary>
<department>Human Resources
<title>Recruiter</title>
</department>
</employee>
<employee id="125">
<name>Philips</name>
<salary payperiod="bi-weekly">45000</salary>
<department>Development
<title>Tester</title>
</department>
</employee>
<employee id="126">
<name>Smith</name>
<salary payperiod="monthly">72000</salary>
<department>User Education
<title>Editor</title>
</department>
</employee>
</employees>
<xsl:template match='/'>
<html>
<body>
<table>
<tr><th>ID</th><th>name</th><th>salary</th><th>department</th><th>title</th><th>tax</th></tr>
<xsl:apply-templates select='employees/employee'>
<!-- xsl:sort select='salary' data-type='number' order='descending'/ -->
</xsl:apply-templates>
<!--xsl:apply-templates select='employees/employee[@id="125"]' mode='sin90'/-->
</table>
</body> </html>
</xsl:template>
<xsl:template match='//employee'>
<tr>
<td><xsl:value-of select='@id'/></td>
<td><xsl:value-of select='name'/></td>
<td><xsl:value-of select='salary'/></td>
<td><xsl:value-of select='department'/></td>
<td><xsl:value-of select='department/title'/></td>
<td>
<xsl:choose>
<xsl:when test='salary <= 20000'>low tax</xsl:when>
<xsl:when test='salary >= 50000'>high tax</xsl:when>
<xsl:otherwise>normal tax</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
ID | name | salary | department | title | tax |
---|---|---|---|---|---|
123 | Munson | 23500 | Development Developer | Developer | normal tax |
124 | Brown | 51000 | Human Resources Recruiter | Recruiter | high tax |
125 | Philips | 45000 | Development Tester | Tester | normal tax |
126 | Smith | 72000 | User Education Editor | Editor | high tax |