/** * @see org.htmlparser.Tag#getAttributeEx(java.lang.String) */ public Attribute getAttributeEx(String arg0) { return m_decorated.getAttributeEx(arg0); }
/** * @see org.htmlparser.Tag#getAttributeEx(java.lang.String) */ public Attribute getAttributeEx(String arg0) { return m_decorated.getAttributeEx(arg0); }
/** * @see org.htmlparser.Tag#getAttributeEx(java.lang.String) */ public Attribute getAttributeEx(String arg0) { return m_decorated.getAttributeEx(arg0); }
@Override public boolean accept(Node node) { if (!(node instanceof Tag)) { return false; } if (mValue == null) { return false; } Tag tag = (Tag) node; if (tag.getAttributeEx(mAttribute) == null) { return false; } return tag.getAttributeEx(mAttribute).getValue().startsWith(mValue); } }
@Override public boolean accept(Node node) { if (!(node instanceof Tag)) { return false; } if (mValue == null) { return false; } Tag tag = (Tag) node; if (tag.getAttributeEx(mAttribute) == null) { return false; } return tag.getAttributeEx(mAttribute).getValue().startsWith(mValue); } }
/** * Accept tags with a certain attribute. * * @param node The node to check. * @return <code>true</code> if the node has the attribute (and value if * that is being checked too), <code>false</code> otherwise. */ public boolean accept(Node node) { if (node instanceof Tag) { Tag tag = (Tag) node; Attribute attribute = tag.getAttributeEx(name); if (attribute != null) { if (this.value == null) { return true; } return this.value.equalsIgnoreCase(attribute.getValue()); } } return false; } }
/** * Accept tags with a certain attribute. * @param node The node to check. * @return <code>true</code> if the node has the attribute * (and value if that is being checked too), <code>false</code> otherwise. */ public boolean accept (Node node) { Tag tag; Attribute attribute; boolean ret; ret = false; if (node instanceof Tag) { tag = (Tag)node; attribute = tag.getAttributeEx (mAttribute); ret = null != attribute; if (ret && (null != mValue)) ret = mValue.equals (attribute.getValue ()); } return (ret); } }
/** * Accept tags with a certain attribute. * @param node The node to check. * @return <code>true</code> if the node has the attribute * (and value if that is being checked too), <code>false</code> otherwise. */ public boolean accept (Node node) { Tag tag; Attribute attribute; boolean ret; ret = false; if (node instanceof Tag) { tag = (Tag)node; attribute = tag.getAttributeEx (mAttribute); ret = null != attribute; if (ret && (null != mValue)) ret = mValue.equals (attribute.getValue ()); } return (ret); } }
private TemplateCompiler resolveInlineCompiler(final Tag tag) { String inlineAttributeName = ehtAttributePrefix + "inline"; Attribute attribute = tag.getAttributeEx(inlineAttributeName); if (attribute == null) { return null; } if (!(attribute instanceof PageAttribute)) { throw new RuntimeException( getTemplateFileName() + "attribute must be an instance of PageAttribute"); } PageAttribute inlineAttribute = (PageAttribute) attribute; CompiledExpression compiledExpression = compileExpression(inlineAttribute, new TagInfo(tag)).compiledExpression; Object evaluatedInline = compiledExpression.eval(EMPTY_VAR_MAP); if (evaluatedInline != null) { TemplateCompiler inlineCompiler = inlineCompilers.get(evaluatedInline); if (inlineCompiler == null) { HTMLTemplatingUtil.throwCompileExceptionForAttribute(getTemplateFileName(), "No compiler found for inline type: " + evaluatedInline, tag, inlineAttribute, true, startPosition); } return inlineCompiler; } return null; }