code: protected void addGlobalAttributes(SXTag parent, String scope,
  			List<XAttribute> attributes) throws IOException {
  		if (attributes.size() > 0) {
  			SXTag guaranteedNode = parent.addChildNode("global");
  			guaranteedNode.addAttribute("scope", scope);
  			addAttributes(guaranteedNode, attributes);
  		}
  	}
docs: Helper method for defining global attributes on a given scope.