3 mapping relation MapNote Element Element
5 rule SectionsRule where
8 ?sectionName <- ["from", "to", "heading", "body"]
11 Attribute ?noteA ?sectionName ?text
14 Element ?noteB ?sectionName ?el
18 doc = parseString """<note to="Tove" from="Jani" heading="Reminder" body="Don't forget me this weekend!"/>"""
20 doc2 = parseString "<note/>"
22 transformation OneShotForward where
23 MapNote (rootElementOf doc) (rootElementOf doc2)
25 print $ outputString doc2