Sablot class

Sablotron XSLT processor class.

SuperClass

Object

Class Methods

Sablot.createProcessor()
Sablot.new()

create a new processor.

Sablot.processStrings(xsl_string, xml_string)
Sablot.process_strings(xsl_string, xml_string)

translate xml_string with xsl_string, and return as String.

Sablot.processFiles(xsl_file, xml_file, output_file)
Sablot.process_files(xsl_file, xml_file, output_file)

translate xml_file with xsl_file, and return output_file as file.

Methods

Sablot.runProcessor(sheet, input, result, params, args)

runs the existing instance on the given documents

Sablot.resultArg(resultURI)

gets the result string from the last Sablot run the buffer is identified by an URI (to enable output to multiple documents)

Sablot.setLog(filename, logLevel)

sets the logging options. Logging is off by default. (but logLevel is ignored so far)

Sablot.setBase(base)

overrides the default base URI for relative reference resolution.

Sablot.setBaseForScheme(scheme, base)

a softer form of SablotSetBase: the hard base URI will only be in effect for relative references whose bases have the given scheme.

Example: assume we call

processor.setBaseForScheme("arg", "http://server" )

and then runs a stylesheet at "arg:/xxx" which contains "document('foo.xml')". The relative reference is resolved as "http://server/foo.xml" but if the stylesheet were at "file:/xxx" it would become "file:/foo.xml".