C# 클래스 Mvp.Xml.Common.XPath.DynamicContext

Provides the evaluation context for fast execution and custom variables resolution.
This class is responsible for resolving variables during dynamic expression execution.

Discussed in http://weblogs.asp.net/cazzu/archive/2003/10/07/30888.aspx

Author: Daniel Cazzulino, blog

상속: System.Xml.Xsl.XsltContext
파일 보기 프로젝트 열기: Monobjc/monobjc-tools 1 사용 예제들

공개 메소드들

메소드 설명
AddVariable ( string name, object value ) : void

Adds the variable to the dynamic evaluation context.

Value type conversion for XPath evaluation is as follows: CLR Type XPath type System.String XPathResultType.String System.Double (or types that can be converted to) XPathResultType.Number System.Boolean XPathResultType.Boolean System.Xml.XPath.XPathNavigator XPathResultType.Navigator System.Xml.XPath.XPathNodeIterator XPathResultType.NodeSet Others XPathResultType.Any See the topic "Compile, Select, Evaluate, and Matches with XPath and XPathExpressions" in MSDN documentation for additional information.

CompareDocument ( string baseUri, string nextbaseUri ) : int

Implementation equal to XsltContext.

Compile ( string xpath ) : XPathExpression

Shortcut method that compiles an expression using an empty navigator.

DynamicContext ( ) : System

Initializes a new instance of the DynamicContext class.

DynamicContext ( NameTable table ) : System

Initializes a new instance of the DynamicContext class with the specified NameTable.

DynamicContext ( XmlNamespaceManager context ) : System

Initializes a new instance of the DynamicContext class.

DynamicContext ( XmlNamespaceManager context, NameTable table ) : System

Initializes a new instance of the DynamicContext class.

LookupNamespace ( string prefix ) : string

Same as XmlNamespaceManager.

LookupPrefix ( string uri ) : string

Same as XmlNamespaceManager.

PreserveWhitespace ( XPathNavigator node ) : bool

Same as XsltContext.

ResolveFunction ( string prefix, string name, XPathResultType ArgTypes ) : IXsltContextFunction

See XsltContext. Not used in our implementation.

ResolveVariable ( string prefix, string name ) : IXsltContextVariable

Resolves the dynamic variables added to the context. See XsltContext.

메소드 상세

AddVariable() 공개 메소드

Adds the variable to the dynamic evaluation context.
Value type conversion for XPath evaluation is as follows: CLR Type XPath type System.String XPathResultType.String System.Double (or types that can be converted to) XPathResultType.Number System.Boolean XPathResultType.Boolean System.Xml.XPath.XPathNavigator XPathResultType.Navigator System.Xml.XPath.XPathNodeIterator XPathResultType.NodeSet Others XPathResultType.Any See the topic "Compile, Select, Evaluate, and Matches with XPath and XPathExpressions" in MSDN documentation for additional information.
The is null.
public AddVariable ( string name, object value ) : void
name string The name of the variable to add to the context.
value object The value of the variable to add to the context.
리턴 void

CompareDocument() 공개 메소드

Implementation equal to XsltContext.
public CompareDocument ( string baseUri, string nextbaseUri ) : int
baseUri string
nextbaseUri string
리턴 int

Compile() 공개 정적인 메소드

Shortcut method that compiles an expression using an empty navigator.
public static Compile ( string xpath ) : XPathExpression
xpath string The expression to compile
리턴 System.Xml.XPath.XPathExpression

DynamicContext() 공개 메소드

Initializes a new instance of the DynamicContext class.
public DynamicContext ( ) : System
리턴 System

DynamicContext() 공개 메소드

Initializes a new instance of the DynamicContext class with the specified NameTable.
public DynamicContext ( NameTable table ) : System
table System.Xml.NameTable The NameTable to use.
리턴 System

DynamicContext() 공개 메소드

Initializes a new instance of the DynamicContext class.
public DynamicContext ( XmlNamespaceManager context ) : System
context System.Xml.XmlNamespaceManager A previously filled context with the namespaces to use.
리턴 System

DynamicContext() 공개 메소드

Initializes a new instance of the DynamicContext class.
public DynamicContext ( XmlNamespaceManager context, NameTable table ) : System
context System.Xml.XmlNamespaceManager A previously filled context with the namespaces to use.
table System.Xml.NameTable The NameTable to use.
리턴 System

LookupNamespace() 공개 메소드

Same as XmlNamespaceManager.
public LookupNamespace ( string prefix ) : string
prefix string
리턴 string

LookupPrefix() 공개 메소드

Same as XmlNamespaceManager.
public LookupPrefix ( string uri ) : string
uri string
리턴 string

PreserveWhitespace() 공개 메소드

Same as XsltContext.
public PreserveWhitespace ( XPathNavigator node ) : bool
node System.Xml.XPath.XPathNavigator
리턴 bool

ResolveFunction() 공개 메소드

See XsltContext. Not used in our implementation.
public ResolveFunction ( string prefix, string name, XPathResultType ArgTypes ) : IXsltContextFunction
prefix string
name string
ArgTypes XPathResultType
리턴 IXsltContextFunction

ResolveVariable() 공개 메소드

Resolves the dynamic variables added to the context. See XsltContext.
public ResolveVariable ( string prefix, string name ) : IXsltContextVariable
prefix string
name string
리턴 IXsltContextVariable