public class Stylesheet extends ElemTemplateElement implements Serializable
All properties in this class have a fixed form of bean-style property accessors for all properties that represent XSL attributes or elements. These properties have setter method names accessed generically by the processor, and so these names must be fixed according to the system defined in the getSetterMethodName function.
Modifier and Type | Field and Description |
---|---|
static String |
STYLESHEET_EXT
Extension to be used when serializing to disk.
|
m_docOrderNumber, m_hasVariableDecl, m_parentNode
actualEncoding, fDocumentURI
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
Stylesheet(Stylesheet parent)
Constructor for a Stylesheet.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(XSLTVisitor visitor)
Accept a visitor and call the appropriate method
for this class.
|
protected void |
callChildVisitors(XSLTVisitor visitor,
boolean callAttrs)
Call the children visitors.
|
boolean |
containsExcludeResultPrefix(String prefix,
String uri)
Get whether or not the passed prefix is contained flagged by
the "exclude-result-prefixes" property.
|
boolean |
containsExtensionElementURI(String uri)
Find out if this contains a given "extension-element-prefix" property.
|
ElemAttributeSet |
getAttributeSet(int i)
Get an "xsl:attribute-set" property.
|
int |
getAttributeSetCount()
Get the number of "xsl:attribute-set" properties.
|
boolean |
getCompatibleMode()
Get whether or not the stylesheet is in "Forward Compatibility Mode"
|
DecimalFormatProperties |
getDecimalFormat(int i)
Get an "xsl:decimal-format" property.
|
DecimalFormatProperties |
getDecimalFormat(QName name)
Get an "xsl:decimal-format" property.
|
int |
getDecimalFormatCount()
Get the number of xsl:decimal-format declarations.
|
String |
getExcludeResultPrefix(int i)
Get an "exclude-result-prefix" property.
|
int |
getExcludeResultPrefixCount()
Get the number of "exclude-result-prefixes" Strings.
|
String |
getExtensionElementPrefix(int i)
Get and "extension-element-prefix" property.
|
int |
getExtensionElementPrefixCount()
Get the number of "extension-element-prefixes" Strings.
|
String |
getHref()
Get the base identifier with which this stylesheet is associated.
|
String |
getId()
Get the "id" property.
|
StylesheetComposed |
getImport(int i)
Get a stylesheet from the "import" list.
|
int |
getImportCount()
Get the number of imported stylesheets.
|
Stylesheet |
getInclude(int i)
Get the stylesheet at the given in index in "include" list
|
int |
getIncludeCount()
Get the number of included stylesheets.
|
KeyDeclaration |
getKey(int i)
Get an "xsl:key" property.
|
int |
getKeyCount()
Get the number of "xsl:key" properties.
|
NamespaceAlias |
getNamespaceAlias(int i)
Get an "xsl:namespace-alias" property.
|
int |
getNamespaceAliasCount()
Get the number of "xsl:namespace-alias" properties.
|
String |
getNodeName()
Return the node name.
|
short |
getNodeType()
Get the type of the node.
|
Object |
getNonXslTopLevel(QName name)
Get a non-xslt element.
|
OutputProperties |
getOutput(int i)
Get an "xsl:output" property.
|
int |
getOutputCount()
Get the number of "xsl:output" properties.
|
ElemParam |
getParam(QName qname)
Get an "xsl:param" property.
|
WhiteSpaceInfo |
getPreserveSpace(int i)
Get a "xsl:preserve-space" property.
|
int |
getPreserveSpaceCount()
Get the number of "xsl:preserve-space" properties.
|
WhiteSpaceInfo |
getStripSpace(int i)
Get an "xsl:strip-space" property.
|
int |
getStripSpaceCount()
Get the number of "xsl:strip-space" properties.
|
Stylesheet |
getStylesheet()
Get the owning stylesheet.
|
StylesheetComposed |
getStylesheetComposed()
Get the owning aggregated stylesheet, or this
stylesheet if it is aggregated.
|
Stylesheet |
getStylesheetParent()
Get the parent of the stylesheet.
|
StylesheetRoot |
getStylesheetRoot()
Get the root of the stylesheet, where all the tables common
to all stylesheets are kept.
|
ElemTemplate |
getTemplate(int i)
Get an "xsl:template" property.
|
int |
getTemplateCount()
Get the number of "xsl:template" properties.
|
ElemVariable |
getVariable(QName qname)
Get an "xsl:variable" property.
|
ElemVariable |
getVariableOrParam(int i)
Get an "xsl:variable" property.
|
ElemVariable |
getVariableOrParam(QName qname)
Get an "xsl:variable" or "xsl:param" property.
|
int |
getVariableOrParamCount()
Get the number of "xsl:variable" properties.
|
String |
getVersion()
Get the "version" property.
|
String |
getXmlnsXsl()
Get the "xmlns:xsl" property.
|
int |
getXSLToken()
Get an integer representation of the element type.
|
boolean |
isAggregatedType()
Tell if this can be cast to a StylesheetComposed, meaning, you
can ask questions from getXXXComposed functions.
|
boolean |
isRoot()
Tell if this is the root of the stylesheet tree.
|
void |
replaceTemplate(ElemTemplate v,
int i)
Replace an "xsl:template" property.
|
void |
setAttributeSet(ElemAttributeSet attrSet)
Set the "xsl:attribute-set" property.
|
void |
setDecimalFormat(DecimalFormatProperties edf)
Process the xsl:decimal-format element.
|
void |
setExcludeResultPrefixes(StringVector v)
Set the "exclude-result-prefixes" property.
|
void |
setExtensionElementPrefixes(StringVector v)
Set the "extension-element-prefixes" property.
|
void |
setHref(String baseIdent)
Set the base identifier with which this stylesheet is associated.
|
void |
setId(String v)
Set the "id" property.
|
void |
setImport(StylesheetComposed v)
Add a stylesheet to the "import" list.
|
void |
setInclude(Stylesheet v)
Add a stylesheet to the "include" list.
|
void |
setKey(KeyDeclaration v)
Set the "xsl:key" property.
|
void |
setLocaterInfo(SourceLocator locator)
Set the location information for this element.
|
void |
setNamespaceAlias(NamespaceAlias na)
Set the "xsl:namespace-alias" property.
|
void |
setNonXslTopLevel(QName name,
Object obj)
Set found a non-xslt element.
|
void |
setOutput(OutputProperties v)
Set the "xsl:output" property.
|
void |
setParam(ElemParam v)
Set an "xsl:param" property.
|
void |
setPreserveSpaces(WhiteSpaceInfo wsi)
Set the "xsl:preserve-space" property.
|
void |
setStripSpaces(WhiteSpaceInfo wsi)
Set the "xsl:strip-space" properties.
|
void |
setStylesheetParent(Stylesheet v)
Set the parent of the stylesheet.
|
void |
setStylesheetRoot(StylesheetRoot v)
Set the root of the stylesheet, where all the tables common
to all stylesheets are kept.
|
void |
setTemplate(ElemTemplate v)
Set an "xsl:template" property.
|
void |
setVariable(ElemVariable v)
Set the "xsl:variable" property.
|
void |
setVersion(String v)
Set the "version" property.
|
void |
setXmlnsXsl(String v)
Set the "xmlns:xsl" property.
|
appendChild, appendChild, callChildVisitors, callVisitors, canAcceptVariables, canStripWhiteSpace, compareTo, compose, endCompose, error, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getBaseIdentifier, getChildNodes, getColumnNumber, getDeclaredPrefixes, getDOMBackPointer, getEndColumnNumber, getEndLineNumber, getFirstChild, getFirstChildElem, getLastChild, getLastChildElem, getLength, getLineNumber, getLocalName, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getOwnerDocument, getOwnerXSLTemplate, getParentElem, getParentNode, getParentNodeElem, getPreviousSibling, getPreviousSiblingElem, getPublicId, getSystemId, getTagName, getUid, getXmlSpace, handlesNullPrefixes, hasChildNodes, hasTextLitOnly, hasVariableDecl, insertBefore, isCompiledTemplate, item, recompose, removeChild, replaceChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setEndLocaterInfo, setParentElem, setPrefixes, setPrefixes, setUid, setXmlSpace, shouldStripWhiteSpace
adoptNode, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, getActualEncoding, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getInputEncoding, getNamespaceURI, getNodeValue, getOwnerElement, getPrefix, getSchemaTypeInfo, getSpecified, getStrictErrorChecking, getTextContent, getUserData, getWholeText, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertData, isDefaultNamespace, isEqualNode, isId, isSameNode, isSupported, isWhitespaceInElementContent, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, renameNode, replaceData, replaceWholeText, setActualEncoding, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setDocumentURI, setIdAttribute, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInputEncoding, setNodeValue, setPrefix, setStrictErrorChecking, setTextContent, setUserData, setValue, setXmlEncoding, setXmlStandalone, setXmlVersion, splitText, substringData
public static final String STYLESHEET_EXT
public Stylesheet(Stylesheet parent)
parent
- The including or importing stylesheet.public Stylesheet getStylesheet()
getStylesheet
in class ElemTemplateElement
public boolean isAggregatedType()
public boolean isRoot()
public void setXmlnsXsl(String v)
v
- The value to be set for the "xmlns:xsl" property.public String getXmlnsXsl()
public void setExtensionElementPrefixes(StringVector v)
v
- The value to be set for the "extension-element-prefixes"
property: a vector of extension element URIs.public String getExtensionElementPrefix(int i) throws ArrayIndexOutOfBoundsException
i
- Index of extension element URI in listArrayIndexOutOfBoundsException
public int getExtensionElementPrefixCount()
public boolean containsExtensionElementURI(String uri)
uri
- URI of extension element to look forpublic void setExcludeResultPrefixes(StringVector v)
v
- A StringVector of prefixes to excludepublic String getExcludeResultPrefix(int i) throws ArrayIndexOutOfBoundsException
i
- Index of prefix to get in listArrayIndexOutOfBoundsException
public int getExcludeResultPrefixCount()
public boolean containsExcludeResultPrefix(String prefix, String uri)
containsExcludeResultPrefix
in class ElemTemplateElement
prefix
- non-null reference to prefix that might be excluded.uri
- reference to namespace that prefix maps topublic void setId(String v)
v
- Value for the "id" property.public String getId()
public void setVersion(String v)
v
- Value for the "version" property.public boolean getCompatibleMode()
public String getVersion()
public void setImport(StylesheetComposed v)
v
- Stylesheet to add to the import listpublic StylesheetComposed getImport(int i) throws ArrayIndexOutOfBoundsException
i
- Index of the stylesheet to getArrayIndexOutOfBoundsException
public int getImportCount()
public void setInclude(Stylesheet v)
v
- Stylesheet to add to the "include" listpublic Stylesheet getInclude(int i) throws ArrayIndexOutOfBoundsException
i
- Index of stylesheet to getArrayIndexOutOfBoundsException
public int getIncludeCount()
public void setDecimalFormat(DecimalFormatProperties edf)
edf
- Decimal-format element to push into stackpublic DecimalFormatProperties getDecimalFormat(QName name)
name
- The qualified name of the decimal format property.DecimalFormatProperties
,
format-number in XSLT Specificationpublic DecimalFormatProperties getDecimalFormat(int i) throws ArrayIndexOutOfBoundsException
i
- Index of decimal-format property in stackArrayIndexOutOfBoundsException
DecimalFormatProperties
public int getDecimalFormatCount()
DecimalFormatProperties
public void setStripSpaces(WhiteSpaceInfo wsi)
wsi
- WhiteSpaceInfo element to add to listpublic WhiteSpaceInfo getStripSpace(int i) throws ArrayIndexOutOfBoundsException
i
- Index of WhiteSpaceInfo to getArrayIndexOutOfBoundsException
public int getStripSpaceCount()
public void setPreserveSpaces(WhiteSpaceInfo wsi)
wsi
- WhiteSpaceInfo element to add to listpublic WhiteSpaceInfo getPreserveSpace(int i) throws ArrayIndexOutOfBoundsException
i
- Index of WhiteSpaceInfo to getArrayIndexOutOfBoundsException
public int getPreserveSpaceCount()
public void setOutput(OutputProperties v)
v
- non-null reference to the OutputProperties object to be
added to the collection.public OutputProperties getOutput(int i) throws ArrayIndexOutOfBoundsException
i
- Index of OutputFormatExtended to getArrayIndexOutOfBoundsException
public int getOutputCount()
public void setKey(KeyDeclaration v)
v
- KeyDeclaration element to add to the list of key declarationspublic KeyDeclaration getKey(int i) throws ArrayIndexOutOfBoundsException
i
- Index of KeyDeclaration element to getArrayIndexOutOfBoundsException
public int getKeyCount()
public void setAttributeSet(ElemAttributeSet attrSet)
attrSet
- ElemAttributeSet to add to the list of attribute setspublic ElemAttributeSet getAttributeSet(int i) throws ArrayIndexOutOfBoundsException
i
- Index of ElemAttributeSet to get in listArrayIndexOutOfBoundsException
public int getAttributeSetCount()
public void setVariable(ElemVariable v)
v
- ElemVariable object to add to list of top level variablespublic ElemVariable getVariableOrParam(QName qname)
qname
- non-null reference to the qualified name of the variable.public ElemVariable getVariable(QName qname)
qname
- Qualified name of the xsl:variable to getpublic ElemVariable getVariableOrParam(int i) throws ArrayIndexOutOfBoundsException
i
- Index of variable to get in the listArrayIndexOutOfBoundsException
public int getVariableOrParamCount()
public void setParam(ElemParam v)
v
- A non-null ElemParam reference.public ElemParam getParam(QName qname)
qname
- non-null reference to qualified name of the parameter.public void setTemplate(ElemTemplate v)
v
- ElemTemplate to add to list of templatespublic ElemTemplate getTemplate(int i) throws TransformerException
i
- Index of ElemTemplate in the list to getTransformerException
public int getTemplateCount()
public void setNamespaceAlias(NamespaceAlias na)
na
- NamespaceAlias elemeent to add to the listpublic NamespaceAlias getNamespaceAlias(int i) throws ArrayIndexOutOfBoundsException
i
- Index of NamespaceAlias element to get from the listArrayIndexOutOfBoundsException
public int getNamespaceAliasCount()
public void setNonXslTopLevel(QName name, Object obj)
name
- Qualified name of the elementobj
- The element objectpublic Object getNonXslTopLevel(QName name)
name
- Qualified name of the element to getpublic String getHref()
public void setHref(String baseIdent)
baseIdent
- the base identifier with which this stylesheet is associated.public void setLocaterInfo(SourceLocator locator)
setLocaterInfo
in class ElemTemplateElement
locator
- SourceLocator object with location informationpublic StylesheetRoot getStylesheetRoot()
getStylesheetRoot
in class ElemTemplateElement
public void setStylesheetRoot(StylesheetRoot v)
v
- the root of the stylesheetpublic Stylesheet getStylesheetParent()
public void setStylesheetParent(Stylesheet v)
v
- the parent of the stylesheet.public StylesheetComposed getStylesheetComposed()
getStylesheetComposed
in class ElemTemplateElement
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class ElemTemplateElement
public int getXSLToken()
getXSLToken
in class ElemTemplateElement
Constants
public String getNodeName()
getNodeName
in interface Node
getNodeName
in class ElemTemplateElement
public void replaceTemplate(ElemTemplate v, int i) throws TransformerException
v
- Compiled template to replace withi
- Index of template to be replacedTransformerException
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs)
callChildVisitors
in class ElemTemplateElement
visitor
- The visitor whose appropriate method will be called.protected boolean accept(XSLTVisitor visitor)
accept
in class ElemTemplateElement
visitor
- The visitor whose appropriate method will be called.Copyright © 2017 JBoss by Red Hat. All rights reserved.