5 int nbAttrs; /* number of defaulted attributes on that element */
6 int maxAttrs; /* the size of the array */
7 - const xmlChar *values[5]; /* array of localname/prefix/values/external */
8 + const xmlChar *values[1][5]; /* array of localname/prefix/values/external */
12 @@ -1244,17 +1244,17 @@
13 prefix = xmlDictLookup(ctxt->dict, fullattr, len);
16 - defaults->values[5 * defaults->nbAttrs] = name;
17 - defaults->values[5 * defaults->nbAttrs + 1] = prefix;
18 + defaults->values[defaults->nbAttrs][0] = name;
19 + defaults->values[defaults->nbAttrs][1] = prefix;
20 /* intern the string and precompute the end */
21 len = xmlStrlen(value);
22 value = xmlDictLookup(ctxt->dict, value, len);
23 - defaults->values[5 * defaults->nbAttrs + 2] = value;
24 - defaults->values[5 * defaults->nbAttrs + 3] = value + len;
25 + defaults->values[defaults->nbAttrs][2] = value;
26 + defaults->values[defaults->nbAttrs][3] = value + len;
28 - defaults->values[5 * defaults->nbAttrs + 4] = BAD_CAST "external";
29 + defaults->values[defaults->nbAttrs][4] = BAD_CAST "external";
31 - defaults->values[5 * defaults->nbAttrs + 4] = NULL;
32 + defaults->values[defaults->nbAttrs][4] = NULL;
37 defaults = xmlHashLookup2(ctxt->attsDefault, localname, prefix);
38 if (defaults != NULL) {
39 for (i = 0;i < defaults->nbAttrs;i++) {
40 - attname = defaults->values[5 * i];
41 - aprefix = defaults->values[5 * i + 1];
42 + attname = defaults->values[i][0];
43 + aprefix = defaults->values[i][1];
46 * special work for namespaces defaulted defs
48 if (j <= nbNs) continue;
50 nsname = xmlGetNamespace(ctxt, NULL);
51 - if (nsname != defaults->values[5 * i + 2]) {
52 + if (nsname != defaults->values[i][2]) {
53 if (nsPush(ctxt, NULL,
54 - defaults->values[5 * i + 2]) > 0)
55 + defaults->values[i][2]) > 0)
58 } else if (aprefix == ctxt->str_xmlns) {
60 if (j <= nbNs) continue;
62 nsname = xmlGetNamespace(ctxt, attname);
63 - if (nsname != defaults->values[2]) {
64 + if (nsname != defaults->values[0][2]) {
65 if (nsPush(ctxt, attname,
66 - defaults->values[5 * i + 2]) > 0)
67 + defaults->values[i][2]) > 0)
71 @@ -9533,10 +9533,10 @@
72 atts[nbatts++] = NULL;
74 atts[nbatts++] = xmlGetNamespace(ctxt, aprefix);
75 - atts[nbatts++] = defaults->values[5 * i + 2];
76 - atts[nbatts++] = defaults->values[5 * i + 3];
77 + atts[nbatts++] = defaults->values[i][2];
78 + atts[nbatts++] = defaults->values[i][3];
79 if ((ctxt->standalone == 1) &&
80 - (defaults->values[5 * i + 4] != NULL)) {
81 + (defaults->values[i][4] != NULL)) {
82 xmlValidityError(ctxt, XML_DTD_STANDALONE_DEFAULTED,
83 "standalone: attribute %s on %s defaulted from external subset\n",