Next / Previous / Contents / Shipman's homepage

12.2. document(): Pull in content from other documents

There is one optional argument:


where uri is the URI of a document. The return value is a node-set containing that document as a tree. If the argument is an empty string ('document("")'), you get back your own stylesheet (the one in which the document() call occurs) as a tree. This allows you to access content in another document (or your stylesheet) the same way you'd access the content of the input document: write template rules for that content and invoke it with xsl:apply-templates or xsl:call-template.