TTXPath logo
 
The MMUTATE Transformation
Flexible Querying for XML
Home        
Tutorial    
Demo 
Download       
Publications       
 
Curtis Dyreson
  Home
  Publications
  Projects
  Software
  Demos
  Teaching
  Contact me

XMorph also supports mutation of the data's hierarchy. A MUTATE is like a MORPH in that it changes the shape of the hierarchy; but unlike a MORPH, the entire hierarchy is implicitly involved. A mutation is given in below.

Mutating:
 
   MUTATE 
     author [
       publisher
        [ title ]
       ]

To run the tutorial queries, use the demo code.

The mutation explicitly lists only three types, but it outputs the entire hierarchy, with two mutations. First it moves <publisher> elements to within the closest <author> elements, and second, it moves <title> elements to also place them under the closest <publisher>. The rest of the hierarchy is not changed.


                                                                                                                                                                                                                                     


Curtis E. Dyreson © 2013. All rights reserved.
  E-mail questions or comments to Curtis.Dyreson at usu.edu