Search code examples
xmlxsltxslt-2.0workday-api

I need to print 94 9's as the dummy trailer


I need to print a dummy trailer with 94 9;s printed continuously . i need it as the last row of my file


Solution

  • The simplest (and cheapest, in terms of processing) method:

    <xsl:text>9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999</xsl:text>
    

    Another option:

    <xsl:value-of select="for $i in 1 to 94 return '9'" separator="" />
    

    And another (requires a processor that supports XSLT 3.0):

    <xsl:value-of select="xs:integer(math:pow(10, 94))-1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:math="http://www.w3.org/2005/xpath-functions/math" />