Advertisement
sxflynn

Untitled

Nov 16th, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.83 KB | None | 0 0
  1.             <!-- Author field -->
  2.             <xsl:for-each select="a1">
  3.                 <dcvalue element="contributor" qualifier="author">                
  4.                     <xsl:choose> <!-- Adds a space after the comma that seperates first and last names -->
  5.                         <xsl:when test="contains(.,',')">
  6.                             <xsl:variable name="last" select="substring-before(.,',')"/>
  7.                             <xsl:variable name="first"  select="substring-after(.,',')"/>
  8.                             <xsl:value-of select="concat($last,', ',$first)"/>
  9.                         </xsl:when>
  10.                         <xsl:otherwise>
  11.                             <xsl:apply-templates/>
  12.                         </xsl:otherwise>
  13.                     </xsl:choose>
  14.                 </dcvalue>
  15.             </xsl:for-each>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement