public CSSAssignTraversal(Document doc, String encoding, Object source, int whatToShow) { super(doc, source, whatToShow); this.encoding = encoding; this.matcher = getElementMatcher(); }
public CSSAssignTraversal(Document doc, String encoding, Object source, int whatToShow) { super(doc, source, whatToShow); this.encoding = encoding; this.matcher = getElementMatcher(); }
/** * Creates the analyzer for a single style sheet. * @param sheet The stylesheet that will be used as the source of rules. */ public Analyzer(StyleSheet sheet) { sheets = new ArrayList<StyleSheet>(1); sheets.add(sheet); matchCond = CSSFactory.getDefaultMatchCondition(); matcher = CSSFactory.getElementMatcher(); }
/** * Creates the analyzer for multiple style sheets. * @param sheets A list of stylesheets that will be used as the source of rules. */ public Analyzer(List<StyleSheet> sheets) { this.sheets = sheets; matchCond = CSSFactory.getDefaultMatchCondition(); matcher = CSSFactory.getElementMatcher(); }
/** * Creates the analyzer for multiple style sheets. * @param sheets A list of stylesheets that will be used as the source of rules. */ public Analyzer(List<StyleSheet> sheets) { this.sheets = sheets; matchCond = CSSFactory.getDefaultMatchCondition(); matcher = CSSFactory.getElementMatcher(); }
/** * Creates the analyzer for a single style sheet. * @param sheet The stylesheet that will be used as the source of rules. */ public Analyzer(StyleSheet sheet) { sheets = new ArrayList<StyleSheet>(1); sheets.add(sheet); matchCond = CSSFactory.getDefaultMatchCondition(); matcher = CSSFactory.getElementMatcher(); }
public boolean matches(Element e) { // check other items of simple selector for(SelectorPart item : list) { if(item == null || !item.matches(e, CSSFactory.getElementMatcher(), CSSFactory.getDefaultMatchCondition())) //null in case of syntax error (missing term) return false; } // we passed checking return true; }
public boolean matches(Element e) { // check other items of simple selector for(SelectorPart item : list) { if(item == null || !item.matches(e, CSSFactory.getElementMatcher(), CSSFactory.getDefaultMatchCondition())) //null in case of syntax error (missing term) return false; } // we passed checking return true; }
for (final String cname : CSSFactory.getElementMatcher().elementClasses(e)) { final String id = CSSFactory.getElementMatcher().elementID(e); if (id != null && id.length() != 0) { final List<OrderedRule> idRules = holder.get(HolderItem.ID, id.toLowerCase()); final String name = CSSFactory.getElementMatcher().elementName(e); if (name != null) { final List<OrderedRule> nameRules = holder.get(HolderItem.ELEMENT, name.toLowerCase());
for (final String cname : CSSFactory.getElementMatcher().elementClasses(e)) { final String id = CSSFactory.getElementMatcher().elementID(e); if (id != null && id.length() != 0) { final List<OrderedRule> idRules = holder.get(HolderItem.ID, id.toLowerCase()); final String name = CSSFactory.getElementMatcher().elementName(e); if (name != null) { final List<OrderedRule> nameRules = holder.get(HolderItem.ELEMENT, name.toLowerCase());