org.apache.xalan.xsltc.compiler
public final class XSLTC extends Object
Field Summary | |
---|---|
static int | BYTEARRAY_AND_FILE_OUTPUT |
static int | BYTEARRAY_AND_JAR_OUTPUT |
static int | BYTEARRAY_OUTPUT |
static int | CLASSLOADER_OUTPUT |
static int | FILE_OUTPUT |
static int | JAR_OUTPUT |
Constructor Summary | |
---|---|
XSLTC()
XSLTC compiler constructor |
Method Summary | |
---|---|
int | addCharacterData(String newData)
Add literal text to char arrays that will be used to store character
data in the stylesheet. |
boolean | callsNodeset() |
boolean | compile(URL url)
Compiles an XSL stylesheet pointed to by a URL |
boolean | compile(URL url, String name)
Compiles an XSL stylesheet pointed to by a URL |
boolean | compile(InputStream stream, String name)
Compiles an XSL stylesheet passed in through an InputStream |
boolean | compile(InputSource input, String name)
Compiles an XSL stylesheet passed in through an InputStream |
boolean | compile(Vector stylesheets)
Compiles a set of stylesheets pointed to by a Vector of URLs |
byte[][] | compile(String name, InputSource input, int outputType)
Compiles a stylesheet pointed to by a URL. |
byte[][] | compile(String name, InputSource input)
Compiles a stylesheet pointed to by a URL. |
boolean | debug()
Get current debugging message setting |
void | dumpClass(JavaClass clazz) |
byte[][] | getBytecodes()
Returns an array of bytecode arrays generated by a compilation. |
String | getCharacterData(int index)
Retrieve a string representation of the character data to be stored
in the translet as a char[] . |
int | getCharacterDataCount()
Get the number of char[] arrays, thus far, that will be created to
store literal text in the stylesheet. |
String | getClassName()
Get the class name for the generated translet. |
Vector | getErrors()
Get a Vector containing all compile error messages |
String | getHelperClassName()
Returns a unique name for every helper class needed to
execute a translet. |
String | getJarFileName() |
Vector | getNamesIndex() |
Vector | getNamespaceIndex() |
int[] | getNumberFieldIndexes() |
Properties | getOutputProperties()
Only for user by the internal TrAX implementation. |
Parser | getParser()
Only for user by the internal TrAX implementation. |
Stylesheet | getStylesheet()
Returns the top-level stylesheet |
Vector | getWarnings()
Get a Vector containing all compile warning messages |
XMLReader | getXMLReader()
Get the XMLReader to use for parsing the next input stylesheet |
boolean | hasIdCall() |
void | init()
Initializes the compiler to compile a new stylesheet |
boolean | isMultiDocument() |
boolean | isSecureProcessing()
Return the state of the secure processing feature. |
int | nextAttributeSetSerial() |
int | nextHelperClassSerial() |
int | nextModeSerial() |
int | nextStepPatternSerial() |
int | nextStylesheetSerial() |
void | outputToJar()
Generate output JAR-file and packages |
void | printErrors()
Print all compile error messages to standard output |
void | printWarnings()
Print all compile warning messages to standard output |
int | registerAttribute(QName name)
Registers an attribute and gives it a type so that it can be mapped to
DOM attribute types at run-time. |
int | registerElement(QName name)
Registers an element and gives it a type so that it can be mapped to
DOM element types at run-time. |
int | registerNamespace(String namespaceURI)
Registers a namespace and gives it a type so that it can be mapped to
DOM namespace types at run-time. |
int | registerNamespacePrefix(QName name)
Registers a namespace prefix and gives it a type so that it can be mapped to
DOM namespace types at run-time. |
void | setClassName(String className)
Set the class name for the generated translet. |
void | setDebug(boolean debug)
Turn debugging messages on/off |
boolean | setDestDirectory(String dstDirName)
Set the destination directory for the translet.
|
void | setJarFileName(String jarFileName)
Set the name of an optional JAR-file to dump the translet and
auxiliary classes to |
void | setOutputType(int type)
Only for user by the internal TrAX implementation. |
void | setPackageName(String packageName)
Set an optional package name for the translet and auxiliary classes |
void | setPIParameters(String media, String title, String charset)
Set the parameters to use to locate the correct |
void | setSecureProcessing(boolean flag)
Set the state of the secure processing feature. |
void | setSourceLoader(SourceLoader loader)
Defines an external SourceLoader to provide the compiler with documents
referenced in xsl:include/import |
void | setStylesheet(Stylesheet stylesheet)
Set the top-level stylesheet |
void | setTemplateInlining(boolean templateInlining)
Set a flag indicating if templates are to be inlined or not. |
void | setXMLReader(XMLReader reader)
Set the XMLReader to use for parsing the next input stylesheet |
Parameters: newData String data to be added to char arrays.
Pre-condition: newData.length() ≤ 21845
Returns: int offset at which character data will be stored
Parameters: url An URL containing the input XSL stylesheet
Parameters: url An URL containing the input XSL stylesheet name The name to assign to the translet class
Parameters: stream An InputStream that will pass in the stylesheet contents name The name of the translet class to generate
Returns: 'true' if the compilation was successful
Parameters: input An InputSource that will pass in the stylesheet contents name The name of the translet class to generate - can be null
Returns: 'true' if the compilation was successful
Parameters: stylesheets A Vector containing URLs pointing to the stylesheets
Returns: 'true' if the compilation was successful
Parameters: name The name of the translet class to generate input An InputSource that will pass in the stylesheet contents outputType The output type
Returns: JVM bytecodes that represent translet class definition
Parameters: name The name of the translet class to generate input An InputSource that will pass in the stylesheet contents
Returns: JVM bytecodes that represent translet class definition
Returns: JVM bytecodes that represent translet class definition
char[]
. There may be more than
one such array required.Parameters: index The index of the char[]
. Zero-based.
Returns: String The character data to be stored in the corresponding
char[]
.
Returns: A Vector containing all compile error messages
Returns: A Vector containing all compile error messages
Parameters: className The name to assign to the translet class
Parameters: media The media attribute to be matched. May be null, in which case the prefered templates will be used (i.e. alternate = no). title The value of the title attribute to match. May be null. charset The value of the charset attribute to match. May be null.
Parameters: loader The SourceLoader to use for include/import
Parameters: reader XMLReader (SAX2 parser) to use