Skip Headers

Oracle® XML API Reference
10g Release 1 (10.1)
Part No. B10789-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents

Previous Next  

XSLTC Interface

Table 13-1 summarizes the methods of available through the XSLTVM Interface.

Table 13-1 Summary of XSLTC Methods; XSLTVM Package

Function Summary
XmlXvmCompileBuffer
Compile an XSLT stylesheet from buffer into bytecode.
XmlXvmCompileDom
Compile an XSLT stylesheet from DOM into bytecode.
XmlXvmCompileFile
Compile an XSLT stylesheet from file into bytecode.
XmlXvmCompileURI
Compile XSLT stylesheet from URI into byte code.
XmlXvmCompileXPath
Compile an XPath expression.
XmlXvmCreateComp
Create an XSLT compiler.
XmlXvmDestroyComp
Destroy an XSLT compiler object.
XmlXvmGetBytecodeLength
Returns the bytecode length.


XmlXvmCompileBuffer

Compile an XSLT stylesheet from buffer into bytecode. Compiler flags could be one or more of the following:

The generated bytecode resides in a compiler buffer which is freed when next stylesheet is compiled or when compiler object is deleted. Hence, if the bytecode is to be reused it should be copied into another location.


Syntax
ub2 *XmlXvmCompileBuffer(
   xmlxvmcomp *comp,
   oratext *buffer,
   ub4 length, 
   oratext *baseURI,
   xmlxvmflag flags,
   xmlerr *error);

Parameter In/Out Description
comp
IN
compiler object
buffer
IN
pointer to buffer containing stylesheet document
length
IN
length of the stylesheet document in bytes
baseuri
IN
base URI of the document
flags
IN
flags for the current compilation
error
OUT
returned error code


Returns

(ub2 *) bytecode or NULL on error


XmlXvmCompileDom

Compile an XSLT stylesheet from DOM into bytecode. Compiler flags could be one or more of the following:

The generated bytecode resides in a compiler buffer which is freed when next stylesheet is compiled or when compiler object is deleted. Hence, if the bytecode is to be reused it should be copied into another location.


Syntax
ub2 *XmlXvmCompileDom(
   xmlxvmcomp *comp,
   xmldocnode *root,
   xmlxvmflag flags,
   xmlerr *error);

Parameter In/Out Description
comp
IN
compiler object
rooot
IN
root element of the stylesheet DOM
flags
IN
flags for the current compilation
error
OUT
returned error code


Returns

(ub2 *) bytecode or NULL on error


XmlXvmCompileFile

Compile XSLT stylesheet from file into bytecode. Compiler flags could be one or more of the following:

The generated bytecode resides in a compiler buffer which is freed when next stylesheet is compiled or when compiler object is deleted. Hence, if the bytecode is to be reused it should be copied into another location.


Syntax
ub2 *XmlXvmCompileFile(
   xmlxvmcomp *comp, 
   oratext *path,
   oratext *baseURI,
   xmlxvmflag flags,
   xmlerr *error);

Parameter In/Out Description
comp
IN
compiler object
path
IN
path of XSL stylesheet file
baseuri
IN
base URI of the document
flags
IN
flags for the current compilation
error
OUT
returned error code


Returns

(ub2 *) bytecode or NULL on error


XmlXvmCompileURI

Compile XSLT stylesheet from URI into bytecode. Compiler flags could be one or more of the following:

The generated bytecode resides in a compiler buffer which is freed when next stylesheet is compiled or when compiler object is deleted. Hence, if the bytecode is to be reused it should be copied into another location.


Syntax
ub2 *XmlXvmCompileURI(
   xmlxvmcomp *comp, 
   oratext *uri, 
   xmlxvmflag flags, 
   xmlerr *error);

Parameter In/Out Description
comp
IN
compiler object
uri
IN
URI of the file that contains the XSL stylesheet
flags
IN
flags for the current compilation
error
OUT
returned error code


Returns

(ub2 *) bytecode or NULL on error


XmlXvmCompileXPath

Compiles an XPath expression. The optional pfxmap is used to map namespace prefixes to URIs in the XPath expression. It is an array of prefix, URI values, ending in NULL, and so on.


Syntax
ub2 *XmlXvmCompileXPath(
   xmlxvmcomp *comp, 
   oratext *xpath,
   oratext **pfxmap,
   xmlerr *error);

Parameter In/Out Description
comp
IN
compiler object
xpath
IN
XPath expression
pfxmap
IN
array of prefix-URI mappings
error
OUT
returned error code


Returns

(ub2 *) XPath expression bytecode or NULL on error


XmlXvmCreateComp

Create an XSLT compiler object. The XSLT compiler is used to compile XSLT stylesheets into bytecode.


Syntax
xmlxvmcomp *XmlXvmCreateComp(
   xmlctx *xctx);

Parameter In/Out Description
xctx
IN
XML context


Returns

(xmlxvmcomp *) XSLT compiler object, or NULL on error


See Also:

XmlXvmDestroyComp


XmlXvmDestroyComp

Destroys an XSLT compiler object


Syntax
void XmlXvmDestroyComp(
   xmlxvmcomp *comp);

Parameter In/Out Description
comp
IN
XSLT compiler object


See Also:

XmlXvmCreateComp


XmlXvmGetBytecodeLength

The bytecode length is needed when the bytecode is to be copied or when it is set into XSLTVM.


Syntax
ub4 XmlXvmGetBytecodeLength(
   ub2 *bytecode,
   xmlerr *error);

Parameter In/Out Description
bytecode
IN
bytecode buffer
error
OUT
returned error code


Returns

(ub4) The bytecode length in bytes.