Contents

objectByApplyingXSLT(at:arguments:)

Applies the XSLT pattern rules and templates located at a specified URL to the receiver and returns a document object containing transformed XML markup or an Nsdata object containing plain text, RTF text, and so on.

Declaration

func objectByApplyingXSLT(at xsltURL: URL, arguments argument: [String : String]?) throws -> Any

Parameters

  • xsltURL:

    An Nsurl object specifying a valid URL.

  • argument:

    A dictionary containing Nsstring key-value pairs that are passed as runtime parameters to the XSLT processor. Pass in nil if you have no parameters to pass.

Return Value

Depending on intended output, the returns an NSXMLDocument object or an NSData data containing transformed XML or HTML markup. If the message is supposed to create plain text or RTF, then an NSData object is returned, otherwise an XML document object. The method returns nil if XSLT processing did not succeed.

Discussion

See Also

Transforming a Document Using XSLT