Skip Headers

Oracle9i XML API Reference - XDK and Oracle XML DB
Release 2 (9.2)

Part Number A96616-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

17
XSLT Processor for C++

This chapter contains the following sections:


XSLProcessor Class


Description of XSLProcessor

This class contains top-level methods for invoking the XSL processor.


Methods of XSL Processor

xslprocess()

Description

Processes an XSL stylesheet with an XML document source. Returns a numeric error code, or 0 on success.

Syntax

uword xslprocess( XMLParser *docctx,
                  XMLParser *xslctx,
                  XMLParser *resctx,
                  Node **result);

Argument IN / OUT Description

docctx

(IN/OUT)

The XML document context

xslctx

(IN)

The XSL stylesheet context

resctx

(IN)

The result document fragment context

result

(IN/OUT)

The result document fragment node


XPObject Class


Description of XPObject

This class contains top-level methods of class XPObject. Objects of this class are created as a result of XPath expression evaluation.


Methods of XPObject

Table 17-1 Summary of Methods of XPObject
Method Description

XPObject()

XPObject constructor.

getbooleanval()

Returns boolean value of XPObject.

getnumval()

Returns node set value of XPObject.

getstrval()

Returns numeric value of XPObject.

getnsetval()

Returns string value of XPObject.

getxpobjtyp()

Returns type of XPObject.

XPObject()

Description

XPObject constructor.

Syntax

XPObject();

getbooleanval()

Description

Returns boolean value of the object.

Syntax

boolean getbooleanva();

getnumval()

Description

Returns numeric value of the object.

Syntax

double getnumval();

getstrval()

Description

Returns string value of the object.

Syntax

oratext* getstrval();

getnsetval()

Description

Returns node set value of the object.

Syntax

xpnset* getnsetval();

getxpobjtyp()

Description

Returns the object type. The returned type could be one of the following:

Syntax

xpobjtyp getxpobjtyp();

XPath Class


Description of XPath

This class contains top-level methods for invoking the XPath processor.


Methods of XPath

Table 17-2 Summary of Methods of XPath  
Method Description

XPath()

XPath constructor.

~XPath

XPath destructor.

parsexpathexpr()

Parses an XPath expression.

evalxpathexpr()

Evaluates a previously parsed XPath expression.

XPath()

Description

Creates and returns an XPath object. This call never fails.

Syntax

XPath( xmlctx *ctx,
       xmlnode *xslnode,
       xmlnode* xml_node,
       oratext* baseURI,
       size_t nctxels,
       xmlnode** ctxnodes);

Argument IN / OUT Description

ctx

(IN)

XSL context. Could be NULL.

xslnode

(IN)

The XSL node to be used for namespace expansion. Could be set to NULL.

xml_node

(IN)

The context node. Set to NULL for parsing.

baseURI

IN)

The base URI for parsing.

nctxels

(IN)

The number of nodes in the current node set.

ctxnodes

(IN)

The current node set.

~XPath

Description

Deletes/destroys an XPath object.

Syntax

delete();

parsexpathexpr()

Description

Parses an XPath expression. Returns the expression tree on success, otherwise NULL.

Syntax

xpexpr *parsexpathexpr( oratext *expr,
                        sword *err);

Argument IN / OUT Description

expr

(IN)

The expression in the form of a string

err

(OUT)

The error code

evalxpathexpr()

Description

Evaluates an XPath expression. Returns the result object on success, or NULL on failure. The type of the result object, obtained by calling getxpobjtyp(), is one of:

Syntax

XPObject *evalxpathexpr( xpexpr *exprtree,
                         sword *err);

Argument IN / OUT Description

expr

(IN)

The expression in the form of a tree

err

(OUT)

The error code


Go to previous page Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback