Latest web development tutorials

XSLT document () function

XSLT Function Reference objects Complete XSLT Function Reference objects

Definition and Usage

document () function is used to access external XML document nodes. External XML document must be valid and can be resolved.

One way to use this function is to find data in an external document. For example, we want to find the value corresponding degrees Fahrenheit value, we visited the documents contain pre-computed values:

<Xsl: value-of select = "document ( 'celsius.xml') / celsius / result [@ value = $ value]" />


grammar

node-set document(object,node-set?)

parameter

参数 描述
object 必需。定义外部 XML 文档的 URI。
node-set 可选。用于解析相对 URI。


XSLT Function Reference objects Complete XSLT Function Reference objects