|
||||||||||
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
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 Vector |
m_attributeSets
The "xsl:attribute-set" property. |
(package private) 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 String |
m_href
The base URL of the XSL document. |
private String |
m_Id
The "id" property. |
private Vector |
m_imports
The "xsl:import" list. |
private Vector |
m_includes
The "xsl:include" properties. |
private Vector |
m_keyDeclarations
The "xsl:key" property. |
private Hashtable |
m_NonXslTopLevel
The "non-xsl-top-level" properties. |
private Vector |
m_output
The "xsl:output" properties. |
private Vector |
m_prefix_aliases
The "xsl:namespace-alias" properties. |
private 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 String |
m_systemId
The doctype-system element. |
private Vector |
m_templates
The "xsl:template" properties. |
private Vector |
m_topLevelVariables
The "xsl:variable" and "xsl:param" properties. |
private String |
m_Version
The "version" property. |
private Vector |
m_whitespacePreservingElements
The "xsl:preserve-space" property, A lookup table of all space preserving elements. |
private Vector |
m_whitespaceStrippingElements
The "xsl:strip-space" properties, A lookup table of all space stripping elements. |
private String |
m_XmlnsXsl
The "xmlns:xsl" property. |
static 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, m_prefixTable |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, 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(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. |
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. |
private void |
readObject(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(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(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,
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. |
private void |
writeObject(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 |
public static final String STYLESHEET_EXT
private String m_XmlnsXsl
private StringVector m_ExtensionElementURIs
private StringVector m_ExcludeResultPrefixs
private String m_Id
private String m_Version
private Vector m_imports
private Vector m_includes
Stack m_DecimalFormatDeclarations
DecimalFormatProperties
private Vector m_whitespaceStrippingElements
private Vector m_whitespacePreservingElements
private Vector m_output
private Vector m_keyDeclarations
private Vector m_attributeSets
private Vector m_topLevelVariables
private Vector m_templates
private Vector m_prefix_aliases
private Hashtable m_NonXslTopLevel
private String m_href
private String m_publicId
private 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(ObjectInputStream stream) throws IOException, javax.xml.transform.TransformerException
stream
- Input stream to read from
IOException
javax.xml.transform.TransformerException
private void writeObject(ObjectOutputStream stream) throws IOException
stream
- The output stream to write out
IOException
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 list
ArrayIndexOutOfBoundsException
public int getExtensionElementPrefixCount()
public boolean containsExtensionElementURI(String uri)
uri
- URI of extension element to look for
public void setExcludeResultPrefixes(StringVector v)
v
- A StringVector of prefixes to excludepublic String getExcludeResultPrefix(int i) throws ArrayIndexOutOfBoundsException
i
- Index of prefix to get in list
ArrayIndexOutOfBoundsException
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 to
public void setId(String v)
v
- Value for the "id" property.public String getId()
public void setVersion(String v)
setVersion
in class UnImplNode
v
- Value for the "version" property.public String getVersion()
getVersion
in class UnImplNode
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 get
ArrayIndexOutOfBoundsException
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 get
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 ArrayIndexOutOfBoundsException
i
- Index of decimal-format property in stack
ArrayIndexOutOfBoundsException
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 get
ArrayIndexOutOfBoundsException
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 get
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 ArrayIndexOutOfBoundsException
i
- Index of OutputFormatExtended to get
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 ArrayIndexOutOfBoundsException
i
- Index of KeyDeclaration element to get
ArrayIndexOutOfBoundsException
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 list
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 ArrayIndexOutOfBoundsException
i
- Index of variable to get in the list
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 ArrayIndexOutOfBoundsException
i
- Index of NamespaceAlias element to get from the list
ArrayIndexOutOfBoundsException
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 get
public String getHref()
public void setHref(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 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 |