Hello,
With an ACL function, is it possible to force the adding an attribute (and its value) to an element although the attribute is not declared in the reference schema ?
My XML document will be not valid against the XSD Schema, but I would like to do it.
Kind regards
David
Solved! Go to Solution.
You can do this by "cheating" using the AOM and Javascript:
javascript("Application.activeDocument.insertionPoint.startContainer.setAttribute("bogus","invalid")");
In this example, it will add bogus="invalid" to the current tag (where the caret is). If you have a specific OID instead of the node where the caret is, you can use something like this:
javascript("Acl.DOMOID('" . $myoid . "').setAttribute('bogus','invalid')");
Of course, you could also do it the conventional way, by turning off context rules before adding the undeclared attribute.
You can do this by "cheating" using the AOM and Javascript:
javascript("Application.activeDocument.insertionPoint.startContainer.setAttribute("bogus","invalid")");
In this example, it will add bogus="invalid" to the current tag (where the caret is). If you have a specific OID instead of the node where the caret is, you can use something like this:
javascript("Acl.DOMOID('" . $myoid . "').setAttribute('bogus','invalid')");
Of course, you could also do it the conventional way, by turning off context rules before adding the undeclared attribute.
Hi Clay,
Thank you again for your help.
Best regards
David