|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xalan.xsltc.compiler.XSLTC
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(java.lang.String newData)
Add literal text to char arrays that will be used to store character data in the stylesheet. |
boolean |
callsNodeset()
|
boolean |
compile(InputSource input,
java.lang.String name)
Compiles an XSL stylesheet passed in through an InputStream |
boolean |
compile(java.io.InputStream stream,
java.lang.String name)
Compiles an XSL stylesheet passed in through an InputStream |
byte[][] |
compile(java.lang.String name,
InputSource input)
Compiles a stylesheet pointed to by a URL. |
byte[][] |
compile(java.lang.String name,
InputSource input,
int outputType)
Compiles a stylesheet pointed to by a URL. |
boolean |
compile(java.net.URL url)
Compiles an XSL stylesheet pointed to by a URL |
boolean |
compile(java.net.URL url,
java.lang.String name)
Compiles an XSL stylesheet pointed to by a URL |
boolean |
compile(java.util.Vector stylesheets)
Compiles a set of stylesheets pointed to by a Vector of URLs |
boolean |
debug()
Get current debugging message setting |
void |
dumpClass(org.apache.bcel.classfile.JavaClass clazz)
|
byte[][] |
getBytecodes()
Returns an array of bytecode arrays generated by a compilation. |
java.lang.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. |
java.lang.String |
getClassName()
Get the class name for the generated translet. |
java.util.Vector |
getErrors()
Get a Vector containing all compile error messages |
java.lang.String |
getHelperClassName()
Returns a unique name for every helper class needed to execute a translet. |
java.lang.String |
getJarFileName()
|
java.util.Vector |
getNamesIndex()
|
java.util.Vector |
getNamespaceIndex()
|
java.util.Vector |
getNSAncestorPointers()
|
int[] |
getNumberFieldIndexes()
|
java.util.Properties |
getOutputProperties()
Only for user by the internal TrAX implementation. |
Parser |
getParser()
Only for user by the internal TrAX implementation. |
java.util.Vector |
getPrefixURIPairs()
|
java.util.Vector |
getPrefixURIPairsIdx()
|
Stylesheet |
getStylesheet()
Returns the top-level stylesheet |
boolean |
getTemplateInlining()
Return the state of the template inlining feature. |
java.util.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(org.apache.xalan.xsltc.compiler.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(org.apache.xalan.xsltc.compiler.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(java.lang.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(org.apache.xalan.xsltc.compiler.QName name)
Registers a namespace prefix and gives it a type so that it can be mapped to DOM namespace types at run-time. |
int |
registerNamespacePrefix(java.lang.String name)
Registers a namespace and gives it a type so that it can be mapped to DOM namespace types at run-time. |
int |
registerStylesheetPrefixMappingForRuntime(java.util.Hashtable prefixMap,
int ancestorID)
Registers namespace declarations that the stylesheet might need to look up dynamically - for instance, if an xsl:element has a
a name attribute with variable parts and has no
namespace attribute. |
void |
setClassName(java.lang.String className)
Set the class name for the generated translet. |
void |
setDebug(boolean debug)
Turn debugging messages on/off |
boolean |
setDestDirectory(java.lang.String dstDirName)
Set the destination directory for the translet. |
void |
setJarFileName(java.lang.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(java.lang.String packageName)
Set an optional package name for the translet and auxiliary classes |
void |
setPIParameters(java.lang.String media,
java.lang.String title,
java.lang.String charset)
Set the parameters to use to locate the correct processing instruction in the case where the input document to the compiler (and parser) is an XML document. |
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 |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int FILE_OUTPUT
public static final int JAR_OUTPUT
public static final int BYTEARRAY_OUTPUT
public static final int CLASSLOADER_OUTPUT
public static final int BYTEARRAY_AND_FILE_OUTPUT
public static final int BYTEARRAY_AND_JAR_OUTPUT
Constructor Detail |
public XSLTC()
Method Detail |
public void setSecureProcessing(boolean flag)
public boolean isSecureProcessing()
public Parser getParser()
public void setOutputType(int type)
public java.util.Properties getOutputProperties()
public void init()
public void setSourceLoader(SourceLoader loader)
loader
- The SourceLoader to use for include/importpublic void setTemplateInlining(boolean templateInlining)
public boolean getTemplateInlining()
public void setPIParameters(java.lang.String media, java.lang.String title, java.lang.String charset)
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.public boolean compile(java.net.URL url)
url
- An URL containing the input XSL stylesheetpublic boolean compile(java.net.URL url, java.lang.String name)
url
- An URL containing the input XSL stylesheetname
- The name to assign to the translet classpublic boolean compile(java.io.InputStream stream, java.lang.String name)
stream
- An InputStream that will pass in the stylesheet contentsname
- The name of the translet class to generatepublic boolean compile(InputSource input, java.lang.String name)
input
- An InputSource that will pass in the stylesheet contentsname
- The name of the translet class to generate - can be nullpublic boolean compile(java.util.Vector stylesheets)
stylesheets
- A Vector containing URLs pointing to the stylesheetspublic byte[][] getBytecodes()
public byte[][] compile(java.lang.String name, InputSource input, int outputType)
name
- The name of the translet class to generateinput
- An InputSource that will pass in the stylesheet contentsoutputType
- The output typepublic byte[][] compile(java.lang.String name, InputSource input)
name
- The name of the translet class to generateinput
- An InputSource that will pass in the stylesheet contentspublic void setXMLReader(XMLReader reader)
reader
- XMLReader (SAX2 parser) to usepublic XMLReader getXMLReader()
public java.util.Vector getErrors()
public java.util.Vector getWarnings()
public void printErrors()
public void printWarnings()
public boolean isMultiDocument()
public boolean callsNodeset()
public boolean hasIdCall()
public void setClassName(java.lang.String className)
className
- The name to assign to the translet classpublic java.lang.String getClassName()
public boolean setDestDirectory(java.lang.String dstDirName)
public void setPackageName(java.lang.String packageName)
public void setJarFileName(java.lang.String jarFileName)
public java.lang.String getJarFileName()
public void setStylesheet(Stylesheet stylesheet)
public Stylesheet getStylesheet()
public int registerAttribute(org.apache.xalan.xsltc.compiler.QName name)
public int registerElement(org.apache.xalan.xsltc.compiler.QName name)
public int registerNamespacePrefix(org.apache.xalan.xsltc.compiler.QName name)
public int registerNamespacePrefix(java.lang.String name)
public int registerNamespace(java.lang.String namespaceURI)
public int registerStylesheetPrefixMappingForRuntime(java.util.Hashtable prefixMap, int ancestorID)
xsl:element
has a
a name
attribute with variable parts and has no
namespace
attribute.prefixMap
- a Hashtable
mapping namespace prefixes to
URIs. Must not be null
. The default
namespace and namespace undeclarations are represented
by a zero-length string.ancestorID
- The int
node ID of the nearest ancestor in
the stylesheet that declares namespaces, or a value less
than zero if there is no such ancestorpublic java.util.Vector getNSAncestorPointers()
public java.util.Vector getPrefixURIPairs()
public java.util.Vector getPrefixURIPairsIdx()
public int nextModeSerial()
public int nextStylesheetSerial()
public int nextStepPatternSerial()
public int[] getNumberFieldIndexes()
public int nextHelperClassSerial()
public int nextAttributeSetSerial()
public java.util.Vector getNamesIndex()
public java.util.Vector getNamespaceIndex()
public java.lang.String getHelperClassName()
public void dumpClass(org.apache.bcel.classfile.JavaClass clazz)
public void outputToJar() throws java.io.IOException
public void setDebug(boolean debug)
public boolean debug()
public java.lang.String getCharacterData(int index)
char[]
. There may be more than
one such array required.index
- The index of the char[]
. Zero-based.char[]
.public int getCharacterDataCount()
public int addCharacterData(java.lang.String newData)
newData
- String data to be added to char arrays.
Pre-condition: newData.length() ≤ 21845
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |