Generally, it's best to make the drop shaft just long enough to kill or critically wound the skeletons in the fall (depending on whether you want to actively or absently collect experience). You could also use piston traps to crush the mobs into suffocation if that suits your purpose any better.
will this method of using pistons still give me xp?
Pistons can be timed so they bring the mob down to half a heart, then a single punch kills them and gives the experience. Kills by tamed wolves also count for experience.
Also, as long as a player-sourced hit on the mob occurred within 5 seconds of death the experience is dropped, even if the final bit of damage came from another source. This avoids losing experience because your Fire Aspect sword set the mob on fire and the fire killed it, for example.
slash through the madness that shaped our destiny...
no, it won't. Only killing the mob with a sword gives you XP, no bow or any other killing method.
I am an artist. All the art you see on my profile is by me, if it's not I will say so and whom its owner is.
you can get xp by shooting a mob to death and killing them with a potion.
and punching them.
the sword isn't the only method
Also, as long as a player-sourced hit on the mob occurred within 5 seconds of death the experience is dropped, even if the final bit of damage came from another source. This avoids losing experience because your Fire Aspect sword set the mob on fire and the fire killed it, for example.