com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable Java Examples
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransformerImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * The translet stores all CDATA sections set in the <xsl:output> element * in a Hashtable. This method will re-construct the whitespace separated * list of elements given in the <xsl:output> element. */ private String makeCDATAString(Hashtable cdata) { // Return a 'null' string if no CDATA section elements were specified if (cdata == null) return null; final StringBuilder result = new StringBuilder(); // Get an enumeration of all the elements in the hashtable Enumeration elements = cdata.keys(); if (elements.hasMoreElements()) { result.append((String)elements.nextElement()); while (elements.hasMoreElements()) { String element = (String)elements.nextElement(); result.append(' '); result.append(element); } } return(result.toString()); }
Example #2
Source File: KeyIndex.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * <p>Given a context node and the second argument to the XSLT * <code>key</code> function, checks whether the context node is in the * set of nodes that results from that reference to the <code>key</code> * function. This is used in the implementation of key patterns.</p> * <p>This particular {@link KeyIndex} object is the result evaluating the * first argument to the <code>key</code> function, so it's not taken into * any further account.</p> * * @param node The context node * @param value The second argument to the <code>key</code> function * @return <code>1</code> if and only if the context node is in the set of * nodes returned by the reference to the <code>key</code> function; * <code>0</code>, otherwise */ public int containsKey(int node, Object value) { int rootHandle = _dom.getAxisIterator(Axis.ROOT) .setStartNode(node).next(); // Get the mapping table for the document containing the context node Hashtable index = (Hashtable) _rootToIndexMap.get(new Integer(rootHandle)); // Check whether the context node is present in the set of nodes // returned by the key function if (index != null) { final IntegerArray nodes = (IntegerArray) index.get(value); return (nodes != null && nodes.indexOf(node) >= 0) ? 1 : 0; } // The particular key name identifies no nodes in this document return 0; }
Example #3
Source File: SAXImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * %HZ% Need Javadoc */ public Hashtable getElementsWithIDs() { if (m_idAttributes == null) { return null; } // Convert a java.util.Hashtable to an xsltc.runtime.Hashtable Enumeration idValues = m_idAttributes.keys(); if (!idValues.hasMoreElements()) { return null; } Hashtable idAttrsTable = new Hashtable(); while (idValues.hasMoreElements()) { Object idValue = idValues.nextElement(); idAttrsTable.put(idValue, m_idAttributes.get(idValue)); } return idAttrsTable; }
Example #4
Source File: SAXImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * %HZ% Need Javadoc */ public Hashtable getElementsWithIDs() { if (m_idAttributes == null) { return null; } // Convert a java.util.Hashtable to an xsltc.runtime.Hashtable Enumeration idValues = m_idAttributes.keys(); if (!idValues.hasMoreElements()) { return null; } Hashtable idAttrsTable = new Hashtable(); while (idValues.hasMoreElements()) { Object idValue = idValues.nextElement(); idAttrsTable.put(idValue, m_idAttributes.get(idValue)); } return idAttrsTable; }
Example #5
Source File: TransformerImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * The translet stores all CDATA sections set in the <xsl:output> element * in a Hashtable. This method will re-construct the whitespace separated * list of elements given in the <xsl:output> element. */ private String makeCDATAString(Hashtable cdata) { // Return a 'null' string if no CDATA section elements were specified if (cdata == null) return null; final StringBuilder result = new StringBuilder(); // Get an enumeration of all the elements in the hashtable Enumeration elements = cdata.keys(); if (elements.hasMoreElements()) { result.append((String)elements.nextElement()); while (elements.hasMoreElements()) { String element = (String)elements.nextElement(); result.append(' '); result.append(element); } } return(result.toString()); }
Example #6
Source File: KeyIndex.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * <p>Given a context node and the second argument to the XSLT * <code>key</code> function, checks whether the context node is in the * set of nodes that results from that reference to the <code>key</code> * function. This is used in the implementation of key patterns.</p> * <p>This particular {@link KeyIndex} object is the result evaluating the * first argument to the <code>key</code> function, so it's not taken into * any further account.</p> * * @param node The context node * @param value The second argument to the <code>key</code> function * @return <code>1</code> if and only if the context node is in the set of * nodes returned by the reference to the <code>key</code> function; * <code>0</code>, otherwise */ public int containsKey(int node, Object value) { int rootHandle = _dom.getAxisIterator(Axis.ROOT) .setStartNode(node).next(); // Get the mapping table for the document containing the context node Hashtable index = (Hashtable) _rootToIndexMap.get(new Integer(rootHandle)); // Check whether the context node is present in the set of nodes // returned by the key function if (index != null) { final IntegerArray nodes = (IntegerArray) index.get(value); return (nodes != null && nodes.indexOf(node) >= 0) ? 1 : 0; } // The particular key name identifies no nodes in this document return 0; }
Example #7
Source File: KeyIndex.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * <p>Given a context node and the second argument to the XSLT * <code>key</code> function, checks whether the context node is in the * set of nodes that results from that reference to the <code>key</code> * function. This is used in the implementation of key patterns.</p> * <p>This particular {@link KeyIndex} object is the result evaluating the * first argument to the <code>key</code> function, so it's not taken into * any further account.</p> * * @param node The context node * @param value The second argument to the <code>key</code> function * @return <code>1</code> if and only if the context node is in the set of * nodes returned by the reference to the <code>key</code> function; * <code>0</code>, otherwise */ public int containsKey(int node, Object value) { int rootHandle = _dom.getAxisIterator(Axis.ROOT) .setStartNode(node).next(); // Get the mapping table for the document containing the context node Hashtable index = (Hashtable) _rootToIndexMap.get(new Integer(rootHandle)); // Check whether the context node is present in the set of nodes // returned by the key function if (index != null) { final IntegerArray nodes = (IntegerArray) index.get(value); return (nodes != null && nodes.indexOf(node) >= 0) ? 1 : 0; } // The particular key name identifies no nodes in this document return 0; }
Example #8
Source File: SAXImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * %HZ% Need Javadoc */ public Hashtable getElementsWithIDs() { if (m_idAttributes == null) { return null; } // Convert a java.util.Hashtable to an xsltc.runtime.Hashtable Enumeration idValues = m_idAttributes.keys(); if (!idValues.hasMoreElements()) { return null; } Hashtable idAttrsTable = new Hashtable(); while (idValues.hasMoreElements()) { Object idValue = idValues.nextElement(); idAttrsTable.put(idValue, m_idAttributes.get(idValue)); } return idAttrsTable; }
Example #9
Source File: TransformerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * The translet stores all CDATA sections set in the <xsl:output> element * in a Hashtable. This method will re-construct the whitespace separated * list of elements given in the <xsl:output> element. */ private String makeCDATAString(Hashtable cdata) { // Return a 'null' string if no CDATA section elements were specified if (cdata == null) return null; final StringBuilder result = new StringBuilder(); // Get an enumeration of all the elements in the hashtable Enumeration elements = cdata.keys(); if (elements.hasMoreElements()) { result.append((String)elements.nextElement()); while (elements.hasMoreElements()) { String element = (String)elements.nextElement(); result.append(' '); result.append(element); } } return(result.toString()); }
Example #10
Source File: SAXImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Construct a SAXImpl object using the given block size. */ public SAXImpl(XSLTCDTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, int blocksize, boolean buildIdIndex, boolean newNameTable) { super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory, doIndexing, blocksize, false, buildIdIndex, newNameTable); _dtmManager = mgr; _size = blocksize; // Use a smaller size for the space stack if the blocksize is small _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64]; /* From DOMBuilder */ _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE; // If the input source is DOMSource, set the _document field and // create the node2Ids table. if (source instanceof DOMSource) { _hasDOMSource = true; DOMSource domsrc = (DOMSource)source; Node node = domsrc.getNode(); if (node instanceof Document) { _document = (Document)node; } else { _document = node.getOwnerDocument(); } _node2Ids = new Hashtable(); } }
Example #11
Source File: SAXImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Construct a SAXImpl object using the given block size. */ public SAXImpl(XSLTCDTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, int blocksize, boolean buildIdIndex, boolean newNameTable) { super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory, doIndexing, blocksize, false, buildIdIndex, newNameTable); _dtmManager = mgr; _size = blocksize; // Use a smaller size for the space stack if the blocksize is small _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64]; /* From DOMBuilder */ _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE; // If the input source is DOMSource, set the _document field and // create the node2Ids table. if (source instanceof DOMSource) { _hasDOMSource = true; DOMSource domsrc = (DOMSource)source; Node node = domsrc.getNode(); if (node instanceof Document) { _document = (Document)node; } else { _document = node.getOwnerDocument(); } _node2Ids = new Hashtable(); } }
Example #12
Source File: AdaptiveResultTreeImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Hashtable getElementsWithIDs() { if (_dom != null) { return _dom.getElementsWithIDs(); } else { return super.getElementsWithIDs(); } }
Example #13
Source File: AdaptiveResultTreeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public Hashtable getElementsWithIDs() { if (_dom != null) { return _dom.getElementsWithIDs(); } else { return super.getElementsWithIDs(); } }
Example #14
Source File: AdaptiveResultTreeImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Hashtable getElementsWithIDs() { if (_dom != null) { return _dom.getElementsWithIDs(); } else { return super.getElementsWithIDs(); } }
Example #15
Source File: SAXImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Construct a SAXImpl object using the given block size. */ public SAXImpl(XSLTCDTMManager mgr, Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, int blocksize, boolean buildIdIndex, boolean newNameTable) { super(mgr, source, dtmIdentity, whiteSpaceFilter, xstringfactory, doIndexing, blocksize, false, buildIdIndex, newNameTable); _dtmManager = mgr; _size = blocksize; // Use a smaller size for the space stack if the blocksize is small _xmlSpaceStack = new int[blocksize <= 64 ? 4 : 64]; /* From DOMBuilder */ _xmlSpaceStack[0] = DTMDefaultBase.ROOTNODE; // If the input source is DOMSource, set the _document field and // create the node2Ids table. if (source instanceof DOMSource) { _hasDOMSource = true; DOMSource domsrc = (DOMSource)source; Node node = domsrc.getNode(); if (node instanceof Document) { _document = (Document)node; } else { _document = node.getOwnerDocument(); } _node2Ids = new Hashtable(); } }
Example #16
Source File: MultiDOM.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return _main.getElementsWithIDs(); }
Example #17
Source File: SimpleResultTreeImpl.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return null; }
Example #18
Source File: DOMAdapter.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return _dom.getElementsWithIDs(); }
Example #19
Source File: MultiDOM.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return _main.getElementsWithIDs(); }
Example #20
Source File: DOMAdapter.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return _dom.getElementsWithIDs(); }
Example #21
Source File: SimpleResultTreeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return null; }
Example #22
Source File: SimpleResultTreeImpl.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return null; }
Example #23
Source File: MultiDOM.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return _main.getElementsWithIDs(); }
Example #24
Source File: DOMAdapter.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public Hashtable getElementsWithIDs() { return _dom.getElementsWithIDs(); }
Example #25
Source File: DOMWSFilter.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * Construct an adapter connecting the <code>DTMWSFilter</code> interface * to the <code>StripFilter</code> interface. * * @param translet A translet that also implements the StripFilter * interface. * * @see com.sun.org.apache.xml.internal.dtm.DTMWSFilter * @see com.sun.org.apache.xalan.internal.xsltc.StripFilter */ public DOMWSFilter(AbstractTranslet translet) { m_translet = translet; m_mappings = new Hashtable(); if (translet instanceof StripFilter) { m_filter = (StripFilter) translet; } }
Example #26
Source File: DOMWSFilter.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * Construct an adapter connecting the <code>DTMWSFilter</code> interface * to the <code>StripFilter</code> interface. * * @param translet A translet that also implements the StripFilter * interface. * * @see com.sun.org.apache.xml.internal.dtm.DTMWSFilter * @see com.sun.org.apache.xalan.internal.xsltc.StripFilter */ public DOMWSFilter(AbstractTranslet translet) { m_translet = translet; m_mappings = new Hashtable(); if (translet instanceof StripFilter) { m_filter = (StripFilter) translet; } }
Example #27
Source File: DOMWSFilter.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Construct an adapter connecting the <code>DTMWSFilter</code> interface * to the <code>StripFilter</code> interface. * * @param translet A translet that also implements the StripFilter * interface. * * @see com.sun.org.apache.xml.internal.dtm.DTMWSFilter * @see com.sun.org.apache.xalan.internal.xsltc.StripFilter */ public DOMWSFilter(AbstractTranslet translet) { m_translet = translet; m_mappings = new Hashtable(); if (translet instanceof StripFilter) { m_filter = (StripFilter) translet; } }
Example #28
Source File: DOM.java From openjdk-8 with GNU General Public License v2.0 | votes |
public Hashtable getElementsWithIDs();
Example #29
Source File: DOM.java From openjdk-8-source with GNU General Public License v2.0 | votes |
public Hashtable getElementsWithIDs();
Example #30
Source File: DOM.java From jdk8u60 with GNU General Public License v2.0 | votes |
public Hashtable getElementsWithIDs();