Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.xml.utils.UnImplNode
org.apache.xalan.templates.ElemTemplateElement
org.apache.xalan.templates.ElemForEach
<!ELEMENT xsl:for-each (#PCDATA %instructions; %result-elements; | xsl:sort) > <!ATTLIST xsl:for-each select %expr; #REQUIRED %space-att; >
for-each in XSLT Specification
Nested Class Summary |
Field Summary | |
boolean |
|
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 | |
|
Method Summary | |
ElemTemplateElement |
|
void |
|
void |
|
void |
|
void |
|
Expression | |
String |
|
Expression |
|
ElemSort |
|
int |
|
int |
|
void |
|
void | |
void |
|
DTMIterator |
|
void |
|
public boolean m_doc_cache_off
This is set by an "xalan-doc-cache-off" pi, or the old "xalan:doc-cache-off" pi. The old form of the PI only works for XML parsers that are not namespace aware. It tells the engine that documents created in the location paths executed by this element will not be reparsed. It's set by StylesheetHandler during construction. Note that this feature applies _only_ to xsl:for-each elements in its current incarnation; a more general cache management solution is desperately needed.
public ElemTemplateElement appendChild(ElemTemplateElement newChild)
Add a child to the child list. <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> <!ATTLIST xsl:apply-templates select %expr; "node()" mode %qname; #IMPLIED >
- Overrides:
- appendChild in interface ElemTemplateElement
- Parameters:
newChild
- Child to add to child list
- Returns:
- Child just added to child list
public void callChildVisitors(XSLTVisitor visitor, boolean callAttributes)
Call the children visitors.
- Parameters:
visitor
- The visitor whose appropriate method will be called.
public void compose(StylesheetRoot sroot) throws 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. NEEDSDOC @param sroot
- Overrides:
- compose in interface ElemTemplateElement
- Throws:
TransformerException
-
public void endCompose(StylesheetRoot sroot) throws TransformerException
This after the template's children have been composed.
- Overrides:
- endCompose in interface ElemTemplateElement
public void execute(TransformerImpl transformer) throws TransformerException
Execute the xsl:for-each transformation
- Overrides:
- execute in interface ElemTemplateElement
- Parameters:
transformer
- non-null reference to the the current transform-time state.
- Throws:
TransformerException
-
public Expression getExpression()
- Specified by:
- getExpression in interface ExpressionOwner
- See Also:
ExpressionOwner.getExpression()
public String getNodeName()
Return the node name.
- Specified by:
- getNodeName in interface Node
- Overrides:
- getNodeName in interface ElemTemplateElement
- Returns:
- The element's name
public Expression getSelect()
Get the "select" attribute.
- Returns:
- The XPath expression for the "select" attribute.
public ElemSort getSortElem(int i)
Get a xsl:sort element associated with this element.
- Parameters:
i
- Index of xsl:sort element to get
- Returns:
- xsl:sort element at given index
public int getSortElemCount()
Get the count xsl:sort elements associated with this element.
- Returns:
- The number of xsl:sort elements.
public int getXSLToken()
Get an int constant identifying the type of element.
- Overrides:
- getXSLToken in interface ElemTemplateElement
- Returns:
- The token ID for this element
- See Also:
Constants
public void setExpression(Expression exp)
- Specified by:
- setExpression in interface ExpressionOwner
public void setSelect(XPath xpath)
Set the "select" attribute.
- Parameters:
xpath
- The XPath expression for the "select" attribute.
public void setSortElem(ElemSort sortElem)
Set a xsl:sort element associated with this element.
- Parameters:
sortElem
- xsl:sort element to set
public DTMIterator sortNodes(XPathContext xctxt, Vector keys, DTMIterator sourceNodes) throws TransformerException
Sort given nodes
- Parameters:
xctxt
- The XPath runtime state for the sort.keys
- Vector of sort keyxsourceNodes
- Iterator of nodes to sort
- Returns:
- iterator of sorted nodes
- Throws:
TransformerException
-
public void transformSelectedNodes(TransformerImpl transformer) throws TransformerException
Perform a query if needed, and call transformNode for each child.
- Parameters:
transformer
- non-null reference to the the current transform-time state.
- Throws:
TransformerException
- Thrown in a variety of circumstances.