Implement <diagram> tag