|
|||||||||
| Home >> All >> org >> apache >> xalan >> [ templates overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xalan.templates
Class ElemLiteralResult

java.lang.Objectorg.apache.xml.utils.UnImplNode
org.apache.xalan.templates.ElemTemplateElement
org.apache.xalan.templates.ElemUse
org.apache.xalan.templates.ElemLiteralResult
- All Implemented Interfaces:
- org.w3c.dom.Document, org.w3c.dom.Element, org.apache.xpath.ExpressionNode, org.w3c.dom.Node, org.w3c.dom.NodeList, org.apache.xml.utils.PrefixResolver, java.io.Serializable, javax.xml.transform.SourceLocator, org.apache.xpath.WhitespaceStrippingElementMatcher, XSLTVisitable
- Direct Known Subclasses:
- ElemExtensionCall, ElemUnknown
- public class ElemLiteralResult
- extends ElemUse
Implement a Literal Result Element.
| Field Summary | |
private boolean |
isLiteralResultAsStylesheet
Tells if this element represents a root element that is also the stylesheet element. |
private java.util.Vector |
m_avts
The created element node will have the attribute nodes that were present on the element node in the stylesheet tree, other than attributes with names in the XSLT namespace. |
private org.apache.xml.utils.StringVector |
m_excludeResultPrefixes
The "exclude-result-prefixes" property. |
private org.apache.xml.utils.StringVector |
m_ExtensionElementURIs
The "extension-element-prefixes" property, actually contains URIs. |
private java.lang.String |
m_localName
The local name of the element to be created. |
private java.lang.String |
m_namespace
The namespace of the element to be created. |
private java.lang.String |
m_rawName
The raw name of the element to be created. |
private java.lang.String |
m_version
The XSLT version as specified by this element. |
private java.util.Vector |
m_xslAttr
List of attributes with the XSLT namespace. |
| Fields inherited from class org.apache.xalan.templates.ElemUse |
|
| Fields inherited from class org.apache.xalan.templates.ElemTemplateElement |
m_docOrderNumber, m_firstChild, m_hasVariableDecl, m_nextSibling, m_parentNode, m_prefixTable |
| Constructor Summary | |
ElemLiteralResult()
|
|
| Method Summary | |
protected boolean |
accept(XSLTVisitor visitor)
Accept a visitor and call the appropriate method for this class. |
void |
addLiteralResultAttribute(AVT avt)
Set a literal result attribute (AVTs only). |
void |
addLiteralResultAttribute(java.lang.String att)
Set a literal result attribute (used for xsl attributes). |
protected void |
callChildVisitors(XSLTVisitor visitor,
boolean callAttrs)
Call the children visitors. |
void |
compose(StylesheetRoot sroot)
This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition. |
boolean |
containsExcludeResultPrefix(java.lang.String prefix,
java.lang.String uri)
Get whether or not the passed URL is flagged by the "extension-element-prefixes" or "exclude-result-prefixes" properties. |
boolean |
containsExtensionElementURI(java.lang.String uri)
Find out if the given "extension-element-prefix" property is defined. |
java.util.Enumeration |
enumerateLiteralResultAttributes()
Compiling templates requires that we be able to list the AVTs ADDED 9/5/2000 to support compilation experiment |
private boolean |
excludeResultNSDecl(java.lang.String prefix,
java.lang.String uri)
Tell if the result namespace decl should be excluded. |
void |
execute(org.apache.xalan.transformer.TransformerImpl transformer)
Copy a Literal Result Element into the Result tree, copy the non-excluded namespace attributes, copy the attributes not of the XSLT namespace, and execute the children of the LRE. |
java.lang.String |
getExtensionElementPrefix(int i)
Get an "extension-element-prefix" property. |
int |
getExtensionElementPrefixCount()
Get the number of "extension-element-prefixes" Strings. |
boolean |
getIsLiteralResultAsStylesheet()
Return whether this element represents a root element that is also the stylesheet element. |
AVT |
getLiteralResultAttribute(java.lang.String name)
Get a literal result attribute by name. |
java.lang.String |
getLocalName()
Get the local name of the Literal Result Element. |
java.lang.String |
getNamespace()
Get the original namespace of the Literal Result Element. |
java.lang.String |
getNodeName()
Return the node name. |
java.lang.String |
getPrefix()
Get the prefix part of the raw name of the Literal Result Element. |
java.lang.String |
getRawName()
Get the raw name of the Literal Result Element. |
java.lang.String |
getVersion()
Get the "version" property. |
int |
getXSLToken()
Get an int constant identifying the type of element. |
(package private) boolean |
needToCheckExclude()
Return whether we need to check namespace prefixes against the exclude result prefixes or extensions lists. |
void |
resolvePrefixTables()
Augment resolvePrefixTables, resolving the namespace aliases once the superclass has resolved the tables. |
void |
setExcludeResultPrefixes(org.apache.xml.utils.StringVector v)
Set the "exclude-result-prefixes" property. |
void |
setExtensionElementPrefixes(org.apache.xml.utils.StringVector v)
Set the "extension-element-prefixes" property. |
void |
setIsLiteralResultAsStylesheet(boolean b)
Set whether this element represents a root element that is also the stylesheet element. |
void |
setLocalName(java.lang.String localName)
Set the local name of the LRE. |
void |
setNamespace(java.lang.String ns)
Set the namespace URI of the result element to be created. |
void |
setRawName(java.lang.String rawName)
Set the raw name of the LRE. |
void |
setVersion(java.lang.String v)
Set the "version" property. |
void |
setXmlSpace(AVT avt)
Set the "xml:space" attribute. |
| Methods inherited from class org.apache.xalan.templates.ElemUse |
applyAttrSets, getUseAttributeSets, setUseAttributeSets, setUseAttributeSets |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
compareDocumentPosition, getBaseURI, getFeature, getTextContent, getUserData, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, setTextContent, setUserData |
| Methods inherited from interface org.w3c.dom.Element |
getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| Methods inherited from interface org.w3c.dom.Document |
getDocumentURI, getDomConfig, getInputEncoding, getXmlEncoding, getXmlStandalone, getXmlVersion, normalizeDocument, renameNode, setDocumentURI, setXmlStandalone, setXmlVersion |
| Field Detail |
isLiteralResultAsStylesheet
private boolean isLiteralResultAsStylesheet
- Tells if this element represents a root element
that is also the stylesheet element.
TODO: This should be a derived class.
m_avts
private java.util.Vector m_avts
- The created element node will have the attribute nodes
that were present on the element node in the stylesheet tree,
other than attributes with names in the XSLT namespace.
m_xslAttr
private java.util.Vector m_xslAttr
- List of attributes with the XSLT namespace.
m_namespace
private java.lang.String m_namespace
- The namespace of the element to be created.
m_localName
private java.lang.String m_localName
- The local name of the element to be created.
m_rawName
private java.lang.String m_rawName
- The raw name of the element to be created.
m_ExtensionElementURIs
private org.apache.xml.utils.StringVector m_ExtensionElementURIs
- The "extension-element-prefixes" property, actually contains URIs.
m_version
private java.lang.String m_version
- The XSLT version as specified by this element.
m_excludeResultPrefixes
private org.apache.xml.utils.StringVector m_excludeResultPrefixes
- The "exclude-result-prefixes" property.
| Constructor Detail |
ElemLiteralResult
public ElemLiteralResult()
| Method Detail |
setIsLiteralResultAsStylesheet
public void setIsLiteralResultAsStylesheet(boolean b)
- Set whether this element represents a root element
that is also the stylesheet element.
getIsLiteralResultAsStylesheet
public boolean getIsLiteralResultAsStylesheet()
- Return whether this element represents a root element
that is also the stylesheet element.
compose
public void compose(StylesheetRoot sroot) throws javax.xml.transform.TransformerException
- This function is called after everything else has been
recomposed, and allows the template to set remaining
values that may be based on some other property that
depends on recomposition.
- Overrides:
composein classElemTemplateElement
addLiteralResultAttribute
public void addLiteralResultAttribute(AVT avt)
- Set a literal result attribute (AVTs only).
addLiteralResultAttribute
public void addLiteralResultAttribute(java.lang.String att)
- Set a literal result attribute (used for xsl attributes).
setXmlSpace
public void setXmlSpace(AVT avt)
- Set the "xml:space" attribute.
A text node is preserved if an ancestor element of the text node
has an xml:space attribute with a value of preserve, and
no closer ancestor element has xml:space with a value of default.
getLiteralResultAttribute
public AVT getLiteralResultAttribute(java.lang.String name)
- Get a literal result attribute by name.
containsExcludeResultPrefix
public boolean containsExcludeResultPrefix(java.lang.String prefix, java.lang.String uri)
- Get whether or not the passed URL is flagged by
the "extension-element-prefixes" or "exclude-result-prefixes"
properties.
- Overrides:
containsExcludeResultPrefixin classElemTemplateElement
resolvePrefixTables
public void resolvePrefixTables()
throws javax.xml.transform.TransformerException
- Augment resolvePrefixTables, resolving the namespace aliases once
the superclass has resolved the tables.
- Overrides:
resolvePrefixTablesin classElemTemplateElement
needToCheckExclude
boolean needToCheckExclude()
- Return whether we need to check namespace prefixes
against the exclude result prefixes or extensions lists.
Note that this will create a new prefix table if one
has not been created already.
NEEDSDOC ($objectName$) @return
- Overrides:
needToCheckExcludein classElemTemplateElement
setNamespace
public void setNamespace(java.lang.String ns)
- Set the namespace URI of the result element to be created.
Note that after resolvePrefixTables has been called, this will
return the aliased result namespace, not the original stylesheet
namespace.
getNamespace
public java.lang.String getNamespace()
- Get the original namespace of the Literal Result Element.
%REVIEW% Why isn't this overriding the getNamespaceURI method
rather than introducing a new one?
setLocalName
public void setLocalName(java.lang.String localName)
- Set the local name of the LRE.
getLocalName
public java.lang.String getLocalName()
- Get the local name of the Literal Result Element.
Note that after resolvePrefixTables has been called, this will
return the aliased name prefix, not the original stylesheet
namespace prefix.
- Specified by:
getLocalNamein interfaceorg.w3c.dom.Node- Overrides:
getLocalNamein classElemTemplateElement
setRawName
public void setRawName(java.lang.String rawName)
- Set the raw name of the LRE.
getRawName
public java.lang.String getRawName()
- Get the raw name of the Literal Result Element.
getPrefix
public java.lang.String getPrefix()
- Get the prefix part of the raw name of the Literal Result Element.
setExtensionElementPrefixes
public void setExtensionElementPrefixes(org.apache.xml.utils.StringVector v)
- Set the "extension-element-prefixes" property.
getExtensionElementPrefix
public java.lang.String getExtensionElementPrefix(int i) throws java.lang.ArrayIndexOutOfBoundsException
- Get an "extension-element-prefix" property.
getExtensionElementPrefixCount
public int getExtensionElementPrefixCount()
- Get the number of "extension-element-prefixes" Strings.
containsExtensionElementURI
public boolean containsExtensionElementURI(java.lang.String uri)
- Find out if the given "extension-element-prefix" property is defined.
getXSLToken
public int getXSLToken()
- Get an int constant identifying the type of element.
- Overrides:
getXSLTokenin classElemTemplateElement
getNodeName
public java.lang.String getNodeName()
- Return the node name.
- Specified by:
getNodeNamein interfaceorg.w3c.dom.Node- Overrides:
getNodeNamein classElemTemplateElement
setVersion
public void setVersion(java.lang.String v)
- Set the "version" property.
getVersion
public java.lang.String getVersion()
- Get the "version" property.
setExcludeResultPrefixes
public void setExcludeResultPrefixes(org.apache.xml.utils.StringVector v)
- Set the "exclude-result-prefixes" property.
The designation of a namespace as an excluded namespace is
effective within the subtree of the stylesheet rooted at
the element bearing the exclude-result-prefixes or
xsl:exclude-result-prefixes attribute; a subtree rooted
at an xsl:stylesheet element does not include any stylesheets
imported or included by children of that xsl:stylesheet element.
excludeResultNSDecl
private boolean excludeResultNSDecl(java.lang.String prefix, java.lang.String uri) throws javax.xml.transform.TransformerException
- Tell if the result namespace decl should be excluded. Should be called before
namespace aliasing (I think).
execute
public void execute(org.apache.xalan.transformer.TransformerImpl transformer) throws javax.xml.transform.TransformerException
- Copy a Literal Result Element into the Result tree, copy the
non-excluded namespace attributes, copy the attributes not
of the XSLT namespace, and execute the children of the LRE.
enumerateLiteralResultAttributes
public java.util.Enumeration enumerateLiteralResultAttributes()
- Compiling templates requires that we be able to list the AVTs
ADDED 9/5/2000 to support compilation experiment
accept
protected boolean accept(XSLTVisitor visitor)
- Accept a visitor and call the appropriate method
for this class.
- Overrides:
acceptin classElemTemplateElement
callChildVisitors
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs)
- Call the children visitors.
- Overrides:
callChildVisitorsin classElemTemplateElement
|
|||||||||
| Home >> All >> org >> apache >> xalan >> [ templates overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC