How could I call a CustomAction(js) from .wxs file and assign the returned value to a element?

I want to assign a value to Source by calling a function:
<File Compressed=“” DiskId=“” Vital=“y” Source= “<functionCall()>”
How could I do that?