%dw 2.0
input in0 application/json
output application/xml
---
{
  bookstore: {
    ([] map {a: "bad"}),
    (in0 map
        book : {
          title @(lang: "en"): $.item.properties.title,
          year: $.item.properties.year,
          price: $.item.price,
          ($.item.properties.author map
          author @(loc: "US"): $),
          ( ["User1", "User2", "User3"] map {name: $} )
        }
    ),
    (
      in0.foo map { test:  false}
    )
  }
}