|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CExtensionStaticContext: public CInterface { public: CExtensionStaticContext(); virtual ~CExtensionStaticContext(); public: virtual XNode GetNode() = 0; virtual void CreateContent( const XExtensionContentType &pExtensionContentType) = 0; virtual bool GetAttribute( CString &strResult, const CString &strName, bool bRequired=false) = 0; virtual CString GetString( const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false) = 0; virtual bool GetUri( CString &strResult, const CString &strName, bool bRequired=false) = 0; virtual XExpr GetExpr( const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false) = 0; virtual XAvt GetAvt( const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false) = 0; virtual bool GetNumber( double &dblResult, const CString &strName, bool bRequired=false) = 0; virtual XExpr ParseExpr(const CString &strSource) = 0; virtual XAvt ParseAvt(const CString &strSource) = 0; virtual void SignalError(IException *e) = 0; };
The abstract interface to the compile-time information related to the extension element.
This class provides access to the relevant functionality of the stylesheet composition process. The extension static context information is used to create instances of extension elements when the stylesheet is compiled and the internal representation of the stylesheet is composed.
Every extension static context instance is associated with certain extension element in the stylesheet source, providing information required to compile part of the stylesheet rooted at this element.
Implementation of the interface defined by this class is supplied by the toolkit; toolkit users do not need to implement this interface.
CAvt, CExtensionContentType, Dom::INode, Xpath::CExpr
Constructor/Destructor Summary | |
CExtensionStaticContext
();
����������Constructs the extension static context. |
|
~CExtensionStaticContext
();
����������Destroys the extension static context. |
Function Summary | |
XNode
|
GetNode
();
����������Returns the source node for the extension element associated with this extension static context. |
void
|
CreateContent
(const XExtensionContentType &pExtensionContentType);
����������Creates part of the stylesheet corresponding to the content of the extension element node associated with this extension static content. |
bool
|
GetAttribute
(CString &strResult, const CString &strName, bool bRequired=false);
����������Returns the value of the given attribute on the element associated with this extension static context. |
CString
|
GetString
(const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false);
����������Returns the string representing the value of the given attribute on the element associated with this extension static context. |
bool
|
GetUri
(CString &strResult, const CString &strName, bool bRequired=false);
����������Returns the URI represented by the given attribute on the element associated with this extension static context. |
XExpr
|
GetExpr
(const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false);
����������Returns the XPath expression represented by the given attribute on the element associated with this extension static context. |
XAvt
|
GetAvt
(const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false);
����������Returns the attribute value template represented by the given attribute on the element associated with this extension static context. |
bool
|
GetNumber
(double &dblResult, const CString &strName, bool bRequired=false);
����������Returns the XPath number represented by the given attribute on the element associated with this extension static context. |
XExpr
|
ParseExpr
(const CString &strSource);
����������Parses the XPath expression, taking in account the current internal state of the stylesheet composition process. |
XAvt
|
ParseAvt
(const CString &strSource);
����������Parses the attribute value template, taking in account the current internal state of the stylesheet composition process. |
void
|
SignalError
(IException *e);
����������Signals the error related to the stylesheet composition. |
Constructor/Destructor Detail |
CExtensionStaticContext();
Constructs the extension static context.
virtual ~CExtensionStaticContext();
Destroys the extension static context.
Function Detail |
virtual XNode GetNode() = 0;
Returns the source node for the extension element associated with this extension static context.
virtual void CreateContent( const XExtensionContentType &pExtensionContentType) = 0;
Creates part of the stylesheet corresponding to the content of the extension element node associated with this extension static content.
pExtensionContentType
- the extension content type
which specifies the allowed content structurevirtual bool GetAttribute( CString &strResult, const CString &strName, bool bRequired=false) = 0;
Returns the value of the given attribute on the element associated with this extension static context.
This function throws an exception
if the required attribute
(
bRequired
is set to
true
) is not present.
strResult
- on return, the value of the given
attribute on the element associated with this extension static context;
unspecified if the attribute is not presentstrName
- the name of the attributebRequired
- indicates whether the given attribute is requiredtrue
if the attribute is present;
false
otherwisevirtual CString GetString( const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false) = 0;
Returns the string representing the value of the given attribute on the element associated with this extension static context.
An optional default value is used when the attribute is not present.
This function throws an exception if the required attribute
(
bRequired
is set to
true
) is not present,
even if the default value is supplied.
strName
- the name of the attributepszDefault
- the default attribute value to use if
the given attribute is not present;
NULL
means no defaultbRequired
- indicates whether the given attribute is requiredvirtual bool GetUri( CString &strResult, const CString &strName, bool bRequired=false) = 0;
Returns the URI represented by the given attribute on the element associated with this extension static context.
Relative URI are resolved using the base URI of the element associated with this extension static context.
This function throws an exception if the required attribute
(
bRequired
is set to
true
) is not present.
strResult
- on return,
the URI represented by the given attribute
on the element associated with this extension static context;
unspecified in the attribute is not presentstrName
- the name of the attributebRequired
- indicates whether the given attribute is requiredtrue
if the attribute is present;
false
otherwisevirtual XExpr GetExpr( const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false) = 0;
Returns the XPath expression represented by the given attribute on the element associated with this extension static context.
An optional default value is used when the attribute is not present.
This function throws an exception if the required attribute
(
bRequired
is set to
true
) is not present,
even if the default value is supplied.
strName
- the name of the attributepszDefault
- the default attribute value to use if
the given attribute is not present;
NULL
means no defaultbRequired
- indicates whether the given attribute is requiredNULL
if the attribute is not present and no default value
is suppliedvirtual XAvt GetAvt( const CString &strName, const WCHAR *pszDefault=NULL, bool bRequired=false) = 0;
Returns the attribute value template represented by the given attribute on the element associated with this extension static context.
An optional default value is used when the attribute is not present.
This function throws an exception if the required attribute
(
bRequired
is set to
true
) is not present,
even if the default value is supplied.
strName
- the name of the attributepszDefault
- the default attribute value to use if
the given attribute is not present;
NULL
means no defaultbRequired
- indicates whether the given attribute is requiredNULL
if the attribute is not present and no default value
is suppliedvirtual bool GetNumber( double &dblResult, const CString &strName, bool bRequired=false) = 0;
Returns the XPath number represented by the given attribute on the element associated with this extension static context.
This function throws an exception if the required attribute
(
bRequired
is set to
true
) is not present.
dblResult
- on return,
the XPath number represented by the given attribute on the
element associated with this extension static content;
unspecified if the attribute is not presentstrName
- the name of the attributebRequired
- indicates whether the given attribute is requiredtrue
if the given attribute is present;
false
otherwisevirtual XExpr ParseExpr(const CString &strSource) = 0;
Parses the XPath expression, taking in account the current internal state of the stylesheet composition process.
strSource
- the expression sourcevirtual XAvt ParseAvt(const CString &strSource) = 0;
Parses the attribute value template, taking in account the current internal state of the stylesheet composition process.
strSource
- the attribute value template sourcevirtual void SignalError(IException *e) = 0;
Signals the error related to the stylesheet composition.
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 |