Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding empty dates from the Xsl transformation
Message
De
02/05/2006 10:48:54
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Avoiding empty dates from the Xsl transformation
Divers
Thread ID:
01118421
Message ID:
01118421
Vues:
65
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform