The XSLProcessor class provides an API to perform XSL transformations on XML documents.
Integer Guess
Output style - It will guess either XML, Fragment, HTML, or Text
XMLInteger XML
XML output style.
FragmentInteger Fragment
XML output style without the XML declaration.
HTMLInteger HTML
HTML output style.
TextInteger Text
Plain text output style.
MessageInteger Message
Informational status or message.
WarningInteger Warning
Warning message.
ErrorInteger Error
Recoverable error.
FatalErrorInteger FatalError
Error that will stop processing.
NewXSLProcessor New()
Create a new XSLProcessor instance.
Assoc Transform()
Perform the XSL transformation.
Boolean | OK | - | Status of the parse. | |
RecArray | Error | - | Errors that occurred during parsing. |
String | ErrType | - | The type of error: warning, error or fatal. | |
String | ErrMsg | - | XSL Processor generated error message. |
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.
xmlInput | - | The name of the file or DOMNode. |
relativeUrl | - | Used for resolving relative URIs and for error reporting. |
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).
xmlOutput | - | The name of a file or a DOMNode. |
writeStyle | - | The style of output desired. |
Boolean SetStylesheet( Dynamic xslInput, [String relativeUrl] )
Sets the XSL stylesheet that will be used to perform the transformation.
xslInput | - | The name of a file or DOMNode. |
relativeUrl | - | Used for resolving relative URIs and for error reporting. |
Void SetParameter( String name, String value )
Sets the value of a parameter that will be referenced by the XSL stylesheet.
name | - | The name of an XSL parameter to set. |
value | - | The value that the parameter should be set to. |
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.
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. |