ms:schema-info-available 함수
현재 노드에 XSD 정보를 사용할 수 있을 경우 true
를 반환합니다.
boolean ms:schema-info-available()
설명
다음 식은 XSD 형식의 정보가 포함된 모든 노드에 대해 true
를 반환합니다.
"//*[ms:schema-info-available()]"
예제
다음 예제에서는 XSLT 템플릿 규칙을 사용하여 books.xml의 모든 요소를 선택하고 books.xsd에 정의된 대로 요소 데이터 형식 및 네임스페이스 URI를 출력합니다.
XML 파일(books.xml)
books.xml을 사용합니다.
XSD 파일(books.xsd)
books.xsd를 사용합니다.
HTML 파일(books.html)
HTML 파일은 ms:type-namespace-uri([node-set]) 함수 항목에 표시된 것과 같습니다.
XSLT 파일(books.xslt)
출력
x:catalog is of "" in ""
book is of "" in ""
author is of "string" in "http://www.w3.org/2001/XMLSchema"
title is of "string" in "http://www.w3.org/2001/XMLSchema"
genre is of "string" in "http://www.w3.org/2001/XMLSchema"
price is of "float" in "http://www.w3.org/2001/XMLSchema"
publish_date is of "date" in "http://www.w3.org/2001/XMLSchema"
description is of "string" in "http://www.w3.org/2001/XMLSchema"
description is of "string" in "http://www.w3.org/2001/XMLSchema"
모든 요소에 스키마 정보를 사용할 수 있기 때문에 다음 출력은 ms:type-namespace-uri
항목에 표시된 것과 같습니다.