

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" exclude-result-prefixes="#all" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:csv="csv:csv" xmlns:pdts="pdts:pdts">

<xsl:template match="/"> <!-- Match the root -->
  <xsl:for-each select="AmsatList/Satellites">
    <xsl:result-document method="xml" href="satellite_{NasaID}_{Name}.xml">
	<AmsatList>
          <xsl:copy-of select="../@* | ." />
		  </AmsatList>
    </xsl:result-document>
  </xsl:for-each>
</xsl:template> 
</xsl:stylesheet>