Combining several attributes with string join My XML is structured like this:

&lt;Export&gt;
  &lt;ProductType Type="Book"&gt;
    &lt;Products&gt;
      &lt;Product Title="The Pragmatic Programmer"&gt;
        &lt;Chapters&gt;
          &lt;Chapter Title="1 A Pragmatic Philosophy"&gt;
          &lt;Chapter Title="2 A Pragmatic Approach"&gt;
          &lt;Chapter Title="3 The Basic Tools"&gt;
          ...
        &lt;/Chapters&gt;
      &lt;/Product&gt;
    &lt;/Products&gt;
  &lt;/ProductType&gt;
&lt;/Export&gt;


I am trying to map an XPath Expression to a multivalue field that contains a list of all the chapters.

I think the context expression is causing the xpath function for the mapped field to return an empty value.

I've tried the following and both do not work:

Context:
/Export/ProductType[@Type='Book']/Products/Product

Target Field:
fn:string-join(Chapters/Chapter/@Title, ', ')

This just outputs a comma.  Is there a way to combine all of the Chapter titles into one string like "1 A Pragmatic Philosophy, 2 A Pragmatic Approach, 3 The Basic Tools"?

UPDATE

I'm not sure that you can use expressions in string functions, but this stackoverflow post lead me to believe that it is possible.
The Feeds Tamper module has an implode plugin that makes this work.


  Feeds Tamper provides a small plugin architecture for Feeds to modify data before it gets saved. Several plugins are available by default and are described in the examples section below. Additional plugins can be added in separate modules or through the issue queue.
  
  
  Replace every instance of 'dog' with 'cat'
  Filter items based on keywords or vocabularies
  Make every letter uppercase, lowercase, or capitalise every first letter
  Break a comma separated list of words into Taxonomy terms or a multivalued text field
  Combine separate 'first name' and 'last name' fields into one 'name' field
  Convert urls from relative to absolute