title: Using XSLT to select after EACH instance in a string/substring
body: <p>I'm attempting to write an XSLT stylesheet that will handle a Dublin Core (XML) cataloging record and create Chicago, APA, and MLA versions of the citation for each book. I've got everything worked out fine except the APA author one. APA's style for authors requires the author's last name (done), comma, first initial (done), any other initials (my stuck place problem).</p>
  
  <p>What I have right now (and sample DC element is below):</p>
  
  <pre><code>&lt;xsl:value-of select="substring-before(dc:creator[1],',')" /&gt;&lt;xsl:text&gt;, &lt;/xsl:text&gt;&lt;xsl:value-of select="substring(substring-after(dc:creator[1],' '),1,1)" /&gt;&lt;xsl:for-each select="dc:creator[position()!=1]"&gt;&lt;xsl:choose&gt;&lt;xsl:when test="position()=last()"&gt;&lt;xsl:text&gt;., &amp;amp; &lt;/xsl:text&gt;&lt;/xsl:when&gt;&lt;xsl:otherwise&gt;., &lt;/xsl:otherwise&gt;&lt;/xsl:choose&gt;&lt;xsl:value-of select="substring-before(.,',')" /&gt;&lt;xsl:text&gt;, &lt;/xsl:text&gt;&lt;xsl:value-of select="substring(substring-after(.,' '),1,1)" /&gt;&lt;xsl:if test="position()=last()"&gt;.&lt;/xsl:if&gt;&lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>For instances of the following format (what out catalog uses):</p>
  
  <pre><code>&lt;dc:creator&gt;Friend, Natasha&lt;/dc:creator&gt;
  </code></pre>
  
  <p>this works just fine and returns: <code>Friend, N.</code></p>
  
  <p>But for</p>
  
  <pre><code>&lt;dc:creator&gt;Tolkien, J. R. R.&lt;/dc:creator&gt;
  </code></pre>
  
  <p>it returns: <code>Tolkien, J.</code></p>
  
  <p>In a lot of cases it doesn't matter, but there will be cases where it really needs to return authors' middle initial(s), like <code>J.R.R. Tolkien</code> or <code>J.K. Rowling</code>.</p>
  
  <p>So, I need to be able to return the letter that occurs after <em>each</em> space, not just the first instance of a space.</p>
  
  <p>Any ideas?</p>