|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.UnImplNode org.apache.xalan.templates.ElemTemplateElement org.apache.xalan.templates.Stylesheet
public class Stylesheet
Represents a stylesheet element.
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.
Field Summary | |
---|---|
private java.util.Vector |
m_attributeSets
The "xsl:attribute-set" property. |
(package private) java.util.Stack |
m_DecimalFormatDeclarations
Table of tables of element decimal-format. |
private StringVector |
m_ExcludeResultPrefixs
The "exclude-result-prefixes" property. |
private StringVector |
m_ExtensionElementURIs
The "extension-element-prefixes" property, actually contains URIs. |
private java.lang.String |
m_href
The base URL of the XSL document. |
private java.lang.String |
m_Id
The "id" property. |
private java.util.Vector |
m_imports
The "xsl:import" list. |
private java.util.Vector |
m_includes
The "xsl:include" properties. |
private boolean |
m_isCompatibleMode
Whether or not the stylesheet is in "Forward Compatibility Mode" |
private java.util.Vector |
m_keyDeclarations
The "xsl:key" property. |
private java.util.Hashtable |
m_NonXslTopLevel
The "non-xsl-top-level" properties. |
private java.util.Vector |
m_output
The "xsl:output" properties. |
private java.util.Vector |
m_prefix_aliases
The "xsl:namespace-alias" properties. |
private java.lang.String |
m_publicId
The doctype-public element. |
private Stylesheet |
m_stylesheetParent
The parent of the stylesheet. |
private StylesheetRoot |
m_stylesheetRoot
The root of the stylesheet, where all the tables common to all stylesheets are kept. |
private java.lang.String |
m_systemId
The doctype-system element. |
private java.util.Vector |
m_templates
The "xsl:template" properties. |
private java.util.Vector |
m_topLevelVariables
The "xsl:variable" and "xsl:param" properties. |
private java.lang.String |
m_Version
The "version" property. |
private java.util.Vector |
m_whitespacePreservingElements
The "xsl:preserve-space" property, A lookup table of all space preserving elements. |
private java.util.Vector |
m_whitespaceStrippingElements
The "xsl:strip-space" properties, A lookup table of all space stripping elements. |
private java.lang.String |
m_XmlnsXsl
The "xmlns:xsl" property. |
(package private) static long |
serialVersionUID
|
static java.lang.String |
STYLESHEET_EXT
Extension to be used when serializing to disk. |
Fields inherited from class org.apache.xalan.templates.ElemTemplateElement |
---|
m_docOrderNumber, m_firstChild, m_hasVariableDecl, m_nextSibling, m_parentNode |
Fields inherited from class org.apache.xml.utils.UnImplNode |
---|
actualEncoding, fDocumentURI |
Fields inherited from interface org.w3c.dom.Node |
---|
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 |
Fields inherited from interface org.w3c.dom.Node |
---|
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 |
Fields inherited from interface org.w3c.dom.Node |
---|
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 Summary | |
---|---|
Stylesheet(Stylesheet parent)
Constructor for a Stylesheet. |
Method Summary | |
---|---|
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(java.lang.String prefix,
java.lang.String uri)
Get whether or not the passed prefix is contained flagged by the "exclude-result-prefixes" property. |
boolean |
containsExtensionElementURI(java.lang.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. |
java.lang.String |
getExcludeResultPrefix(int i)
Get an "exclude-result-prefix" property. |
int |
getExcludeResultPrefixCount()
Get the number of "exclude-result-prefixes" Strings. |
java.lang.String |
getExtensionElementPrefix(int i)
Get and "extension-element-prefix" property. |
int |
getExtensionElementPrefixCount()
Get the number of "extension-element-prefixes" Strings. |
java.lang.String |
getHref()
Get the base identifier with which this stylesheet is associated. |
java.lang.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. |
java.lang.String |
getNodeName()
Return the node name. |
short |
getNodeType()
Get the type of the node. |
java.lang.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. |
java.lang.String |
getVersion()
Get the "version" property. |
java.lang.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. |
private void |
readObject(java.io.ObjectInputStream stream)
Read the stylesheet from a serialization stream. |
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(java.lang.String baseIdent)
Set the base identifier with which this stylesheet is associated. |
void |
setId(java.lang.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(javax.xml.transform.SourceLocator locator)
Set the location information for this element. |
void |
setNamespaceAlias(NamespaceAlias na)
Set the "xsl:namespace-alias" property. |
void |
setNonXslTopLevel(QName name,
java.lang.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(java.lang.String v)
Set the "version" property. |
void |
setXmlnsXsl(java.lang.String v)
Set the "xmlns:xsl" property. |
private void |
writeObject(java.io.ObjectOutputStream stream)
Write out the given output stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
public static final java.lang.String STYLESHEET_EXT
private java.lang.String m_XmlnsXsl
private StringVector m_ExtensionElementURIs
private StringVector m_ExcludeResultPrefixs
private java.lang.String m_Id
private java.lang.String m_Version
private boolean m_isCompatibleMode
private java.util.Vector m_imports
private java.util.Vector m_includes
java.util.Stack m_DecimalFormatDeclarations
DecimalFormatProperties
private java.util.Vector m_whitespaceStrippingElements
private java.util.Vector m_whitespacePreservingElements
private java.util.Vector m_output
private java.util.Vector m_keyDeclarations
private java.util.Vector m_attributeSets
private java.util.Vector m_topLevelVariables
private java.util.Vector m_templates
private java.util.Vector m_prefix_aliases
private java.util.Hashtable m_NonXslTopLevel
private java.lang.String m_href
private java.lang.String m_publicId
private java.lang.String m_systemId
private StylesheetRoot m_stylesheetRoot
private Stylesheet m_stylesheetParent
Constructor Detail |
---|
public Stylesheet(Stylesheet parent)
parent
- The including or importing stylesheet.Method Detail |
---|
public Stylesheet getStylesheet()
getStylesheet
in class ElemTemplateElement
public boolean isAggregatedType()
public boolean isRoot()
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, javax.xml.transform.TransformerException
stream
- Input stream to read from
java.io.IOException
javax.xml.transform.TransformerException
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
stream
- The output stream to write out
java.io.IOException
public void setXmlnsXsl(java.lang.String v)
v
- The value to be set for the "xmlns:xsl" property.public java.lang.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 java.lang.String getExtensionElementPrefix(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of extension element URI in list
java.lang.ArrayIndexOutOfBoundsException
public int getExtensionElementPrefixCount()
public boolean containsExtensionElementURI(java.lang.String uri)
uri
- URI of extension element to look for
public void setExcludeResultPrefixes(StringVector v)
v
- A StringVector of prefixes to excludepublic java.lang.String getExcludeResultPrefix(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of prefix to get in list
java.lang.ArrayIndexOutOfBoundsException
public int getExcludeResultPrefixCount()
public boolean containsExcludeResultPrefix(java.lang.String prefix, java.lang.String uri)
containsExcludeResultPrefix
in class ElemTemplateElement
prefix
- non-null reference to prefix that might be excluded.uri
- reference to namespace that prefix maps to
public void setId(java.lang.String v)
v
- Value for the "id" property.public java.lang.String getId()
public void setVersion(java.lang.String v)
v
- Value for the "version" property.public boolean getCompatibleMode()
public java.lang.String getVersion()
public void setImport(StylesheetComposed v)
v
- Stylesheet to add to the import listpublic StylesheetComposed getImport(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of the stylesheet to get
java.lang.ArrayIndexOutOfBoundsException
public int getImportCount()
public void setInclude(Stylesheet v)
v
- Stylesheet to add to the "include" listpublic Stylesheet getInclude(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of stylesheet to get
java.lang.ArrayIndexOutOfBoundsException
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 java.lang.ArrayIndexOutOfBoundsException
i
- Index of decimal-format property in stack
java.lang.ArrayIndexOutOfBoundsException
DecimalFormatProperties
public int getDecimalFormatCount()
DecimalFormatProperties
public void setStripSpaces(WhiteSpaceInfo wsi)
wsi
- WhiteSpaceInfo element to add to listpublic WhiteSpaceInfo getStripSpace(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of WhiteSpaceInfo to get
java.lang.ArrayIndexOutOfBoundsException
public int getStripSpaceCount()
public void setPreserveSpaces(WhiteSpaceInfo wsi)
wsi
- WhiteSpaceInfo element to add to listpublic WhiteSpaceInfo getPreserveSpace(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of WhiteSpaceInfo to get
java.lang.ArrayIndexOutOfBoundsException
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 java.lang.ArrayIndexOutOfBoundsException
i
- Index of OutputFormatExtended to get
java.lang.ArrayIndexOutOfBoundsException
public int getOutputCount()
public void setKey(KeyDeclaration v)
v
- KeyDeclaration element to add to the list of key declarationspublic KeyDeclaration getKey(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of KeyDeclaration element to get
java.lang.ArrayIndexOutOfBoundsException
public int getKeyCount()
public void setAttributeSet(ElemAttributeSet attrSet)
attrSet
- ElemAttributeSet to add to the list of attribute setspublic ElemAttributeSet getAttributeSet(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of ElemAttributeSet to get in list
java.lang.ArrayIndexOutOfBoundsException
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 get
public ElemVariable getVariableOrParam(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of variable to get in the list
java.lang.ArrayIndexOutOfBoundsException
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 javax.xml.transform.TransformerException
i
- Index of ElemTemplate in the list to get
javax.xml.transform.TransformerException
public int getTemplateCount()
public void setNamespaceAlias(NamespaceAlias na)
na
- NamespaceAlias elemeent to add to the listpublic NamespaceAlias getNamespaceAlias(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- Index of NamespaceAlias element to get from the list
java.lang.ArrayIndexOutOfBoundsException
public int getNamespaceAliasCount()
public void setNonXslTopLevel(QName name, java.lang.Object obj)
name
- Qualified name of the elementobj
- The element objectpublic java.lang.Object getNonXslTopLevel(QName name)
name
- Qualified name of the element to get
public java.lang.String getHref()
public void setHref(java.lang.String baseIdent)
baseIdent
- the base identifier with which this stylesheet is associated.public void setLocaterInfo(javax.xml.transform.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 org.w3c.dom.Node
getNodeType
in class ElemTemplateElement
public int getXSLToken()
getXSLToken
in class ElemTemplateElement
Constants
public java.lang.String getNodeName()
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class ElemTemplateElement
public void replaceTemplate(ElemTemplate v, int i) throws javax.xml.transform.TransformerException
v
- Compiled template to replace withi
- Index of template to be replaced
javax.xml.transform.TransformerException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |