Hmmm I think this works but I have never tested it so.... but I think it will work.
Firs of all make a region near the altar on which you sac items. If you're gonna use ability to sac the item use this trigger:
Events
-A unit begins the effect of the ability
Conditions
-Ability being cast equal to [swordsacing]
-Unit has item of type[the sword for sacrificing] equal to true
-Region[altar] contains casting unit
Actions
-Play unit animation //or something of the like i don't remember...
-Remove[the sword for sacrificing]
-Add 150 exp to [casting unit]
-Display to [contrller of [casting unit]] the chat message - |cffffcc00You have sacrified this sword to gain 150 exp.|r // optional
Also you may have the sword to be able to sacrifice itself when u use it.
If you're gonna do so you have to add the experience gain ability [the one from the tome of exp] to your sword and make the sword actively used. Of course you may want to increase or decrease the exp gain from the tome so if you want yiou may change it.
Events
-A unit uses an item
Conditions
-Item being used is [the sword for sacrificing]
Actions
-Set variable: [sacing unit] equal to [unit used an item] //or something of that type
-Remove [the sword for sacrificing] from [sacing unit]
-Add 150 exp to [sacing unit]
this should also work. Anyway I wish you to finish you project sucsessfuly...