public void characters(final int textNode, SerializationHandler handler) throws TransletException { if (textNode != DTM.NULL) { _adapters[textNode >>> DTMManager.IDENT_DTM_NODE_BITS].characters(textNode, handler); } }
public void copy(final int node, SerializationHandler handler) throws TransletException { _dom.copy(node, handler); }
public int getAttributeNode(final int type, final int el) { if (el == DTM.NULL) { return DTM.NULL; } return _adapters[el >>> DTMManager.IDENT_DTM_NODE_BITS].getAttributeNode(type, el); }
public NodeCounter setStartNode(int node) { _node = node; _nodeType = _document.getExpandedTypeID(node); _precSiblings = _document.getAxisIterator(Axis.PRECEDINGSIBLING); return this; }
public NodeCounter setStartNode(int node) { _node = node; _nodeType = _document.getExpandedTypeID(node); _countSiblings = _document.getTypedAxisIterator(Axis.PRECEDINGSIBLING, _document.getExpandedTypeID(node)); return this; }
public DTMAxisIterator setStartNode(final int node) { if (node == DTM.NULL) { return this; } int dom = node >>> DTMManager.IDENT_DTM_NODE_BITS; // Get a new source first time and when mask changes if (_source == null || _dtmId != dom) { if (_type == NO_TYPE) { _source = _adapters[dom].getAxisIterator(_axis); } else if (_axis == Axis.CHILD) { _source = _adapters[dom].getTypedChildren(_type); } else { _source = _adapters[dom].getTypedAxisIterator(_axis, _type); } } _dtmId = dom; _source.setStartNode(node); return this; }
setRootForKeys(document.getDocument()); final Hashtable elementsByID = enhancedDOM.getElementsWithIDs(); final Object idValue = idValues.nextElement(); final int element = document.getNodeHandle( ((Integer)elementsByID.get(idValue)) .intValue());
/** * Utility function: used to convert reference to org.w3c.dom.Node. */ public static org.w3c.dom.Node referenceToNode(Object obj, DOM dom) { if (obj instanceof Node || obj instanceof DTMAxisIterator) { DTMAxisIterator iter = referenceToNodeSet(obj); return dom.makeNode(iter); } else if (obj instanceof DOM) { dom = (DOM)obj; DTMAxisIterator iter = dom.getChildren(DTMDefaultBase.ROOTNODE); return dom.makeNode(iter); } else { final String className = obj.getClass().getName(); runTimeError(DATA_CONVERSION_ERR, className, "org.w3c.dom.Node"); return null; } }
private static DTMAxisIterator document(DTMAxisIterator arg1, String baseURI, AbstractTranslet translet, DOM dom) throws Exception { UnionIterator union = new UnionIterator(dom); int node = DTM.NULL; while ((node = arg1.next()) != DTM.NULL) { String uri = dom.getStringValueX(node); //document(node-set) if true; document(node-set,node-set) if false if (baseURI == null) { baseURI = dom.getDocumentURI(node); if (!SystemIDResolver.isAbsoluteURI(baseURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(baseURI); } union.addIterator(document(uri, baseURI, translet, dom)); } return(union); }
public int getDocument() { return _dom.getDocument(); }
public String getDocumentURI(int node) { if (node == DTM.NULL) { node = DOM.NULL; } return _adapters[node >>> DTMManager.IDENT_DTM_NODE_BITS].getDocumentURI(0); }
/** * Returns singleton iterator containg the document root */ public DTMAxisIterator getIterator() { return _dom.getIterator(); }
public DTMAxisIterator getChildren(final int node) { return _adapters[getDTMId(node)].getChildren(node); }
int next = _node; result = 0; final int ntype = _document.getExpandedTypeID(_node); final int root = _document.getDocument(); while (next >= 0) { if (ntype == _document.getExpandedTypeID(next)) { result++;
dom.copy(iter.reset(), handler); dom.copy(((Node) obj).node, handler); newDom.copy(newDom.getDocument(), handler);
public DTMAxisIterator getAxisIterator(final int axis) { if (_enhancedDOM != null) { return _enhancedDOM.getAxisIterator(axis); } else { return _dom.getAxisIterator(axis); } }
setRootForKeys(document.getDocument()); final Object idValue = idValues.nextElement(); final int element = document.getNodeHandle( ((Integer)elementsByID.get(idValue)) .intValue());
public NodeCounter setStartNode(int node) { _node = node; _nodeType = _document.getExpandedTypeID(node); return this; }
public Hashtable getElementsWithIDs() { return _dom.getElementsWithIDs(); } }
public NodeCounter setStartNode(int node) { _node = node; _nodeType = _document.getExpandedTypeID(node); _countSiblings = _document.getAxisIterator(Axis.PRECEDINGSIBLING); return this; }