net.sf.saxon.functions

Class Document

public class Document extends SystemFunction implements XSLTFunction

Implements the XSLT document() function
Method Summary
voidcheckArguments(StaticContext env)
intcomputeCardinality()
Determine the static cardinality
intcomputeSpecialProperties()
Get the static properties of this expression (other than its type).
SequenceIteratoriterate(XPathContext context)
iterate() handles evaluation of the function: it returns a sequence of Document nodes
static NodeInfomakeDoc(String href, String baseURL, XPathContext c, SourceLocator locator)
Supporting routine to load one external document given a URI (href) and a baseURI
ExpressionpreEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
static voidsendDoc(String href, String baseURL, XPathContext c, SourceLocator locator, Receiver out)
Supporting routine to push one external document given a URI (href) and a baseURI to a given Receiver.
voidsendDocuments(XPathContext context, Receiver out)
Copy the documents identified by this expression to a given Receiver.

Method Detail

checkArguments

public void checkArguments(StaticContext env)

computeCardinality

public int computeCardinality()
Determine the static cardinality

computeSpecialProperties

public int computeSpecialProperties()
Get the static properties of this expression (other than its type). The result is bit-signficant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.

iterate

public SequenceIterator iterate(XPathContext context)
iterate() handles evaluation of the function: it returns a sequence of Document nodes

makeDoc

public static NodeInfo makeDoc(String href, String baseURL, XPathContext c, SourceLocator locator)
Supporting routine to load one external document given a URI (href) and a baseURI

preEvaluate

public Expression preEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

sendDoc

public static void sendDoc(String href, String baseURL, XPathContext c, SourceLocator locator, Receiver out)
Supporting routine to push one external document given a URI (href) and a baseURI to a given Receiver. This method cannot handle fragment identifiers

sendDocuments

public void sendDocuments(XPathContext context, Receiver out)
Copy the documents identified by this expression to a given Receiver. This method is used only when it is known that the documents are being copied, because there is then no problem about node identity.