static int schema_attribute(sdlPtr sdl, xmlAttrPtr tsn, xmlNodePtr attrType, sdlTypePtr cur_type);
static int schema_any(sdlPtr sdl, xmlAttrPtr tsn, xmlNodePtr extType, sdlTypePtr cur_type);
static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tsn, xmlNodePtr attrType, sdlTypePtr cur_type);
-#define schema_attributeGroupRef schema_attributeGroup
-//static int schema_attributeGroupRef(sdlPtr sdl, xmlAttrPtr tsn, xmlNodePtr attrType, sdlTypePtr cur_type);
static int schema_restriction_var_int(xmlNodePtr val, sdlRestrictionIntPtr *valptr);
}
} else if ((trav->type != XML_ELEMENT_NODE) &&
(trav->type != XML_CDATA_SECTION_NODE)) {
- del = trav;
+ del = trav;
} else if (trav->children != NULL) {
schema_cleanup(trav);
}
if (node_is_equal(trav,"attribute")) {
schema_attribute(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"attributeGroup")) {
- schema_attributeGroupRef(sdl, tsn, trav, cur_type);
+ schema_attributeGroup(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"anyAttribute")) {
/* TODO: <anyAttribute> support */
trav = trav->next;
if (node_is_equal(trav,"attribute")) {
schema_attribute(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"attributeGroup")) {
- schema_attributeGroupRef(sdl, tsn, trav, cur_type);
+ schema_attributeGroup(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"anyAttribute")) {
/* TODO: <anyAttribute> support */
trav = trav->next;
if (node_is_equal(trav,"attribute")) {
schema_attribute(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"attributeGroup")) {
- schema_attributeGroupRef(sdl, tsn, trav, cur_type);
+ schema_attributeGroup(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"anyAttribute")) {
/* TODO: <anyAttribute> support */
trav = trav->next;
if (node_is_equal(trav,"attribute")) {
schema_attribute(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"attributeGroup")) {
- schema_attributeGroupRef(sdl, tsn, trav, cur_type);
+ schema_attributeGroup(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"anyAttribute")) {
/* TODO: <anyAttribute> support */
trav = trav->next;
if (node_is_equal(trav,"attribute")) {
schema_attribute(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"attributeGroup")) {
- schema_attributeGroupRef(sdl, tsn, trav, cur_type);
+ schema_attributeGroup(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"anyAttribute")) {
/* TODO: <anyAttribute> support */
trav = trav->next;
xmlNodePtr trav;
xmlAttrPtr name, ref = NULL;
-
+
name = get_attribute(attrGroup->properties, "name");
if (name == NULL) {
name = ref = get_attribute(attrGroup->properties, "ref");
if (ref != NULL) {
php_error(E_ERROR, "Error parsing schema (attributeGroup have both 'ref' attribute and subattribute)");
}
- schema_attributeGroupRef(sdl, tsn, trav, cur_type);
+ schema_attributeGroup(sdl, tsn, trav, cur_type);
} else if (node_is_equal(trav,"anyAttribute")) {
if (ref != NULL) {
php_error(E_ERROR, "Error parsing schema (attributeGroup have both 'ref' attribute and subattribute)");
return TRUE;
}
-//static int schema_attributeGroupRef(sdlPtr sdl, xmlAttrPtr tsn, xmlNodePtr attrGroup, sdlTypePtr cur_type)
-//{
-// xmlAttrPtr ref = get_attribute(attrGroup->properties, "ref");
-// if (ref != NULL) {
-// /*FIXME*/
-// } else {
-// php_error(E_ERROR, "Error parsing schema (attributeGroup has no 'ref' attribute)");
-// }
-// return TRUE;
-//}
-
static void schema_attribute_fixup(sdlPtr sdl, sdlAttributePtr attr)
{
sdlAttributePtr *tmp;
}
if ((*tmp)->extraAttributes != NULL) {
xmlNodePtr node;
-
+
attr->extraAttributes = malloc(sizeof(HashTable));
zend_hash_init(attr->extraAttributes, 0, NULL, NULL, 1);
zend_hash_get_current_key_ex((*tmp)->attributes, &key, &key_len, NULL, 0, NULL);
zend_hash_add(ht, key, key_len, &newAttr, sizeof(sdlAttributePtr), NULL);
-
+
zend_hash_move_forward((*tmp)->attributes);
} else {
ulong index;