public String getText() { return delegate.getText(); }
/** * @see org.opencms.util.I_CmsHtmlNodeVisitor#visitStringNode(org.htmlparser.Text) */ @Override public void visitStringNode(Text text) { if (m_echo) { m_result.append(text.getText()); } }
/** * @see org.opencms.util.I_CmsHtmlNodeVisitor#visitStringNode(org.htmlparser.Text) */ @Override public void visitStringNode(Text text) { if (m_echo) { m_result.append(text.getText()); } }
public void visitStringNode(Text stringNode) { String stringToBeSearched = stringNode.getText().toUpperCase(locale); if (!multipleSearchesWithinStrings && stringToBeSearched.indexOf(stringToFind) != -1) { foundCount++; } else if (multipleSearchesWithinStrings) { int index = -1; do { index = stringToBeSearched.indexOf(stringToFind, index+1); if (index!=-1) foundCount++; } while (index != -1); } }
public void visitStringNode(Text stringNode) { String stringToBeSearched = stringNode.getText().toUpperCase(locale); if (!multipleSearchesWithinStrings && stringToBeSearched.indexOf(stringToFind) != -1) { foundCount++; } else if (multipleSearchesWithinStrings) { int index = -1; do { index = stringToBeSearched.indexOf(stringToFind, index+1); if (index!=-1) foundCount++; } while (index != -1); } }
public void visitStringNode(Text TextNode) { String text = cleanText(TextNode.getText()); if (mIsInCode) { if (mExcludeCode) text = ""; else { text = mPunctCleanUp.matcher(text).replaceAll(" "); ArrayList<String> parts = new ArrayList<String>(); text = text.replaceAll("\\s", " "); for (String s: mSpaceSplit.split(text)) { if (s.length() >= mMinCodeChars) parts.add(s); } text = mSpaceJoin.join(parts); } } mTextBuffer.append(text); }
if (node instanceof Text) string = ((Text)node).getText (); matcher = mPattern.matcher (string); switch (mStrategy)
if (node instanceof Text) string = ((Text)node).getText (); matcher = mPattern.matcher (string); switch (mStrategy)
public void visitStringNode(Text stringNode) { String text = stringNode.getText(); if (!preTagBeingProcessed) { text = Translate.decode(text); text = replaceNonBreakingSpaceWithOrdinarySpace(text); } textAccumulator.append(text); }
public void visitStringNode(Text stringNode) { String text = stringNode.getText(); if (!preTagBeingProcessed) { text = Translate.decode(text); text = replaceNonBreakingSpaceWithOrdinarySpace(text); } textAccumulator.append(text); }
@Override public void visitStringNode(Text node) { super.visitStringNode(node); if ((processAll || this.inBody) && !this.inScript && (!skipWhitespace || !StringUtils.isBlank(node.getText()))) { int from = node.getStartPosition(); int to = node.getEndPosition(); textSpans.add(new HtmlConverterPSpan(from, to, node.getText())); } }
/** * Accept string nodes that contain the string. * @param node The node to check. * @return <code>true</code> if <code>node</code> is a {@link Text} node * and contains the pattern string, <code>false</code> otherwise. */ public boolean accept (Node node) { String string; boolean ret; ret = false; if (node instanceof Text) { string = ((Text)node).getText (); if (!getCaseSensitive ()) string = string.toUpperCase (getLocale ()); ret = (-1 != string.indexOf (mUpperPattern)); } return (ret); } }
/** * Accept string nodes that contain the string. * @param node The node to check. * @return <code>true</code> if <code>node</code> is a {@link Text} node * and contains the pattern string, <code>false</code> otherwise. */ public boolean accept (Node node) { String string; boolean ret; ret = false; if (node instanceof Text) { string = ((Text)node).getText (); if (!getCaseSensitive ()) string = string.toUpperCase (getLocale ()); ret = (-1 != string.indexOf (mUpperPattern)); } return (ret); } }
/** * @see com.frameworkset.platform.cms.driver.htmlconverter.I_CmsHtmlNodeVisitor#visitStringNode(org.htmlparser.Text) */ public void visitStringNode(Text text) { if (m_echo) { if(text.getParent() instanceof StyleTag) { StyleTag style = (StyleTag)text.getParent(); if(style.changed()) m_result.append(style.getStyleCode()); else m_result.append(text.getText()); } else if(text.getParent() instanceof ResourceTag) { ResourceTag style = (ResourceTag)text.getParent(); if(style.isChanged()) m_result.append(style.getResourceText()); else m_result.append(text.getText()); } else { m_result.append(text.getText()); } } }
/** * Appends the text to the output. * @param string The text node. */ public void visitStringNode (Text string) { if (!mIsScript && !mIsStyle) { String text = string.getText (); if (!mIsPre) { text = Translate.decode (text); if (getReplaceNonBreakingSpaces ()) text = text.replace ('\u00a0', ' '); if (getCollapse ()) collapse (mBuffer, text); else mBuffer.append (text); } else mBuffer.append (text); } }
/** * Appends the text to the output. * @param string The text node. */ public void visitStringNode (Text string) { if (!mIsScript && !mIsStyle) { String text = string.getText (); if (!mIsPre) { text = Translate.decode (text); if (getReplaceNonBreakingSpaces ()) text = text.replace ('\u00a0', ' '); if (getCollapse ()) collapse (mBuffer, text); else mBuffer.append (text); } else mBuffer.append (text); } }
/** * Called for each chunk of text (<code>StringNode</code>) visited. * * @param string * The string node being visited. */ @Override public void visitStringNode(Text string) { recurse = true; // nbsp is special case - process it like usual spaces String trimmedtext = HTMLUtils.entitiesToChars(string.getText()).replace((char) 160, ' ').trim(); if (!trimmedtext.isEmpty()) { // Hack around HTMLParser not being able to handle XHTML // RFE pending: // http://sourceforge.net/tracker/index.php?func=detail&aid=1227222&group_id=24399&atid=381402 if (firstcall && PatternConsts.XML_HEADER.matcher(trimmedtext).matches()) { writeout(string.toHtml()); return; } text = true; firstcall = false; } if (text) { queueTranslatable(string); } else { queuePrefix(string); } }
if (0 == string.getText ().trim ().length ()) kids.remove (i);
if (0 == string.getText ().trim ().length ()) kids.remove (i);
if(ret != null) String text = ret.getText(); if(text != null && this.jspTagAware != null)