Instance Method

objectByApplyingXSLTAtURL:arguments:error:

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

- (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(NSDictionary<NSString *,NSString *> *)argument error:(NSError * _Nullable *)error;

Parameters

xsltURL

An NSURL object specifying a valid URL.

arguments

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.

error

If an error occurs, indirectly returns an NSError object encapsulating error or warning messages generated by XSLT processing or from an attempt to connect to a website identified by the URL.

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

- objectByApplyingXSLT:arguments:error:

Applies the XSLT pattern rules and templates (specified as a data object) to the receiver and returns a document object containing transformed XML or HTML markup.

- objectByApplyingXSLTString:arguments:error:

Applies the XSLT pattern rules and templates (specified as a string) to the receiver and returns a document object containing transformed XML or HTML markup.