Xslt.CallTemplate Method (string, string, IXPathNavigable, XmlWriter)Xslt.CallTemplate Method (String, String, IXPathNavigable, XmlWriter)Xslt::CallTemplate Method (String^, String^, IXPathNavigable^, XmlWriter^)

Calls the specified named template with the specified initial context node and outputs the primary result document to an XmlWriterXmlWriterXmlWriter.

Syntax

Public Sub CallTemplate( _
    initialTemplateLocalName As String, _
    initialTemplateNamespace As String, _
    contextNode As System.Xml.XPath.IXPathNavigable, _
    resultDocument As System.Xml.XmlWriter _
)
public void CallTemplate(
    string initialTemplateLocalName,
    string initialTemplateNamespace,
    System.Xml.XPath.IXPathNavigable contextNode,
    System.Xml.XmlWriter resultDocument
)
public:
void CallTemplate(
    String^ initialTemplateLocalName, 
    String^ initialTemplateNamespace, 
    System.Xml.XPath::IXPathNavigable^ contextNode, 
    System.Xml::XmlWriter^ resultDocument
)
 

Parameters

initialTemplateLocalName

Type: System.StringSystem.StringSystem::String^

The local name of the initial template.

initialTemplateNamespace

Type: System.StringSystem.StringSystem::String^

The namespace URI of the initial template.

contextNode

Type: System.Xml.XPath.IXPathNavigableSystem.Xml.XPath.IXPathNavigableSystem.Xml.XPath::IXPathNavigable^

The initial context node for the stylesheet.

resultDocument

Type: System.Xml.XmlWriterSystem.Xml.XmlWriterSystem.Xml::XmlWriter^

The XmlWriterXmlWriterXmlWriter to which the primary result document will be written.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException initialTemplateLocalName, initialTemplateNamespace or resultDocument is null a null reference (Nothing in Visual Basic) nullptr.
XdmExceptionXdmExceptionXdmExceptionRaised if a non-recoverable error is encountered.

Remarks

This method is unsuitable for use with multiple result documents.