last = last->next;
} else {
last = NULL;
- }
+ }
attr = attrs;
do {
/*
copyNs = NULL;
}
copy->ns = copyNs;
-
+
/*
* Set the value.
- */
+ */
text = xmlNewText(NULL);
if (text != NULL) {
copy->last = copy->children = text;
text->parent = (xmlNodePtr) copy;
text->doc = copy->doc;
-
+
if (attr->psvi != NULL) {
/*
* Evaluate the Attribute Value Template.
- */
+ */
valueAVT = xsltEvalAVT(ctxt, attr->psvi, attr->parent);
if (valueAVT == NULL) {
/*
xsltTransformError(ctxt, NULL, attr->parent,
"Internal error: Failed to evaluate the AVT "
"of attribute '{%s}%s'.\n",
- attr->ns->href, attr->name);
+ attr->ns->href, attr->name);
} else {
xsltTransformError(ctxt, NULL, attr->parent,
"Internal error: Failed to evaluate the AVT "
} else {
text->content = xmlStrdup(value);
}
+ if ((copy != NULL) && (text != NULL) &&
+ (xmlIsID(copy->doc, copy->parent, copy)))
+ xmlAddID(NULL, copy->doc, text->content, copy);
}
next_attribute: