Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding empty dates from the Xsl transformation
Message
From
02/05/2006 10:48:54
 
 
To
All
General information
Forum:
ASP.NET
Category:
XML
Title:
Avoiding empty dates from the Xsl transformation
Miscellaneous
Thread ID:
01118421
Message ID:
01118421
Views:
66
I am about ready to go with this new Xsl transformation. However, this morning, the client asked to not see a date of December 30, 1899 when the date is empty in the table. The following section of the Xsl would need to be adjusted. Anyone would know how to do that?
<xsl:template match="/*/*">
  <Row>
    <xsl:apply-templates/>
  </Row>
</xsl:template>

<xsl:template match="/*/*/*">
  <Cell>
    <xsl:choose>
      <xsl:when test="//xs:element[ @name = local-name(current()) ]/@type = 'xs:decimal'">
        <Data ss:Type="Number">
          <xsl:value-of select="."/>
        </Data>
      </xsl:when>
      <xsl:when test="//xs:element[ @name = local-name(current()) ]/@type = 'xs:string'">
        <Data ss:Type="String">
          <xsl:value-of select="."/>
        </Data>
      </xsl:when>
      <xsl:when test="//xs:element[ @name = local-name(current()) ]/@type = 'xs:dateTime'">
        <Data ss:Type="String">
          <xsl:value-of select="."/>
        </Data>
      </xsl:when>
      <xsl:when test="//xs:element[ @name = local-name(current()) ]/@type = 'xs:int'">
        <Data ss:Type="Number">
          <xsl:value-of select="."/>
        </Data>
      </xsl:when>
      <xsl:otherwise>
        <Data ss:Type="String">
          <xsl:value-of select="."/>
        </Data>
      </xsl:otherwise>
    </xsl:choose>
  </Cell>
</xsl:template>
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform