<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<!--
  - ADOBE SYSTEMS INCORPORATED
  - Copyright 2001-2002 Adobe Systems Incorporated. All Rights Reserved.
  - 
  - NOTICE:  Notwithstanding the terms of the Adobe GoLive End User 
  - License Agreement, Adobe permits you to reproduce and distribute this 
  - file only as an integrated part of a web site created with Adobe 
  - GoLive software and only for the purpose of enabling your client to 
  - display their web site. All other terms of the Adobe license 
  - agreement remain in effect.
  -->

	<!--
	  - Output of the custommerchant test cart:
	  -
	  -		<custommerchant-result>
	  -			<shopping-cart>
	  -				[<item>
	  -					[<field>...]*
	  -				]*
	  -
	  - Output of the custommerchant test order form:
	  -
	  -		<custommerchant-result>
	  -			<order-form>
	  -				[<field>...]*
	  -
	  -
	  - Format of an info6 test result:
	  -
	  -		<TESTRESULT>
	  -			[<RECORD>
	  -				[<FIELD COLUMN="columnname">columnvalue</FIELD>]*
	  -			]*
	  -
	  -->

	<xsl:template match="*">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="/">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="shopping-cart">
		<TESTRESULT>
		<xsl:for-each select="item">
			<RECORD>
			<xsl:for-each select="*">
				<FIELD>
				<xsl:attribute name="COLUMN"><xsl:node-name/></xsl:attribute>

				<!-- copy everything in the field, including nested elements -->
				<xsl:apply-templates select="@* | * | comment() | pi() | text()">
					  <xsl:template>
							<xsl:copy>
								  <xsl:apply-templates select="@* | * | comment() | pi() | text()"/>
							</xsl:copy>
					  </xsl:template>
				</xsl:apply-templates>
          
				</FIELD>
			</xsl:for-each>
			</RECORD>
		</xsl:for-each>
		</TESTRESULT>
	</xsl:template>

	<xsl:template match="order-form">
		<TESTRESULT>
		<RECORD>
		<xsl:for-each select="*">
			<FIELD>
			<xsl:attribute name="COLUMN"><xsl:node-name/></xsl:attribute>

			<!-- copy everything in the field, including nested elements -->
			<xsl:apply-templates select="@* | * | comment() | pi() | text()">
				  <xsl:template>
						<xsl:copy>
							  <xsl:apply-templates select="@* | * | comment() | pi() | text()"/>
						</xsl:copy>
				  </xsl:template>
			</xsl:apply-templates>
      
			</FIELD>
		</xsl:for-each>
		</RECORD>
		</TESTRESULT>
	</xsl:template>

</xsl:stylesheet>
