+ data1_xattr *xp;
+ (*p->tokenAdd)(wrd); /* index element pag (AKA tag path) */
+ if (use == 1)
+ {
+ for (xp = n->u.tag.attributes; xp; xp = xp->next)
+ {
+ char comb[512];
+ /* attribute (no value) */
+ wrd->reg_type = '0';
+ wrd->attrUse = 3;
+ wrd->string = xp->name;
+ wrd->length = strlen(xp->name);
+
+ wrd->seqno--;
+ (*p->tokenAdd)(wrd);
+
+ if (xp->value &&
+ strlen(xp->name) + strlen(xp->value) < sizeof(comb)-2)
+ {
+ /* attribute value exact */
+ strcpy (comb, xp->name);
+ strcat (comb, "=");
+ strcat (comb, xp->value);
+
+ wrd->attrUse = 3;
+ wrd->reg_type = '0';
+ wrd->string = comb;
+ wrd->length = strlen(comb);
+ wrd->seqno--;
+
+ (*p->tokenAdd)(wrd);
+ }
+ }
+ for (xp = n->u.tag.attributes; xp; xp = xp->next)
+ {
+ char attr_tag_path_full[1024];
+ int int_len = flen;
+
+ sprintf (attr_tag_path_full, "@%s/%.*s",
+ xp->name, int_len, tag_path_full);
+
+ wrd->reg_type = '0';
+ wrd->attrUse = 1;
+ wrd->string = attr_tag_path_full;
+ wrd->length = strlen(attr_tag_path_full);
+ (*p->tokenAdd)(wrd);
+
+ if (xp->value)
+ {
+ wrd->attrUse = 1015;
+ wrd->reg_type = 'w';
+ wrd->string = xp->value;
+ wrd->length = strlen(xp->value);
+ (*p->tokenAdd)(wrd);
+ }
+
+ wrd->reg_type = '0';
+ wrd->attrUse = 2;
+ wrd->string = attr_tag_path_full;
+ wrd->length = strlen(attr_tag_path_full);
+ (*p->tokenAdd)(wrd);
+ }
+ }