|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CExtensionContext: public CInterface { public: CExtensionContext(); virtual ~CExtensionContext(); public: virtual XExtensionContext CreateExtensionContext() = 0; virtual XExtensionContext CreateExtensionContext( const XIterator &pIterator) = 0; virtual XTopLevelExtensionContext GetTopLevelExtensionContext() = 0; virtual void InstantiateContent(int nType) = 0; virtual XExprContext CreateExprContext() = 0; virtual XValue EvaluateExpr(const XExpr &pExpr) = 0; virtual CString EvaluateAvt(const XAvt &pAvt) = 0; virtual bool ResolveUri( const CString &strUri, CString &strResult) = 0; virtual XOutputHandler GetOutputHandler() = 0; virtual XXsltImplementation GetXsltImplementation() = 0; virtual void OutputValue( const XValue &pValue, bool bSourceNamespaces) = 0; virtual XValue CreateResultTreeFragment( const XNodeSet &pNodeSet, bool bSourceNamespaces) = 0; virtual void SignalWarning(IException *e) = 0; virtual void SignalError(IException *e) = 0; };
The abstract interface to the run-time information related to the extension element.
This class provides access to the relevant functionality
of the element instantiation process.
The extension context information
is used when the XSLT processor performs instiation of extension elements
(see
CExtensionElement::Instantiate
).
Every extension context is associated with certain extension stylesheet element (called here the context stylesheet element). Furthermore, every extension context is associated with certain node-set itetator (called here the context iterator), which iterates through the node-set containing nodes from one or more source documents.
The implementation the interface defined by this class is supplied by the toolkit; toolkit users do not need to implement this interface.
CAvt, CTopLevelExtensionContext, CXsltImplementation, COutputHandler, Xpath::CNodeSet, Xpath::CIterator, Xpath::CValue, Xpath::CContext, Xpath::CExpr
Constructor/Destructor Summary | |
CExtensionContext
();
����������Constructs the extension context. |
|
~CExtensionContext
();
����������Destroys the extension context. |
Function Summary | |
XExtensionContext
|
CreateExtensionContext
();
����������Creates the clone of this extension context. |
XExtensionContext
|
CreateExtensionContext
(const XIterator &pIterator);
����������Creates the clone of this extension context; associates the given node-set iterator with the newly created extension context. |
XTopLevelExtensionContext
|
GetTopLevelExtensionContext
();
����������Returns the top-level extension context associated with this extension context. |
void
|
InstantiateContent
(int nType);
����������Instantiates elements of the given content type from the content of the stylesheet element associated with this extension context. |
XExprContext
|
CreateExprContext
();
����������Creates the Xpath expression context based on this extension context. |
XValue
|
EvaluateExpr
(const XExpr &pExpr);
����������Evaluates the XPath expression in this extension context. |
CString
|
EvaluateAvt
(const XAvt &pAvt);
����������Evaluates the attribute value template in this extension context. |
bool
|
ResolveUri
(const CString &strUri, CString &strResult);
����������Resolves the URI in this extension context. |
XOutputHandler
|
GetOutputHandler
();
����������Returns the output handler associated with this extension context. |
XXsltImplementation
|
GetXsltImplementation
();
����������Returns the XSLT implementation associated with this extension context. |
void
|
OutputValue
(const XValue &pValue, bool bSourceNamespaces);
����������Outputs the given value using the output handler associated with this extension context. |
XValue
|
CreateResultTreeFragment
(const XNodeSet &pNodeSet, bool bSourceNamespaces);
����������Creates the result tree fragment from the source node-set using this extension context. |
void
|
SignalWarning
(IException *e);
����������Signals the runtime warning. |
void
|
SignalError
(IException *e);
����������Signals the runtime error. |
Constructor/Destructor Detail |
CExtensionContext();
Constructs the extension context.
virtual ~CExtensionContext();
Destroys the extension context.
Function Detail |
virtual XExtensionContext CreateExtensionContext() = 0;
Creates the clone of this extension context.
virtual XExtensionContext CreateExtensionContext( const XIterator &pIterator) = 0;
Creates the clone of this extension context; associates the given node-set iterator with the newly created extension context.
pIterator
- the node-set iterator
to associate with the newly created extension contextvirtual XTopLevelExtensionContext GetTopLevelExtensionContext() = 0;
Returns the top-level extension context associated with this extension context.
virtual void InstantiateContent(int nType) = 0;
Instantiates elements of the given content type from the content of the stylesheet element associated with this extension context.
Content type codes are assigned to content elements
by the attached instances of the
CExtensionContentType
class. Every content type specifies one or more sections in
the extension element content. Every section can be instantiated
independently.
For example, the extension element may have two content
sections, one providing parameters of this element, and another
representing the list of contained instructions. Two content
types must be defined by the corresponding
CExtensionElementType
instance for this element.
nType
- the content type codevirtual XExprContext CreateExprContext() = 0;
Creates the Xpath expression context based on this extension context.
virtual XValue EvaluateExpr(const XExpr &pExpr) = 0;
Evaluates the XPath expression in this extension context.
pExpr
- the XPath expression to evaluatevirtual CString EvaluateAvt(const XAvt &pAvt) = 0;
Evaluates the attribute value template in this extension context.
pAvt
- the attribute value template to evaluatevirtual bool ResolveUri( const CString &strUri, CString &strResult) = 0;
Resolves the URI in this extension context.
Relative URI are resolved using the base URI of the stylesheet element associated with this extension context; absolute URI are returned unmodified.
strUri
- the URI to resolvestrResult
- on return, the resolved URI;
unspecified if URI resolution failedtrue
if the source URI was successfully
resolved;
false
otherwisevirtual XOutputHandler GetOutputHandler() = 0;
Returns the output handler associated with this extension context.
virtual XXsltImplementation GetXsltImplementation() = 0;
Returns the XSLT implementation associated with this extension context.
virtual void OutputValue( const XValue &pValue, bool bSourceNamespaces) = 0;
Outputs the given value using the output handler associated with this extension context.
pValue
- the value to outputbSourceNamespaces
- if the source value represents
a node-set, indicates, whether the contained nodes
support XDM extensions
(in particular, whether the namespace declarations in scope on
the element nodes are represented as XDM extension namespace
nodes)virtual XValue CreateResultTreeFragment( const XNodeSet &pNodeSet, bool bSourceNamespaces) = 0;
Creates the result tree fragment from the source node-set using this extension context.
pNodeSet
- the source node-setbSourceNamespaces
- indicates, whether the nodes in the source node-set
support XDM extensions
(in particular, whether the namespace declarations in scope on
the element nodes are represented as XDM extension namespace
nodes)virtual void SignalWarning(IException *e) = 0;
Signals the runtime warning.
e
- the exception which describes the warningvirtual void SignalError(IException *e) = 0;
Signals the runtime error.
e
- the exception which describes the error
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |