use JS in addMaxOccursScriptlet