public Item next() throws XPathException { Item current = next; if (current == null) { return null; } next = base.next(); if (AdjacentTextNodeMerger.isTextNode(current)) { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C256); fsb.append(current.getStringValueCS()); while (AdjacentTextNodeMerger.isTextNode(next)) { fsb.append(next.getStringValueCS() /*.toString() */); // NOTE: toString() shouldn't be necessary - added 2011-05-05 for bug workaround; removed again 2011-07-14 next = base.next(); } if (fsb.isEmpty()) { return next(); } else { Orphan o = new Orphan(((NodeInfo) current).getConfiguration()); o.setNodeKind(Type.TEXT); o.setStringValue(fsb); current = o; return current; } } else { return current; } }
public Item next() throws XPathException { Item current = next; if (current == null) { return null; } next = base.next(); if (AdjacentTextNodeMerger.isTextNode(current)) { FastStringBuffer fsb = new FastStringBuffer(FastStringBuffer.C256); fsb.append(current.getStringValueCS()); while (AdjacentTextNodeMerger.isTextNode(next)) { fsb.append(next.getStringValueCS() /*.toString() */); // NOTE: toString() shouldn't be necessary - added 2011-05-05 for bug workaround; removed again 2011-07-14 next = base.next(); } if (fsb.isEmpty()) { return next(); } else { Orphan o = new Orphan(((NodeInfo) current).getConfiguration()); o.setNodeKind(Type.TEXT); o.setStringValue(fsb); current = o; return current; } } else { return current; } }
Item item; while ((item = iter.next()) != null) { if (isTextNode(item)) { CharSequence s = item.getStringValueCS(); if (s.length() > 0) {
Item item; while ((item = iter.next()) != null) { if (isTextNode(item)) { CharSequence s = item.getStringValueCS(); if (s.length() > 0) {