docs: @Override
  	public void endElement(String namespaceURI, String localeName, String tagName) throws SAXException
  	{
  		Command cmd = stack.pop();
  		// cmd.setTabCount(tabCount);
  
  		// find if command works in context
  		if (!stack.isEmpty())
  		{
  			Command ctx = stack.peek();
  			ctx.addChild(cmd);
  		}
  
  		// upper level commands
  		if (stack.size() == 1 && cmd.isExecutable())
  		{
  			commands.add(cmd);
  		}
  
  		// store reference to command
  		if (cmd.hasAttr("id")) { //$NON-NLS-1$
  			references.put(cmd.getAttr("id"), cmd); //$NON-NLS-1$
  		}
  
  		try
  		{
  			cmd.exec(references);
  		}
  		catch (Exception e)
  		{
  			SAXException e2 = new SAXException(e.getMessage());
  
  			e2.initCause(e);
  			throw e2;
  		}
  
  		if (--tabCount < 0)
  		{
  			tabCount = 0;
  		}
  
  		Command.prn(tabCount, tabCount + ">...<" + tagName + "> end"); //$NON-NLS-1$ //$NON-NLS-2$
  	}