1 XSLProcessor

Class Ax.xsl.XSLProcessor


Class to do XSL transformations.

Constructor Summary

Method
Description
Creates a new XSL processor instance.
JSXSLProcessor(Ax.text.String xsl)
Creates a new XSL processor instance for the given XSL.
Creates a new XSL processor instance for the given XSL.
JSXSLProcessor(Object xsl, Ax.text.String encoding)
Creates a new XSL processor instance for the given XSL.

Method Summary

Modifier and Type
Method
Description
void 
close()
Closes the processor.
Ax.xsl.XSLProcessor 
setOmitXMLDeclaration(boolean omit)
Sets if the XML declaration should be omitted, false by default.
Ax.xsl.XSLProcessor 
setOuputEncoding(Ax.text.String encoding)
Sets the value of the encoding attribute in the output.
Ax.xsl.XSLProcessor 
setOuputMethod(Ax.text.String method)
Defines the output format.
void 
Installs a URI resolver to handle XSL imports, like
Ax.text.String 
Installs a URLStreamHandler protocol for the current execution.
Ax.text.String 
transform(Ax.io.File file)
Transforms the given XML file.
Ax.text.String 
transform(Ax.io.File file,Ax.text.String charsetName)
Transforms the given XML file.
Ax.text.String 
transform(Ax.net.URL file)
Transforms the given XML file.
Ax.text.String 
transform(Ax.text.String xml)
Transforms the given XML.

Constructor Detail

Ax.xsl.XSLProcessor.JSXSLProcessor

Ax.xsl.XSLProcessor.JSXSLProcessor()
Info:
Creates a new XSL processor instance.

Ax.xsl.XSLProcessor.JSXSLProcessor

Ax.xsl.XSLProcessor.JSXSLProcessor(
	string xsl
						)
Info:
Creates a new XSL processor instance for the given XSL.
Parameters:
xsl - the XSL to use (Reader, String or File)

Ax.xsl.XSLProcessor.JSXSLProcessor

Ax.xsl.XSLProcessor.JSXSLProcessor(
	object xsl
						)
Info:
Creates a new XSL processor instance for the given XSL. xsl must be a Reader convertible object (File, String...).
Parameters:
xsl - the XSL to use (Reader, String or File)

Ax.xsl.XSLProcessor.JSXSLProcessor

Ax.xsl.XSLProcessor.JSXSLProcessor(
	object xsl,
	string encoding
						)
Info:
Creates a new XSL processor instance for the given XSL. xsl must be a Reader convertible object (File, String...).
Parameters:
xsl - the XSL to use
encoding - the charset encoding to use

Method Detail

Ax.xsl.XSLProcessor.close

null Ax.xsl.XSLProcessor.close()
Info:
Closes the processor.
Returns:
null

Ax.xsl.XSLProcessor.setOmitXMLDeclaration

object Ax.xsl.XSLProcessor.setOmitXMLDeclaration(
	boolean omit
)
Info:
Sets if the XML declaration should be omitted, false by default. True specifies that the XML declaration (
Parameters:
omit - whether to omit the XML declaration.
Returns:
object

Ax.xsl.XSLProcessor.setOuputEncoding

object Ax.xsl.XSLProcessor.setOuputEncoding(
	string encoding
)
Info:
Sets the value of the encoding attribute in the output.
Parameters:
encoding - the output encoding to use
Returns:
object

Ax.xsl.XSLProcessor.setOuputMethod

object Ax.xsl.XSLProcessor.setOuputMethod(
	string method
)
Info:
Defines the output format. Can be: xml, html, text or name. The default is XML, (but if the first child of the root node is
Parameters:
method - the output method to use
Returns:
object

Ax.xsl.XSLProcessor.setURIResolver

null Ax.xsl.XSLProcessor.setURIResolver(
	object function
)
Info:
Installs a URI resolver to handle XSL imports, like
Parameters:
function - the Uri resolving function
Returns:
null

Ax.xsl.XSLProcessor.setURLStreamHandler

string Ax.xsl.XSLProcessor.setURLStreamHandler(
	object function
)
Info:
Installs a URLStreamHandler protocol for the current execution. Protocol name is returned as unique name in JVM. The protocol only lives during duration of script as it will be removed on end. Fails if a stream handler is already set.
Parameters:
function - the function to
Returns:
string

Ax.xsl.XSLProcessor.transform

string Ax.xsl.XSLProcessor.transform(
	file file
)
Info:
Transforms the given XML file.
Parameters:
file - the source XML file
Returns:
string

Ax.xsl.XSLProcessor.transform

string Ax.xsl.XSLProcessor.transform(
	file file,
	string charsetName
)
Info:
Transforms the given XML file.
Parameters:
file - the source XML file
charsetName - the charset encoding to use
Returns:
string

Ax.xsl.XSLProcessor.transform

string Ax.xsl.XSLProcessor.transform(
	object file
)
Info:
Transforms the given XML file.
Parameters:
file - the source XML file
Returns:
string

Ax.xsl.XSLProcessor.transform

string Ax.xsl.XSLProcessor.transform(
	string xml
)
Info:
Transforms the given XML.
Parameters:
xml - the source XML
Returns:
string