Greetings Adepters,
We have an ACL which is exhibiting some strange behavior (to us, anyway).
Here's a code snippet:
# Make sure the original element can be removed, i.e., it's not a required element
oid_select(obj, 0, 1, 1);
if(cut_valid()==0)
{
undo;
response("This element cannot have its context swapped because it is a required element. You may be able to insert the context counterpart for this element.");
return;
}
# Remove the existing element
oid_delete(obj);
response("deleted");
# See if the "new" element can be inserted here
if(in_context(newElem)==0)
{
response("The element " . newElem . " can not be created here because it will invalidate the document.");
undo;
return;
}
insert_string -sgml "$xformresult";
****END SNIPPET****
This code works fine as is, but if you comment out the 'response("deleted");' it fails by somehow determining that the new element cannot be inserted here, even though it is valid, per the DTD.
We tried a "wait" command in place of the response, but that doesn't seem to have any effect.
Does anyone have a clue?