<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  &lt;add&gt;
  &lt;doc&gt;    
      <xsl:for-each select="bookstore/book">
        &lt;field name="title"&gt;<xsl:value-of select="title"/>;&lt;/field&gt;
		&lt;field name="author"&gt;<xsl:value-of select="author"/>&lt;/field&gt;
		<!--field name="title"><xsl:value-of select="title"/></field-->
      </xsl:for-each>
  &gt;/doc&gt;
  &gt;/add&gt;
</xsl:template>

</xsl:stylesheet> 