The XSLProcessor class provides an API to perform XSL transformations on XML documents.


Class Attributes Index

 o Guess
Output style - It will guess either XML, Fragment, HTML, or Text
 o XML
XML output style.
 o Fragment
XML output style without the XML declaration.
 o HTML
HTML output style.
 o Text
Plain text output style.
 o Message
Informational status or message.
 o Warning
Warning message.
 o Error
Recoverable error.
 o FatalError
Error that will stop processing.

Class Methods Index

 o New()
Create a new XSLProcessor instance.

Instance Methods Index

 o Transform()
Perform the XSL transformation.
 o SetInput( Dynamic xmlInput, [String relativeUrl] )
Sets the input file or input DOMNode.
 o SetOutput( Dynamic xmlOutput, [Integer writeStyle] )
Sets the output file or output DOMNode.
 o SetStylesheet( Dynamic xslInput, [String relativeUrl] )
Sets the XSL stylesheet that will be used to perform the transformation.
 o SetParameter( String name, String value )
Sets the value of a parameter that will be referenced by the XSL stylesheet.
 o SetEntityResolver( Dynamic objref, Dynamic entryName )
Sets the object reference and entry point name for the resolve entity reference callback.

Class Attributes

 o Guess
 Integer Guess

Output style - It will guess either XML, Fragment, HTML, or Text

 o XML
 Integer XML

XML output style.

 o Fragment
 Integer Fragment

XML output style without the XML declaration.

 o HTML
 Integer HTML

HTML output style.

 o Text
 Integer Text

Plain text output style.

 o Message
 Integer Message

Informational status or message.

 o Warning
 Integer Warning

Warning message.

 o Error
 Integer Error

Recoverable error.

 o FatalError
 Integer FatalError

Error that will stop processing.

Class Methods

 o New
 XSLProcessor New()

Create a new XSLProcessor instance.

Returns:
A new XSLProcessor.

Instance Methods

 o Transform
 Assoc Transform()

Perform the XSL transformation.

Returns:
 
An Assoc that contains:
Boolean   OK  -  Status of the parse.
RecArray   Error  -  Errors that occurred during parsing.
 
If the status of the parse is false, then the error RecArray contains:
String   ErrType  -  The type of error: warning, error or fatal.
String   ErrMsg  -  XSL Processor generated error message.
 
 o SetInput
 Boolean SetInput(
              Dynamic xmlInput,
             [String relativeUrl] )

Sets the input file or input DOMNode. When the xmlInput is a DOMNode, the relativeUrl is used to resolve any relative URIs found and for error reporting.

Parameters:
xmlInput  -  The name of the file or DOMNode.
relativeUrl  -  Used for resolving relative URIs and for error reporting.
Returns:
True if the method succeeds, false otherwise.
 o SetOutput
 Boolean SetOutput(
              Dynamic xmlOutput,
             [Integer writeStyle] )

Sets the output file or output DOMNode. When the xmlOutput is a file, the writeStyle parameter can be specified to determine the type of output desired (XML, XML Fragment, HTML, or Text).

Parameters:
xmlOutput  -  The name of a file or a DOMNode.
writeStyle  -  The style of output desired.
Returns:
True if the method succeeds, false otherwise.
 o SetStylesheet
 Boolean SetStylesheet(
                Dynamic xslInput,
               [String relativeUrl] )

Sets the XSL stylesheet that will be used to perform the transformation.

Parameters:
xslInput  -  The name of a file or DOMNode.
relativeUrl  -  Used for resolving relative URIs and for error reporting.
Returns:
True if the method succeeds, false otherwise.
 o SetParameter
 Void SetParameter(
             String name,
             String value )

Sets the value of a parameter that will be referenced by the XSL stylesheet.

Parameters:
name  -  The name of an XSL parameter to set.
value  -  The value that the parameter should be set to.
 
 o SetEntityResolver
 Void SetEntityResolver(
             Dynamic objref,
             Dynamic entryName )

Sets the object reference and entry point name for the resolve entity callback.

The callback script prototype is:

String ResolveEntity(  String publicID,  String systemID )

The return value is a string to the resolved entity. An undefined return value indicates to the parser that it should use its default internal entity resolution.

Parameters:
objref  -  The reference to the object that has the script to be used in the callback.
entryName  -  The script name of the callback that will be executed on callback.