XsltContext 类

定义

封装可扩展样式表转换语言 (XSLT) 处理器的当前执行上下文,使 XML 路径语言 (XPath) 在 XPath 表达式中解析函数、参数和命名空间。Encapsulates the current execution context of the Extensible Stylesheet Language for Transformations (XSLT) processor allowing XML Path Language (XPath) to resolve functions, parameters, and namespaces within XPath expressions.

public ref class XsltContext abstract : System::Xml::XmlNamespaceManager
public abstract class XsltContext : System.Xml.XmlNamespaceManager
type XsltContext = class
    inherit XmlNamespaceManager
Public MustInherit Class XsltContext
Inherits XmlNamespaceManager
继承
派生

构造函数

XsltContext()

初始化 XsltContext 类的新实例。Initializes a new instance of the XsltContext class.

XsltContext(NameTable)

使用指定的 XsltContext 初始化 NameTable 类的新实例。Initializes a new instance of the XsltContext class with the specified NameTable.

属性

DefaultNamespace

获取默认命名空间的命名空间 URI。Gets the namespace URI for the default namespace.

(继承自 XmlNamespaceManager)
NameTable

获取与此对象关联的 XmlNameTableGets the XmlNameTable associated with this object.

(继承自 XmlNamespaceManager)
Whitespace

当重写派生类时,获取一个值,用于指示输出中是否包含空白节点。When overridden in a derived class, gets a value indicating whether to include white space nodes in the output.

方法

AddNamespace(String, String)

将给定的命名空间添加到集合。Adds the given namespace to the collection.

(继承自 XmlNamespaceManager)
CompareDocument(String, String)

当在派生类中重写时,根据 XSLT 处理器加载文档的顺序对两个文档的基统一资源标识符 (URI) 进行比较(为 XslTransform 类)。When overridden in a derived class, compares the base Uniform Resource Identifiers (URIs) of two documents based upon the order the documents were loaded by the XSLT processor (that is, the XslTransform class).

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回一个枚举数,将使用该枚举数循环访问 XmlNamespaceManager 集合中的命名空间。Returns an enumerator to use to iterate through the namespaces in the XmlNamespaceManager.

(继承自 XmlNamespaceManager)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetNamespacesInScope(XmlNamespaceScope)

获取被可用于枚举当前范围内的命名空间的前缀键控的命名空间名称的集合。Gets a collection of namespace names keyed by prefix which can be used to enumerate the namespaces currently in scope.

(继承自 XmlNamespaceManager)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
HasNamespace(String)

获取一个值,该值指示所提供的前缀是否具有为当前推送的范围定义的命名空间。Gets a value indicating whether the supplied prefix has a namespace defined for the current pushed scope.

(继承自 XmlNamespaceManager)
LookupNamespace(String)

获取指定前缀的命名空间 URI。Gets the namespace URI for the specified prefix.

(继承自 XmlNamespaceManager)
LookupPrefix(String)

查找为给定的命名空间 URI 声明的前缀。Finds the prefix declared for the given namespace URI.

(继承自 XmlNamespaceManager)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
PopScope()

将命名空间范围弹出堆栈。Pops a namespace scope off the stack.

(继承自 XmlNamespaceManager)
PreserveWhitespace(XPathNavigator)

在派生类中重写时,计算是要保留空白节点还是针对给定上下文将它们抽出。When overridden in a derived class, evaluates whether to preserve white space nodes or strip them for the given context.

PushScope()

将命名空间范围推送到堆栈上。Pushes a namespace scope onto the stack.

(继承自 XmlNamespaceManager)
RemoveNamespace(String, String)

为给定的前缀移除给定的命名空间。Removes the given namespace for the given prefix.

(继承自 XmlNamespaceManager)
ResolveFunction(String, String, XPathResultType[])

在派生类中重写时,解析函数引用并返回表示该函数的 IXsltContextFunctionWhen overridden in a derived class, resolves a function reference and returns an IXsltContextFunction representing the function. 在执行时使用 IXsltContextFunction 来获取该函数的返回值。The IXsltContextFunction is used at execution time to get the return value of the function.

ResolveVariable(String, String)

当在派生类中重写时,解析变量引用并返回一个表示该变量的 IXsltContextVariableWhen overridden in a derived class, resolves a variable reference and returns an IXsltContextVariable representing the variable.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于