Create a transition to another node state represented by its
{@link ElementSelector}.

@param name QName of the element on which to transition
@param target target node state to which the transition leads
168108
public void addTransition(QName name, ElementSelector<T> target) {
        buildState().addTransition(new ElementEqualsConstraint(name), 
                                   target.buildState());
    }
1171842
public final ChildSelector<T> element(QName qname, ElementConstraint...constraints) {
        ElementEqualsConstraint nameConstraint = new ElementEqualsConstraint(qname);
        return new ChildSelector<T>(getContext(), getCurrentSelector(), 
                ElementSelector.gatherConstraints(nameConstraint, constraints));
    }
1255164
private void addToCreateElements(String elementName) {
        HashMap<String, String> elementAttributes = new HashMap<>();

        elementAttributes.put(XsdAbstractElement.NAME_TAG, elementName);

        if (!createdElements.containsKey(getCleanName(elementName))){
            createdElements.put(getCleanName(elementName), new XsdElement(null, elementAttributes));
        }
    }
821316
@SuppressWarnings("unchecked")
    public static Iterator<Element> elementIterator(Element element, String name) {

        return element.elementIterator(name);
    }
503478
public synchronized Stage stageNamed(final String name) {
    Stage stage = stages.get(name);

    if (stage == null) {
      stage = new Stage(this, name);
      if (!name.equals(DEFAULT_STAGE)) stage.startDirectoryScanner();
      stages.put(name, stage);
    }

    return stage;
  }
1197676
public void assignTransition(XEvent event, String transition) {
		if (transition != null && transition.trim().length() > 0) {
			XAttributeLiteral transAttr = (XAttributeLiteral) ATTR_TRANSITION
					.clone();
			transAttr.setValue(transition.trim());
			event.getAttributes().put(KEY_TRANSITION, transAttr);
		}
	}
478429
public function setElementInsteadOf($targetName, $element, $name = null) {
		if (! isset($this->_elements[$targetName])) {
			return $this;
		}
		
		$elements = [];
		
		foreach ($this->_elements as $existsName => $existsElement) {
			
			if ($targetName === $existsName) {
				if ($name === null) {
					$elements[] = $element;
				} else {
					$elements[$name] = $element;
				}
			} else {
				$elements[$existsName] = $existsElement;
			}
		}
		
		$this->_elements = $elements;
		
		return $this;
	}
225380
NodeState<T> follow(StartElement element) {
        assert (element != null);
        for (NodeTransition<T> transition : transitions) {
            if (transition.getTest().matches(element)) {
                return transition.getTarget();
            }
        }
        return emptyState();
    }
249941
protected Node getComponentByName(String name) throws QTasteException {
        mFoundComponent = null;
        mFindWithEqual = false;
        LOGGER.debug("try to find a component with the name : " + name);
        // TODO: Think about several component having the same names!
        for (Stage s : getStages()) {
            if (mFindWithEqual) {
                break;
            }
            if (!checkName(name, s.getScene().getRoot()) || !mFindWithEqual) {
                LOGGER.debug("parse window");
                lookForComponent(name, s.getScene().getRoot().getChildrenUnmodifiable());
            }
        }
        if (mFoundComponent != null) {
            //			Parent parent = mFoundComponent.getParent();
            //			//active the parent
            //			while ( parent != null && !(parent instanceof Window) )
            //			{
            //				parent = parent.getParent();
            //			}
            //			if ( parent != null )
            //				((Window)parent).toFront();

            return mFoundComponent;
        }
        throw new QTasteTestFailException("The component \"" + name + "\" is not found.");
    }
864839
public void writeStartElement(final String uri, final String qName) throws SAXException {
        processStartElement();
        final QName res = new QName(uri, qName);
        addNamespace(res.uri, res.prefix, res);
        elementStack.addFirst(res); // push
        openStartElement = true;
    }
263555
@SuppressWarnings("unchecked")
  public T clearQueue(String name) {
    for (Element e : elements()) {
      queue(e, name, null).clear();
    }
    return (T) this;
  }
823341
public static ElementSelector selectorForElementNamed(final String expectedName,
                                                          final ElementSelector es) {
        if (expectedName == null) {
            throw new IllegalArgumentException("expectedName must not be null");
        }

        return conditionalSelector(elementNamePredicate(expectedName), es);
    }
157620
public function addOrReplaceTarget($targetName, &$target)
    {
        $this->log("  +Target: $targetName", Project::MSG_DEBUG);
        $target->setProject($this);
        $this->targets[$targetName] = $target;

        $ctx = $this->getReference(ProjectConfigurator::PARSING_CONTEXT_REFERENCE);
        $current = $ctx->getCurrentTargets();
        $current[$targetName] = $target;
    }
628881
public Transition createTransitionForState(final TransitionableState state, final String criteriaOutcome, final String targetState) {
        return createTransitionForState(state, criteriaOutcome, targetState, false);
    }
91063
public void setTargetName (String targetName) {
        if (targetName == null) target = null;
        target = targetServer.getTarget(targetName);
    }
1088215
public static Optional<Element> nextSibling(final Element element, final String name) {
    for (Node childNode = element.getNextSibling(); childNode != null;
         childNode = childNode.getNextSibling()) {
      if (childNode instanceof Element && ((Element) childNode).getTagName()
          .equalsIgnoreCase(name)) {
        return Optional.of((Element) childNode);
      }
    }
    return Optional.absent();
  }
1072050
def select_transition(name, from_state, *conditions)
      if choice_transition?(name, from_state)
        match_transition_with(name, from_state, *conditions)
      else
        match_transition(name, from_state)
      end
    end