Custom attribute values can be somewhat parametrized by the user (e.g. with %filename). It would be useful to allow some basic XPath (e.g. //TEI/@xml:id) for something like wit="#TEIid".
Only XPath 1 can reasonably be implemented in JavaScript, however.