Instance Method インスタンスメソッド

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. 指定されたURLで位置するXSLTパターン規則とテンプレートをレシーバに適用します、そして変換されたXMLマークアップを含むある書類オブジェクトまたはプレーンテキスト、RTFテキスト、などを含むNSDataオブジェクトを返します。

Declaration 宣言

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

Parameters パラメータ

xsltURL

An NSURL object specifying a valid URL. ある有効なURLを指定しているNSURLオブジェクト。

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. NSStringキー値ペアを含んでいるある辞書、それは実行時パラメータとしてXSLTプロセッサに渡されます。nilを渡してください、もし渡すパラメータをあなたが持たないならば。

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. エラーが発生するならば、間接的にNSErrorオブジェクトを返します、XSLT処理によって生成されたエラーまたは警告をカプセル化しています、または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. 意図される出力に依存して、NSXMLDocumentオブジェクトまたはあるNSDataデータを返します、変換されたXMLまたはHTMLマークアップを含んでいます。メッセージがプレーンテキストまたはRTFを作成することになっているならば、そのときNSDataオブジェクトが返されます、そうでなければあるXML書類オブジェクト。 The method returns nil if XSLT processing did not succeed.

Discussion 議論

See Also 参照

Transforming a Document Using XSLT ある書類をXSLTを使って変換する