Xslt.Compile Method (IXPathNavigable, XsltSettings)Xslt.Compile Method (IXPathNavigable, XsltSettings)Xslt::Compile Method (IXPathNavigable^, XsltSettings^)

Compiles the specified XSLT stylesheet and returns an XsltXsltXslt object that represents the XSLT stylesheet. The specified static context settings are used.

Syntax

Public Shared Function Compile( _
    stylesheet As System.Xml.XPath.IXPathNavigable, _
    settings As XsltSettings _
) As Xslt
public static Xslt Compile(
    System.Xml.XPath.IXPathNavigable stylesheet,
    XsltSettings settings
)
public:
static Xslt^ Compile(
    System.Xml.XPath::IXPathNavigable^ stylesheet, 
    XsltSettings^ settings
)
 

Parameters

stylesheet

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

An XSLT stylesheet expressed using the XML Syntax for XQuery 1.0 (XQueryX).

settings

Type: XmlPrime.XsltSettingsXmlPrime.XsltSettingsXmlPrime::XsltSettings^

The initial static context settings.

Return Value

Type: XmlPrime.XsltXmlPrime.XsltXmlPrime::Xslt^

An XQueryXQueryXQuery object, or null a null reference (Nothing in Visual Basic) nullptr if an unrecoverable error was raised and handled by a subscriber to CompilationErrorCompilationErrorCompilationError

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException stylesheet or settings is null a null reference (Nothing in Visual Basic) nullptr.
ArgumentExceptionArgumentExceptionArgumentException stylesheet uses a different XmlNameTableXmlNameTableXmlNameTable to that specified in settings.
LicenceExceptionLicenceExceptionLicenceExceptionThis version of XmlPrime has expired.
XdmExceptionXdmExceptionXdmExceptionAn error occurred compiling the query.

Remarks

Any errors or warnings encountered during compilation raise the CompilationErrorCompilationErrorCompilationError event. If nothing subscribes to this event then an XdmExceptionXdmExceptionXdmException is thrown if an unrecoverable error is encountered. If this event is subscribed to then the exception is not thrown, and this method returns null a null reference (Nothing in Visual Basic) nullptr instead.