3 sexOfRole "father" = "Male"
4 sexOfRole "mother" = "Female"
5 sexOfRole "son" = "Male"
6 sexOfRole "daughter" = "Female"
8 mapping relation RootMapping Element Element
12 RootMapping ?families ?persons
15 Element ?families "Family" ?family
16 Attribute ?family "lastName" ?lastName
17 Element ?family ?role ?familyMember
18 Attribute ?familyMember "firstName" ?firstName
21 Element ?persons (sexOfRole ?role) ?person
22 Attribute ?person "fullName" (?firstName + " " + ?lastName)
24 main :: [String] -> <Proc> ()
26 doc = parseFile fileName
27 doc2 = parseString "<Persons/>"
29 transformation OneShotForward where
30 RootMapping (rootElementOf doc) (rootElementOf doc2)
32 print $ outputString doc2