|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xalan.transformer.KeyTable
public class KeyTable
Table of element keys, keyed by document node. An instance of this class is keyed by a Document node that should be matched with the root of the current context.
| Field Summary | |
|---|---|
private int |
m_docKey
The document key. |
private java.util.Vector |
m_keyDeclarations
Vector of KeyDeclaration instances holding the key declarations. |
private XNodeSet |
m_keyNodes
The main iterator that will walk through the source tree for this key. |
private java.util.Hashtable |
m_refsTable
Hold a cache of key() function result for each ref. |
| Constructor Summary | |
|---|---|
KeyTable(int doc,
PrefixResolver nscontext,
QName name,
java.util.Vector keyDeclarations,
XPathContext xctxt)
Build a keys table. |
|
| Method Summary | |
|---|---|
private void |
addValueInRefsTable(XPathContext xctxt,
XMLString ref,
int node)
Add an association between a ref and a node in the m_refsTable. |
int |
getDocKey()
Get the document root matching this key. |
private java.util.Vector |
getKeyDeclarations()
|
(package private) KeyIterator |
getKeyIterator()
|
QName |
getKeyTableName()
Get Key Name for this KeyTable |
XNodeSet |
getNodeSetDTMByKey(QName name,
XMLString ref)
Given a valid element key, return the corresponding node list. |
private java.util.Hashtable |
getRefsTable()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int m_docKey
private java.util.Vector m_keyDeclarations
private java.util.Hashtable m_refsTable
private XNodeSet m_keyNodes
| Constructor Detail |
|---|
public KeyTable(int doc,
PrefixResolver nscontext,
QName name,
java.util.Vector keyDeclarations,
XPathContext xctxt)
throws javax.xml.transform.TransformerException
doc - The owner document key.nscontext - The stylesheet's namespace context.name - The key namekeyDeclarations - The stylesheet's xsl:key declarations.
javax.xml.transform.TransformerException| Method Detail |
|---|
public int getDocKey()
KeyIterator getKeyIterator()
public XNodeSet getNodeSetDTMByKey(QName name,
XMLString ref)
name - The name of the key, which must match the 'name' attribute on xsl:key.ref - The value that must match the value found by the 'match' attribute on xsl:key.
name and the reference ref. If no node is referenced by this key, an empty node set is returned.public QName getKeyTableName()
private java.util.Vector getKeyDeclarations()
private java.util.Hashtable getRefsTable()
private void addValueInRefsTable(XPathContext xctxt,
XMLString ref,
int node)
xctxt - XPath contextref - the value of the use clause of the current key for the given nodenode - the node to reference
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||