title: Growing output elements from input elements with XSLT 1.0
body: <p>I'm running into a bit of an problem with XSLT while transforming an xml to another xml. The xml and xslt I am working with is more complex, and this problem is just a section of it.</p>
  <h1>The Problem</h1>
  <p>I want information stored in a single element to go to two different elements in the output, and then do the same operation on the next element.</p>
  <p>My programming instinct was to find the XSLT 1.0 version of making two lists and appending the correct data, but I don't see how to do that in pure XSLT 1.0.</p>
  <p>The current solution is to call for-each statements for every kind of data I want to extract from these elements, but this ends up with a lot of repeating code. There has to be a better way! <em><strong>What is it and can you explain it well?</strong></em></p>
  <h1>An example</h1>
  <p>I have an xml of character elements. I want to extract names and quotes from each character, and put the names in a &quot;character&quot; element and quotes in a &quot;taglines&quot; element.</p>
  <p>Initial XML:</p>
  <pre><code>&lt;Cast&gt;
      &lt;Character&gt;
          &lt;name&gt;The Cheat&lt;/name&gt;
          &lt;quote&gt;Meh&lt;/quote&gt;
      &lt;/Character&gt;
      &lt;Character&gt;
          &lt;name&gt;Homsar&lt;/name&gt;
          &lt;quote&gt;eey-y-yy&lt;/quote&gt;
      &lt;/Character&gt;
  &lt;/Cast&gt;
  </code></pre>
  <p>Output XML:</p>
  <pre><code>&lt;Cast&gt;
      &lt;Character&gt;
          &lt;name&gt;The Cheat&lt;/name&gt;
          &lt;name&gt;Homsar&lt;/name&gt;
      &lt;/Character&gt;
      &lt;taglines&gt;
          &lt;quote&gt;Meh&lt;/quote&gt;
          &lt;quote&gt;eey-y-yy&lt;/quote&gt;
      &lt;/taglines&gt;
  &lt;/Cast&gt;
  </code></pre>