다음을 통해 공유


name 함수

첫 번째 문서의 노드 집합 인수에서 노드의 확장 이름을 나타내는 QName이 포함된 문자열을 반환합니다.

string name(node-set?)

설명

QName은 노드에 적용된 네임스페이스에 대한 확장 이름을 나타내야 합니다. 그러나 여러 접두사가 같은 네임스페이스에 연결된 노드에 네임스페이스 선언이 적용된 경우 반드시 필요하지는 않습니다. 노드 집합 인수가 비어 있거나 첫 번째 노드에 확장 이름이 없을 경우 빈 문자열이 반환됩니다. 이 인수를 생략하면 유일한 멤버로 컨텍스트 노드가 있는 노드 집합을 기본값으로 설정합니다.

예제

XML 파일(bcat.xml)

XSLT 파일(sample.xsl)

보조 XSLT 파일(book-schema.xml)

서식이 지정된 출력

name() Function

b:catalog =

b:book =

b:author = Gambardella, Matthew

b:title = XML Developer's Guide

b:genre = Computer

b:price = 44.95

b:publish_date = 2000-10-01

b:description = An in-depth look at creating applications with XML.

b:book =

b:author = Ralls, Kim

b:title = Midnight Rain

b:genre = Fantasy

b:price = 5.95

b:publish_date = 2000-12-16

b:description = A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.

프로세서 출력

<html>

<body>

<h3>name() Function</h3>b:catalog = <br>b:book = <br>b:author = Gambardella, Matthew<br>b:title = XML Developer's Guide<br>b:genre = Computer<br>b:price = 44.95<br>b:publish_date = 2000-10-01<br>b:description = An in-depth look at creating applications with XML.<br>b:book = <br>b:author = Ralls, Kim<br>b:title = Midnight Rain<br>b:genre = Fantasy<br>b:price = 5.95<br>b:publish_date = 2000-12-16<br>b:description = A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.<br></body>

</html>

참고 항목

참조

XML 데이터 형식 참조