Well i was trying this but it doesn't work:
just consider that instead of EP tag m having ExtensionProperties tag...and plz discard general errors which could be because of xml differnce,but i need output as i mentioned...i.e. formatted text..
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://il.tesco.com/canonical/order/v1.0">
<xsl:output method="text" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:param name="separator" select="' '"/>
<xsl:param name="line-separator" select="' '"/>
<xsl:variable name="GenerationDate" select="ns0:Order/ExtensionProperties/Name"/>
<xsl:if test="$GenerationDate='Generation Date'">
<xsl:variable name="formatedDate" select="ns0:Order/ExtensionProperties/Value" />
<xsl:text>Tesco Direct</xsl:text>
<xsl:value-of select="$separator" />
<xsl:value-of select="concat(substring($formatedDate, 9, 2),substring($formatedDate, 6, 2),substring($formatedDate, 3, 2))"/>
<xsl:value-of select="$line-separator" />
</xsl:if>
<xsl:for-each select="ns0:Order/OrderLineItems/OrderLineItem">
<xsl:variable name="Dealer_Account" select="ExtensionProperties/Name" />
<xsl:if test="$Dealer_Account='DealerAccount'">
<xsl:value-of select="ExtensionProperties/Value" />
</xsl:if>
<xsl:variable name="DateOfSale" select='substring-before(@orderDateTime,"T")'/>
<xsl:value-of select="concat(substring($DateOfSale, 9, 2),substring($DateOfSale, 6, 2),substring($DateOfSale, 3, 2))" />
<xsl:comment>Insert Five Spaces </xsl:comment>
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Customer/FullName" />
<xsl:comment>Insert Five Spaces </xsl:comment>
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Customer/Address/AddressLine1" />
<xsl:comment>Insert Five Spaces </xsl:comment>
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Customer/Address/AddressLine2" />
<xsl:comment>Insert Five Spaces </xsl:comment>
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Customer/Address/AddressLine3" />
<xsl:comment>Insert Five Spaces </xsl:comment>
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Customer/Address/AddressLine4" />
<xsl:comment>Insert Five Spaces </xsl:comment>
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Customer/Address/PostCode" />
<xsl:value-of select="@itemCategoryID" />
<xsl:value-of select="$line-separator" />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Please help!!