Unlike Generations II and III, the user of the move instead copies the target's alternate coloration. Therefore, if the target is Shiny, then the user's transformed state will be Shiny as well. If Transformis used ona Spiky-eared Pichu, then the Pokémon who used it will transform into a Spiky-eared Pichu. If Transformis used onan Origin Forme Giratina, or Arceus, and the Pokémon who used Transform is not holding a Plate or Griseous Orb, the Pokémon will first transform to its target, and then immediately transform into Giratina or Normal type Arceus.
-This is for Gen IV, so that means the Answer is yes if it works with Arceus and Giratina
Transform will fail if used on a Pokémon behind a Substitute or a Pokémon under the effect of Illusion. Transformwillno longer copy the target's catch rate. If Transform is used on an Origin Forme Giratina the Pokémon who used Transform will remain in Origin Forme even if it is not holding a Griseous Orb, instead of reverting to Altered Forme. If Transform is used by a Pokémon not holding a Plate on an Arceus holding a Plate, the Pokémon will retain the target Arceus's typing and not revert to Normal, but its own Judgment will be Normal type. Imposter, an Ability introduced in this generation, automatically causes the user to transform into the opponent.
-This is Gen V, which means it won't work.
See Here for this and More information.