public static TagComponent combine(TagComponent one, TagComponent other) { AdjacentComponent otherCopyWithModifiedType = new AdjacentComponent(other); return new TagComponent(one.xPathExpression, ComponentUtils.joinComponents(one.combinatedComponents, otherCopyWithModifiedType), ComponentUtils.joinFilters(one.elementFilterList, otherCopyWithModifiedType)); }
@Override public TagComponent cloneAndCombineTo(Combinable other) { XPathComponent otherCopy = other.cloneComponent(); return new TagComponent(this.xPathExpression, ComponentUtils.joinComponents(this.combinatedComponents, otherCopy), ComponentUtils.joinFilters(this.elementFilterList, otherCopy)); }
public static TagComponent combine(TagComponent one, TagComponent other) { DescendantGeneralComponent otherCopyWithModifiedType = new DescendantGeneralComponent(other); return new TagComponent(one.xPathExpression, ComponentUtils.joinComponents(one.combinatedComponents, otherCopyWithModifiedType), ComponentUtils.joinFilters(one.elementFilterList, otherCopyWithModifiedType)); }
public static TagComponent combine(TagComponent one, TagComponent other) { DescendantDirectComponent otherCopyWithModifiedType = new DescendantDirectComponent(other); return new TagComponent(one.xPathExpression, ComponentUtils.joinComponents(one.combinatedComponents, otherCopyWithModifiedType), ComponentUtils.joinFilters(one.elementFilterList, otherCopyWithModifiedType)); }
@Override public ConditionToAllComponent cloneAndCombineTo(Combinable other) { XPathComponent otherCopy = other.cloneComponent(); return new ConditionToAllComponent(this.xPathExpression, ComponentUtils.joinComponents(this.combinatedComponents, otherCopy), ComponentUtils.joinFilters(this.elementFilterList, otherCopy)); }
@Override public ConditionSimpleComponent cloneAndCombineTo(Combinable other) { XPathComponent otherCopy = other.cloneComponent(); return new ConditionSimpleComponent(this.xPathExpression, ComponentUtils.joinComponents(this.combinatedComponents, otherCopy), ComponentUtils.joinFilters(this.elementFilterList, otherCopy)); }
@Override public ConditionSimpleComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { return new ConditionSimpleComponent("[(" + "( local-name() = 'input' and @type = 'submit' ) or " + "( local-name() = 'button' and (@type = 'submit' or not(@type)) )" + ")]"); }
@Override public ConditionToAllComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { // notice that XPath is 1-based and :odd is not. return new ConditionToAllComponent("[(position() mod 2) = 0]"); }
public static TagComponent combine(TagComponent one, TagComponent other) { AdjacentComponent otherCopyWithModifiedType = new AdjacentComponent(other); return new TagComponent(one.xPathExpression, ComponentUtils.joinComponents(one.combinatedComponents, otherCopyWithModifiedType), ComponentUtils.joinFilters(one.elementFilterList, otherCopyWithModifiedType)); }
@Override public TagComponent cloneAndCombineTo(Combinable other) { XPathComponent otherCopy = other.cloneComponent(); return new TagComponent(this.xPathExpression, ComponentUtils.joinComponents(this.combinatedComponents, otherCopy), ComponentUtils.joinFilters(this.elementFilterList, otherCopy)); }
public static TagComponent combine(TagComponent one, TagComponent other) { DescendantGeneralComponent otherCopyWithModifiedType = new DescendantGeneralComponent(other); return new TagComponent(one.xPathExpression, ComponentUtils.joinComponents(one.combinatedComponents, otherCopyWithModifiedType), ComponentUtils.joinFilters(one.elementFilterList, otherCopyWithModifiedType)); }
public static TagComponent combine(TagComponent one, TagComponent other) { DescendantDirectComponent otherCopyWithModifiedType = new DescendantDirectComponent(other); return new TagComponent(one.xPathExpression, ComponentUtils.joinComponents(one.combinatedComponents, otherCopyWithModifiedType), ComponentUtils.joinFilters(one.elementFilterList, otherCopyWithModifiedType)); }
@Override public ConditionToAllComponent cloneAndCombineTo(Combinable other) { XPathComponent otherCopy = other.cloneComponent(); return new ConditionToAllComponent(this.xPathExpression, ComponentUtils.joinComponents(this.combinatedComponents, otherCopy), ComponentUtils.joinFilters(this.elementFilterList, otherCopy)); }
@Override public ConditionSimpleComponent cloneAndCombineTo(Combinable other) { XPathComponent otherCopy = other.cloneComponent(); return new ConditionSimpleComponent(this.xPathExpression, ComponentUtils.joinComponents(this.combinatedComponents, otherCopy), ComponentUtils.joinFilters(this.elementFilterList, otherCopy)); }
@Override public ConditionSimpleComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { return new ConditionSimpleComponent("[(" + "( local-name() = 'input' and @type = 'submit' ) or " + "( local-name() = 'button' and (@type = 'submit' or not(@type)) )" + ")]"); }
@Override public ConditionToAllComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { // notice that XPath is 1-based and :even is not. return new ConditionToAllComponent("[(position() mod 2) = 1]"); }
@Override public ConditionSimpleComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { // [last() = 1] will not suffice because it may be composed into an expression like //a[last() = 1] which will yield wrong results // So you have to go up and then down again: //a[../*[last() = 1]] return new ConditionSimpleComponent("[../*[last() = 1]]"); }
@Override public ConditionSimpleComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { // [last() = 1] will not suffice because it may be composed into an expression like //a[last() = 1] which will yield wrong results // So you have to go up and then down again: //a[../*[last() = 1]] return new ConditionSimpleComponent("[../*[last() = 1]]"); }
@Override public ConditionSimpleComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { return new ConditionSimpleComponent("[(" + "(self::input and translate(@type,'BUTTON','button') = 'button') " + "or " + "self::button" + ")]"); }
@Override public ConditionSimpleComponent pseudoClassToXPath(PseudoClassSelector pseudoClassSelector) { return new ConditionSimpleComponent("[(" + "(self::input and translate(@type,'BUTTON','button') = 'button') " + "or " + "self::button" + ")]"); }