I don't have a XL in front of me but I do remember the order and the way they should be facing. This order will be based off your picture and the way you have it positioned there.
The closest ribbon will be the top LCD ribbon, the gold pins should be facing you as they will be facing "away" from the PCB when reinstalled.
The middle ribbon will be the camera ribbon, the gold pins should also be facing you. When installed into the PCB, it will be facing "toward" the board.
The furthest ribbon is the speaker/3d slider ribbon. This one can be a bit confusing since it's bent and installed into the PCB. These pins should also be facing you before installation. When you go to install the ribbon, the ribbon is flipped over, giving it a 45° angle. When it's installed into the PCB, the pins will be facing away from the board.
It appears that all of the gold flat pins will be facing you when passed through the hinge and I also guess it doesn't matter if the speaker and camera ribbons are flipped with each other, it just may make installation a bit trickier. Make sure that your top LCD ribbon is the closest to you. I generally find it easier to install the ribbons in this order: Camera, Speakers, then top LCD.
Note, this is based off the N3DS XL, not the LL model (which has the right analog stick nub). I hope this helps answer your question