| Oracle® Database XML C++ API Reference 11g Release 2 (11.2) Part Number E10771-01  | 
  | 
  | 
PDF · Mobi · ePub | 
Xsl package contains XSLT related types and interfaces.
This chapter contains these sections:
Table 10-1 summarizes the datatypes of the Xsl package.
Table 10-1 Summary of Datatypes; Xsl Package
| Datatype | Description | 
|---|---|
| 
 Defines XSL compiler identifiers.  | 
|
| 
 Defines XSLT related exceptions.  | 
|
| 
 Defines XSL transformer identifiers.  | 
Defines XSL compiler identifiers.
typedef enum XslCompIdType {
   XvmCompCXml = 1
} XslCompIdType;
Defines XSLT related exceptions.
typedef typedef enum XslExceptionCode {
   XSL_UNDEFINED_ERR = 0,
   XSL_OTHER_ERR = 1 
} XslExceptionCode;
 
Defines XSL transformer identifiers.
typedef enum XslTrIdType {
   XslTrCXml         = 1,
   XvmTrCXml         = 2
} XslTrIdType;
Table 10-2 summarizes the methods available through the Compiler interface.
Table 10-2 Summary of Compiler Methods; Xsl Package
| Function | Summary | 
|---|---|
| 
 Compile Xsl and return its compiled binary representation.  | 
|
| 
 Get compiler's Id.  | 
|
| 
 Get length of compiled XSL document.  | 
Compiles Xsl and returns its compiled binary representation.
virtual ub2* compile( InputSource* isrc_ptr) throw (XslException) = 0;
| Parameter | Description | 
|---|---|
isrc_ptr  | 
Xsl document | 
(InputSource) Xsl document in compiled binary representation
Get the compiler Id.
virtual XslCompIdType getCompilerId() const = 0;
(XslCompIdType) Compiler's Id
Returns length of compiled XSL document
virtual ub4 getLength( ub2* binxsl_ptr) throw (XslException) = 0;
| Parameter | Description | 
|---|---|
binxsl_ptr  | 
compiled Xsl document | 
(ub4) length of the document
Table 10-3 summarizes the methods available through the CompTransformer interface.
Table 10-3 Summary of CompTransformer Methods; Xsl Package
| Function | Summary | 
|---|---|
| 
 Get transformer's Id.  | 
|
| 
 Set compiled Xsl.  | 
|
| 
 Set SAX handler.  | 
|
| 
 Set XSLT document for this transformer.  | 
|
| 
 Transform the document.  | 
Get transformer's id.
virtual XslTrIdType getTransformerId() const = 0;
(XslTrIdType) Transformer's Id
Sets compiled Xsl.
virtual void setBinXsl ( ub2* binxsl_ptr) throw (XslException) = 0;
| Parameter | Description | 
|---|---|
binxsl_ptr  | 
compiled Xsl document | 
Inherited from Transformer.
virtual void setSAXHandler( SAXHandlerRoot* hdlr_ptr) = 0;
| Parameter | Description | 
|---|---|
hdlr_ptr  | 
SAX handler pointer | 
Set XSLT document for this transformer. Should be called before the transform member function is called. It is inherited from Transform.
virtual void setXSL ( InputSource* isrc_ptr) throw (XslException) = 0;
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
Transforms the document. Throws an exception if an XSLT document is not set by a previous call to setXSL. Inherited from Transform.
| Syntax | Description | 
|---|---|
virtual NodeRef< Node>* transform( nputSource* isrc_ptr) throw (XslException) = 0;  | 
Transform the document and return DOM. | 
virtual void transform( InputSource* isrc_ptr, SAXHandlerRoot* hdlr_ptr) throw (XslException) = 0;  | 
Transform the document and return SAX events. | 
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
hdlr_ptr  | 
SAX handler pointer | 
(DocumentRef) document tree of new document
Table 10-4 summarizes the methods available through the Transformer interface.
Table 10-4 Summary of Transformer Methods; Xsl Package
| Function | Summary | 
|---|---|
| 
 Get transformer's Id.  | 
|
| 
 Set SAX handler.  | 
|
| 
 Set XSLT document for this transformer.  | 
|
| 
 Transform the document and return SAX events.  | 
Gets transformer's id.
virtual XslTrIdType getTransformerId() const = 0;
(XslTrIdType) Transformer's Id
Set SAX handler.
virtual void setSAXHandler( SAXHandlerRoot* hdlr_ptr) = 0;
| Parameter | Description | 
|---|---|
hdlr_ptr  | 
SAX handler pointer | 
Set XSLT document for this transformer. Should be called before the transform member function is called.
virtual void setXSL ( InputSource* isrc_ptr) throw (XslException) = 0;
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
Transforms the document. Throws an exception if an XSLT document is not set by a previous call to setXSL.
| Syntax | Description | 
|---|---|
virtual NodeRef< Node>* transform( nputSource* isrc_ptr) throw (XslException) = 0;  | 
Transform the document and return DOM. | 
virtual void transform( InputSource* isrc_ptr, SAXHandlerRoot* hdlr_ptr) throw (XslException) = 0;  | 
Transform the document and return SAX events. | 
| Parameter | Description | 
|---|---|
isrc_ptr  | 
instance document to process | 
hdlr_ptr  | 
SAX handler pointer | 
(DocumentRef) document tree of new document
Table 10-5 summarizes the methods available through the XSLException interface.
Table 10-5 Summary of XSLException Methods; Xsl Package
| Function | Summary | 
|---|---|
| 
 Get Oracle XML error code embedded in the exception.  | 
|
| 
 Get current language (encoding) of error messages.  | 
|
| 
 Get Oracle XML error message.  | 
|
| 
 Defines a prototype for implementation.  | 
Gets Oracle XML error code embedded in the exception. Virtual member function inherited from XmlException.
virtual unsigned getCode() const = 0;
(unsigned) numeric error code (0 on success)
Virtual member function inherited from XmlException.
virtual oratext* getMesLang() const = 0;
(oratext*) Current language (encoding) of error messages
Virtual member function inherited from XmlException
virtual oratext* getMessage() const = 0;
(oratext *) Error message
This is a virtual member function that defines a prototype for implementation defined member functions returning XSL transformer and compiler exception codes, defined in XslExceptionCode, of the exceptional situations during execution.
virtual XslExceptionCode getXslCode() const = 0;
(XslExceptionCode) exception code