XML with JAVA chapter 10 XSL XSL XSL

  • Slides: 12
Download presentation
XML with JAVA

XML with JAVA

chapter 10 : XSL

chapter 10 : XSL

XSL의 기초 설정법 Ø XSL 문서 l XSL 선언부 <? xml version=“ 1. 0”

XSL의 기초 설정법 Ø XSL 문서 l XSL 선언부 <? xml version=“ 1. 0” encoding=“euc-kr”? > xml 문서의 선언부와 같다. 즉, xml 스펙을 준수한다. l stylesheet 엘리먼트 <xsl: stylesheet xmlns: xsl=http: //www. w 3. org/1999/XSL/Transform version=“ 1. 0”>

XSL의 기초 설정법 Ø XML 문서에 적용 <? xml version=“ 1. 0” encoding=“euc-kr”? >

XSL의 기초 설정법 Ø XML 문서에 적용 <? xml version=“ 1. 0” encoding=“euc-kr”? > <? xml stylesheet type=“text/xsl” href=“~. xsl”? > Ø apply-templates 특정 노드에 변환 규칙을 적용할 경우 사용 <xsl: apply-templates select=“패턴”/> Ø value-of 특정한 노드의 값을 가져올 때 사용 예제참조(ch 10_1. xsl, ch 10_1. xml)

XSL의 제어문 Ø 정렬하기 <xsl: sort select=“정렬기준 노드” data-type=“정렬시킬 노드 의 데이터타입 (“text”|”number”) order=“정렬방식(“ascending”|”descending”/>

XSL의 제어문 Ø 정렬하기 <xsl: sort select=“정렬기준 노드” data-type=“정렬시킬 노드 의 데이터타입 (“text”|”number”) order=“정렬방식(“ascending”|”descending”/> <xsl: apply-templates select=“/memberlist/member”> <xsl: sort select=“name”/> <xsl: sort select=“@kind”/> <xsl: apply-templates> 예제참조(ch 10_5. xsl, ch 10_5. xml)