XsltArgumentList 類別

定義

包含引數的變數,引數為 XSLT 參數或延伸物件 (Extension Object)。Contains a variable number of arguments which are either XSLT parameters or extension objects.

public ref class XsltArgumentList
public ref class XsltArgumentList sealed
public class XsltArgumentList
public sealed class XsltArgumentList
type XsltArgumentList = class
Public Class XsltArgumentList
Public NotInheritable Class XsltArgumentList
繼承
XsltArgumentList

備註

方法會使用這個類別 TransformThis class is used by the Transform method. 它可讓您從樣式表單中叫用參數和擴充物件。It allows parameters and extension objects to be invoked from within the style sheet.

當參數和物件加入至時 XsltArgumentList ,它們會分別與命名空間限定名稱和命名空間 URI 相關聯。When the parameters and objects are added to the XsltArgumentList, they are associated with a namespace qualified name and a namespace URI, respectively.

以下是傳遞物件的優點,而不是使用內嵌腳本,例如 <msxsl:script>The following are advantages to passing an object rather than using an embedded script such as <msxsl:script>:

  • 提供較佳的類別封裝和重複使用。Provides better encapsulation and reuse of classes.

  • 讓樣式表單更小且更容易維護。Allows style sheets to be smaller and more easily maintained.

  • 支援透過) 將節點片段 (傳遞 XPathNavigator 至樣式表單。Supports passing node fragments (through the XPathNavigator) to the style sheet.

如需使用的詳細資訊 XsltArgumentList ,請參閱 Xslt 擴充物件xslt 參數For more information about using the XsltArgumentList, see XSLT Extension Objects and XSLT Parameters.

建構函式

XsltArgumentList()

實作 XsltArgumentList 的新執行個體。Implements a new instance of the XsltArgumentList.

方法

AddExtensionObject(String, Object)

將新物件加入至 XsltArgumentList,並將其與命名空間 URI 相關聯。Adds a new object to the XsltArgumentList and associates it with the namespace URI.

AddParam(String, String, Object)

將參數加入至 XsltArgumentList,並將其與命名空間限定名稱相關聯。Adds a parameter to the XsltArgumentList and associates it with the namespace qualified name.

Clear()

XsltArgumentList 移除所有的參數和擴充物件。Removes all parameters and extension objects from the XsltArgumentList.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetExtensionObject(String)

取得與指定命名空間關聯的物件。Gets the object associated with the given namespace.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetParam(String, String)

取得與名命空間限定名稱關聯的參數。Gets the parameter associated with the namespace qualified name.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
RemoveExtensionObject(String)

XsltArgumentList 移除有命名空間 URI 的物件。Removes the object with the namespace URI from the XsltArgumentList.

RemoveParam(String, String)

XsltArgumentList 移除參數。Removes the parameter from the XsltArgumentList.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

事件

XsltMessageEncountered

發生於 xsl:message 元素在樣式表中指定訊息時。Occurs when a message is specified in the style sheet by the xsl:message element.

適用於