public class XSLTStylesheet extends XSLObject
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
XSLT_NAMESPACE |
The current (and ever changing) XSLT namespace
|
APPLY_IMPORTS, APPLY_TEMPLATES, ARG, ATTRIBUTE, ATTRIBUTE_SET, CALL_TEMPLATE, CDATA, CHOOSE, COMMENT, CONTENTS, COPY, COPY_OF, ELEMENT, ENTITY_REF, FOR_EACH, FUNCTIONS, ID, IF, IMPORT, INCLUDE, KEY, LITERAL, LOCALE, MESSAGE, NUMBER, OTHERWISE, OUTPUT, PARAM, PI, PRESERVE_SPACE, SCRIPT, SORT, STRIP_SPACE, STYLESHEET, TEMPLATE, TEXT, VALUE_OF, VARIABLE, WHEN, WITH_PARAM
Constructor | Description |
---|---|
XSLTStylesheet() |
Create a new XSLStylesheet
|
Modifier and Type | Method | Description |
---|---|---|
void |
addAttributeSet(AttributeSet attributeSet) |
Adds the given AttributeSet to this stylesheet
|
void |
addId(java.lang.String idAttr) |
Adds a new Id to the list of IDs for this stylesheet for all elements.
|
void |
addId(java.lang.String idAttr,
java.lang.String elementType) |
Adds a new Id for the specified element type to the list of
IDs for this element type stylesheet.
|
void |
addId(Id id) |
Adds a new Id for the specified element type to the list of
IDs for this element type stylesheet.
|
void |
addParam(Param param) |
Adds a new top-level parameter to this stylesheet.
|
void |
addScript(XSLScript script) |
Adds a new global level XSLScript to this stylesheet.
|
void |
addTemplate(TemplateRule template) |
Adds a new TemplateRule to the list of rules for this stylesheet.
|
void |
addVariable(Variable variable) |
Adds a new top-level Variable to this stylesheet
|
boolean |
appendAction(XSLObject xslObject) |
Adds the given XSLObject to this Stylesheet.
The following elements are valid: |
int |
countTemplates() |
|
AttributeSet |
getAttributeSet(java.lang.String setName) |
|
java.util.Hashtable |
getAttributeSets() |
Returns all of the attribute-sets for this stylesheet
|
java.lang.String |
getDocumentBase() |
Returns the document base for this stylesheet
|
List |
getExtensionElementPrefixes() |
Returns an enumeration of the declared namespace prefixes
for extension elements
|
java.lang.String |
getHref() |
|
java.util.Hashtable |
getIds() |
|
List |
getLocalTemplates() |
|
TemplateRule |
getNamedTemplate(java.lang.String name) |
Returns the TemplateRule whose name matches the given name argument.
|
java.util.Enumeration |
getNamedTemplates() |
Returns an enumeration of templates that have names
|
XSLOutput |
getOutput() |
Returns the XSLOutput Object for controlling the serialization
of Result Documents created using this Stylesheet
|
Param |
getParameter(java.lang.String name) |
Returns the top-level parameter associated with the given name
|
java.util.Enumeration |
getParameters() |
Returns an Enumeration of the top-level parameters
|
java.lang.String |
getQuotedNamespace(java.lang.String namespace) |
Returns the namespace that the given namespace argument
quotes
|
java.lang.String |
getResultDocType() |
|
java.lang.String |
getResultNamespace() |
|
List |
getScripts() |
Retrieves the set of global level scripts for this stylesheet
|
TemplateRule[] |
getTemplates() |
|
URILocation |
getURILocation() |
Returns the URILocation for this stylesheet, or null, if
no location was set.
|
Variable |
getVariable(java.lang.String name) |
Returns the variable associated with the given name
|
java.util.Enumeration |
getVariables() |
Returns an Enumeration of the top-level variables
|
java.lang.String |
getXSLNSPrefix() |
Returns the XSL Namespace Prefix for this XSL Stylesheet
|
void |
importFrom(XSLImport xslImport) |
Imports the XSLStylesheet referenced by the given XSLImport
to this stylesheet.
|
void |
importFrom(XSLTStylesheet xsl) |
Imports the given XSLStylesheet to this XSLStylesheet.
|
void |
includeFrom(XSLTStylesheet xsl) |
Includes the given XSLStylesheet to this XSLStylesheet.
|
boolean |
isAllowableImport(java.lang.String filename) |
Checks the given filename against this Stylesheet's href and previously
imported stylesheets to determine if the file represented
by the given filename can be imported in this stylesheet.
|
boolean |
isStripSpaceAllowed(java.lang.String name) |
Determines whether or not whitespace stripping is allowed
for Elements with the given name
|
void |
preserveSpace(java.lang.String name) |
Preserves the whitespace of Elements with the given name.
|
void |
setAttribute(java.lang.String name,
java.lang.String value) |
Sets the attribute with the given name to the given value.
|
void |
setURILocation(URILocation location) |
Sets the URILocation for this stylesheet
|
void |
stripSpace(java.lang.String name) |
Removes the ignorable whitespace from Elements with the given name.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addNamespaceDecl, appendText, appendText, getActions, getAttribute, getAttributes, getNamespace, getNearestAncestor, getNodeValue, getStylesheet, getText, getType, getTypeFromName, getTypeName, resolveNamespace, setAllowActions, setNamespace, setTypeName
public static final java.lang.String XSLT_NAMESPACE
public void addAttributeSet(AttributeSet attributeSet)
attributeSet
- the AttributeSet to addpublic void addVariable(Variable variable) throws XSLException
variable
- the Variable to addXSLException
- when adding a Variable with the same
name as a previously added Variable or Parameter.public void addId(java.lang.String idAttr)
idAttr
- the id attribute to addpublic void addId(java.lang.String idAttr, java.lang.String elementType)
idAttr
- the ID to addelementType
- the tag name of the element that id is an ID for
Note: the wild card "*" will match all element typespublic void addId(Id id)
id
- the Id to addpublic void addParam(Param param) throws XSLException
param
- the top-level parameter to addXSLException
- when adding a parameter with the same
name as a previously declared parameter, or variablepublic void addTemplate(TemplateRule template) throws XSLException
rule
- the TemplateRule to addXSLException
- when a template already exists with the given
namepublic void addScript(XSLScript script)
script
- the XSLScript to addpublic boolean appendAction(XSLObject xslObject)
xsl:attribute-set xsl:constant xsl:id xsl:import xsl:include xsl:macro xsl:template xsl:preserve-space xsl:strip-space The following proprietary elemens are also valid: xsl:script
appendAction
in class XSLObject
xslObject
- the XSLObject to add to this XSLObject's
list of actionspublic AttributeSet getAttributeSet(java.lang.String setName)
setName
- the name of the attribute set to returnAttributeSet
public java.util.Hashtable getAttributeSets()
public java.lang.String getDocumentBase()
public List getExtensionElementPrefixes()
public URILocation getURILocation()
getHref()
,
getDocumentBase()
public XSLOutput getOutput()
public java.lang.String getHref()
public java.util.Hashtable getIds()
public List getLocalTemplates()
public TemplateRule getNamedTemplate(java.lang.String name)
name
- the name of the NamedTemplate to returnpublic java.util.Enumeration getNamedTemplates()
public Param getParameter(java.lang.String name)
name
- the name of the top-level parameter to returnpublic java.util.Enumeration getParameters()
public Variable getVariable(java.lang.String name)
name
- the name of the variable to returnpublic java.util.Enumeration getVariables()
public int countTemplates()
public java.lang.String getQuotedNamespace(java.lang.String namespace)
namespace
- the namespace to resolvepublic java.lang.String getResultNamespace()
public java.lang.String getResultDocType()
public List getScripts()
public TemplateRule[] getTemplates()
public java.lang.String getXSLNSPrefix()
public void importFrom(XSLTStylesheet xsl) throws XSLException
xsl
- the XSLStylesheet to importXSLException
public void importFrom(XSLImport xslImport) throws XSLException
xslImport
- the XSLImport referencing the appropriate
XSLStylesheet to import.XSLException
public void includeFrom(XSLTStylesheet xsl) throws XSLException
xsl
- the XSLStylesheet to includeXSLException
isAllowableInclusion
public boolean isAllowableImport(java.lang.String filename)
public boolean isStripSpaceAllowed(java.lang.String name)
name
- the name of the ElementpreserveSpace(java.lang.String)
,
stripSpace(java.lang.String)
public void preserveSpace(java.lang.String name)
name
- the name of the Element to preserve whitespace of.stripSpace(java.lang.String)
public void setAttribute(java.lang.String name, java.lang.String value) throws XSLException
XSLObject
setAttribute
in class XSLObject
name
- the name of the attribute to setvalue
- the value to set the attribute toXSLException
- if this XSLObject does not allow attributes
with the given name, or if the attribute is read onlyorg.exolab.adaptx.xslt.XSLElement
public void setURILocation(URILocation location)
location
- the URILocation of this stylesheetpublic void stripSpace(java.lang.String name)
name
- the name of the Element to strip whitespace frompreserveSpace(java.lang.String)