I am using an XMLDataSource with RadGrid. When the grid loads it shows no data. I have an XML and an XSLT file and in Visual Studio when I choose the Show XSLT Output from the XML menu it shows correctly. Can someone take a look and see if I have something wrong or why Radgrid doesn't like the XML?
Here is my XML file:
Here is my XSLT file:
Thank you for your help.
Here is my XML file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
<ns2:StorageVolume xmlns:ns2="http://www.nng.com/alertportal/processed/"> |
<companyNumber>179</companyNumber> |
<gasDay>2009-12-18T00:00:00-06:00</gasDay> |
<iddInjectionQuantity>739001</iddInjectionQuantity> |
<nonPDDLPInjectionQuantity>185486</nonPDDLPInjectionQuantity> |
</ns2:StorageVolume> |
<?xml version="1.0" encoding="UTF-8"?> |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
version="1.0" |
xmlns:ns2="http://www.nng.com/alertportal/processed/" |
xmlns:xalan="http://xml.apache.org/xslt"> |
<xsl:output method="xml" indent="yes"/> |
<xsl:template match="ns2:StorageVolume"> |
<ns2:StorageVolume> |
<xsl:attribute name="companyNumber"> |
<xsl:value-of select="companyNumber" /> |
</xsl:attribute> |
<xsl:attribute name="gasDay"> |
<xsl:call-template name="formatDate"> |
<xsl:with-param name="dateTime" select="gasDay" /> |
</xsl:call-template> |
</xsl:attribute> |
<xsl:attribute name="iddInjectionQuantity"> |
<xsl:value-of select="iddInjectionQuantity" /> |
</xsl:attribute> |
<xsl:attribute name="nonPDDLPInjectionQuantity"> |
<xsl:value-of select="nonPDDLPInjectionQuantity" /> |
</xsl:attribute> |
</ns2:StorageVolume> |
</xsl:template> |
<xsl:template name="formatDate"> |
<xsl:param name="dateTime" /> |
<xsl:variable name="date" select="substring-before($dateTime, 'T')" /> |
<xsl:variable name="year" select="substring-before($date, '-')" /> |
<xsl:variable name="month" select="substring-before(substring-after($date, '-'), '-')" /> |
<xsl:variable name="day" select="substring-after(substring-after($date, '-'), '-')" /> |
<xsl:value-of select="concat($month, '/', $day, '/', $year)" /> |
</xsl:template> |
</xsl:stylesheet> |