net.sf.saxon.style
public class XSLStylesheet extends StyleElement
Field Summary | |
---|---|
static int | ANNOTATION_PRESERVE |
static int | ANNOTATION_STRIP |
Executable | exec |
Method Summary | |
---|---|
protected void | addImportedSchema(String targetNamespace) |
protected void | addNamespaceAlias(XSLNamespaceAlias node) |
int | allocateGlobalSlot(StructuredQName qName)
Allocate a slot number for a global variable or parameter |
void | allocatePatternSlots(int n)
Ensure there is enough space for local variables or parameters when evaluating the match pattern of
template rules |
int | allocateUniqueParameterNumber(StructuredQName qName)
Allocate a unique number to a local parameter name. |
Expression | compile(Executable exec)
Dummy compile() method to satisfy the interface |
void | compileStylesheet()
Compile the stylesheet to create an executable. |
void | declareXQueryFunction(XQueryFunction function)
Declare an imported XQuery function |
protected StringCollator | findCollation(String name)
Find a named collation. |
Properties | gatherOutputProperties(StructuredQName formatQName)
Create an output properties object representing the xsl:output elements in the stylesheet. |
XSLCharacterMap | getCharacterMap(StructuredQName name)
Get a character map, identified by the fingerprint of its name.
|
CollationMap | getCollationMap()
Get the collation map |
int | getDefaultValidation()
Get the value of the default validation attribute |
Executable | getExecutable()
Get the run-time Executable object |
FunctionLibrary | getFunctionLibrary()
Get the function library. |
XSLVariableDeclaration | getGlobalVariable(StructuredQName qName)
Get the global variable or parameter with a given name (taking
precedence rules into account) |
protected HashSet<String> | getImportedSchemaTable() |
XSLStylesheet | getImporter()
Get the StyleSheet that included or imported this one. |
int | getInputTypeAnnotations()
Get the value of the input-type-annotations attribute, for this module combined with that
of all included/imported modules. |
int | getInputTypeAnnotationsAttribute()
Get the value of the input-type-annotations attribute, for this module alone.
|
KeyManager | getKeyManager()
Get the KeyManager which handles key definitions |
LocationMap | getLocationMap()
Get the locationMap object |
int | getMinImportPrecedence()
Get the minimum import precedence of this stylesheet, that is, the lowest precedence
of any stylesheet imported by this one |
protected int | getNamespaceAlias(short uriCode)
Get the declared namespace alias for a given namespace URI code if there is one.
|
int | getPrecedence()
Get the import precedence of this stylesheet |
PreparedStylesheet | getPreparedStylesheet()
Get the owning PreparedStylesheet object |
RuleManager | getRuleManager()
Get the RuleManager which handles template rules |
protected Mode | getStripperRules()
Get the rules determining which nodes are to be stripped from the tree |
List | getTopLevel()
Get the top level elements in this stylesheet, after applying include/import |
protected boolean | hasNamespaceAliases() |
protected void | indexNamedTemplate(XSLTemplate template)
Add a named template to the index |
protected void | indexVariableDeclaration(XSLVariableDeclaration var)
Index a global xsl:variable or xsl:param element |
protected boolean | isAliasResultNamespace(short uriCode)
Determine if a namespace is included in the result-prefix of a namespace-alias |
protected boolean | isImportedSchema(String targetNamespace)
Get an imported schema with a given namespace |
protected boolean | mayContainParam(String attName) |
void | prepareAttributes()
Prepare the attributes on the stylesheet element |
void | preprocess()
Preprocess does all the processing possible before the source document is available.
|
void | processAllAttributes()
Process the attributes of every node in the stylesheet |
void | setCollation(String name, StringCollator collation)
Register a named collation (actually a StringCollator) |
void | setImporter(XSLStylesheet importer)
Set the StyleSheet that included or imported this one. |
void | setInputTypeAnnotations(int annotations)
Set the value of the input-type-annotations attribute, for this module combined with that
of all included/imported modules. |
void | setMinImportPrecedence(int precedence)
Set the minimum import precedence of this stylesheet, that is, the lowest precedence
of any stylesheet imported by this one |
void | setNeedsDynamicOutputProperties(boolean b)
Set that this stylesheet needs dynamic output properties |
void | setPrecedence(int prec)
Set the import precedence of this stylesheet |
void | setPreparedStylesheet(PreparedStylesheet sheet)
Create link to the owning PreparedStylesheet object |
void | setWasIncluded()
Indicate that this stylesheet was included (by its "importer") using an xsl:include
statement as distinct from xsl:import |
void | spliceIncludes()
Process xsl:include and xsl:import elements. |
boolean | stripsWhitespace()
Determine whether this stylesheet does any whitespace stripping |
void | validate()
Validate this element |
Parameters: qName the name of the variable or parameter
Returns: int the allocated slot number
Parameters: n the number of slots to be allocated
Parameters: qName the local parameter name
Returns: an integer that uniquely identifies this parameter name within the stylesheet
Parameters: function the imported function
Parameters: name identifies the name of the collation required
Returns: null if the collation is not found
Parameters: formatQName The name of the output format required. If set to null, gathers information for the unnamed output format
Returns: the Properties object containing the details of the specified output format
Throws: XPathException if a named output format does not exist in the stylesheet
Parameters: name The character map name being sought
Returns: the identified character map, or null if not found
Returns: the CollationMap
Returns: the value of the default-validation attribute, as a constant such as STRIP
Returns: the function library
Parameters: qName name of the global variable or parameter
Returns: the variable declaration
Returns: null if this is the principal stylesheet
Returns: the value of the input-type-annotations attribute, for this module combined with that of all included/imported modules
Returns: the value if the input-type-annotations attribute in this stylesheet module
Returns: the key manager
Returns: the LocationMap
Returns: the minimum precedence of imported stylesheet modules
Parameters: uriCode The code of the uri used in the stylesheet.
Returns: The namespace code to be used (prefix in top half, uri in bottom half): return -1 if no alias is defined
Returns: the template rule manager
Returns: the Mode object holding the whitespace stripping rules. The stripping rules defined in xsl:strip-space are managed in the same way as template rules, hence the use of a special Mode object
Returns: a list of top-level elements in this stylesheet module or in those modules that it includes or imports
Parameters: template The Template object
Throws: XPathException
Parameters: var The XSLVariable or XSLParam element
Throws: XPathException
Parameters: uriCode the namepool code of the URI
Returns: true if an xsl:namespace-alias has been defined for this namespace URI
Parameters: targetNamespace The target namespace of the required schema. Supply an empty string for the default namespace
Returns: the required Schema, or null if no such schema has been imported
Parameters: name the name of the collation collation the StringCollator that implements this collation
Parameters: importer the stylesheet module that included or imported this module
Parameters: annotations the value of the input-type-annotations attribute, for this module combined with that of all included/imported modules.
Parameters: precedence the precedence of the first stylesheet module that this one imports
Parameters: b true if this stylesheet needs dynamic output properties
Parameters: prec the import precedence. Higher numbers indicate higher precedence, but the actual number has no significance
Parameters: sheet the PreparedStylesheet
Returns: true if this stylesheet strips whitespace from source documents