title: How to convert groups of XML elements to JSON lists?
body: <p>Is it possible to apply a template that only matchings on the unique attributes?</p>
  
  <pre><code>&lt;node name="region"&gt;1&lt;/node&gt;
  &lt;node name="region"&gt;2&lt;/node&gt;
  &lt;node name="region"&gt;3&lt;/node&gt;
  &lt;node name="place"&gt;a&lt;/node&gt;
  &lt;node name="place"&gt;b&lt;/node&gt;
  &lt;node name="title"&gt;test&lt;/node&gt;
  </code></pre>
  
  <p>I want to execute a template once for <code>@name="region"</code> and once for <code>@name="place"</code>. Can this be done using XSLT/XPath 1.0?</p>
  
  <p><strong>My ultimate goal is JSON output that looks like this:</strong></p>
  
  <pre><code>"container":{
  "region":["1","2","3"],
  "place":["a","b"],
  "title":"test"
  }
  </code></pre>