What happens if you call an xsl template without all parms

Discussion in 'XML' started by eric.goforth@gmail.com, Aug 18, 2006.

  1. Guest

    Hello,

    What happens if you call an xsl template if you call it without setting
    the values of all it's parameters, I assume that the parameters will be
    either null or an empty string and the following code will handle it:

    <xsl:if test="string-length($sValue) &gt; 0">
    <xsl:attribute name="VALUE"><xsl:value-of
    select="$sValue"/></xsl:attribute>
    </xsl:if>

    Thanks,
    Eric
    , Aug 18, 2006
    #1
    1. Advertising

  2. wrote:
    > What happens if you call an xsl template if you call it without setting
    > the values of all it's parameters


    xsl:param's select= expression specifies the default value.


    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
    Joseph Kesselman, Aug 18, 2006
    #2
    1. Advertising

  3. (If there is no select, the content of the xsl:param gives the default
    value. If there is no content, the default value is "".)

    Again, you could have answered this yourself:
    http://www.w3.org/TR/1999/REC-xslt-19991116#variable-values

    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
    Joseph Kesselman, Aug 18, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Jones
    Replies:
    0
    Views:
    707
    Tim Jones
    Dec 17, 2003
  2. lele1979

    xsl:Include e xsl:call-template

    lele1979, Nov 6, 2006, in forum: XML
    Replies:
    1
    Views:
    556
  3. lele1979

    xsl:Include e xsl:call-template

    lele1979, Nov 6, 2006, in forum: XML
    Replies:
    0
    Views:
    362
    lele1979
    Nov 6, 2006
  4. NM
    Replies:
    6
    Views:
    452
    Default User
    Sep 20, 2006
  5. Jerry Sievers
    Replies:
    4
    Views:
    156
    Jerry Sievers
    Jul 31, 2005
Loading...

Share This Page