private static void appendAttributeAndDirectiveTags(Tag parentTag, Map<String, Object> attribs, Map<String, String> directives) {
for (Entry<String, Object> attribEntry : attribs.entrySet()) {
Tag attribTag = new Tag(Schema.ELEM_ATTRIBUTE);
attribTag.addAttribute(Schema.ATTR_NAME, attribEntry.getKey());
TypedAttribute typedAttrib = TypedAttribute.create(attribEntry.getKey(), attribEntry.getValue());
parentTag.addContent(typedAttrib.toXML());
}
for (Entry<String, String> directiveEntry : directives.entrySet()) {
Tag directiveTag = new Tag(Schema.ELEM_DIRECTIVE);
directiveTag.addAttribute(Schema.ATTR_NAME, directiveEntry.getKey());