dynamic paramaters in a <table> html tag?

Discussion in 'XML' started by bjam, Apr 12, 2005.

  1. bjam

    bjam Guest

    Hi, I am trying to do the following, which is to have a single place to
    define my table paramaters such as cellpadding / cellspacing etc.
    Below is the code I am trying to achieve see the cell spacing element
    in the table html tag below. Thanks in advance for any help you can
    provide. I really appreciate it.

    This is currently not working as I can't have an xsl:value-of select
    inside of the table tag itself... does anyone have any ideas on this?
    Thanks in advance for your help with this.



    <!-- get table stats-->
    <xsl:call-template name='get_summary_table_specs'/>
    <!-- open the table for the summary of passed items -->
    <table border="0" cellpadding="2" cellspacing="<xsl:value-of select =
    /xmltable[@spacing][text()]\>" bgcolor="lightblue" width="50%">


    !-- import the data output template for displaying each row of resutls
    -->
    <xsl:template name="get_summary_table_specs">
    <xmltable padding="5"/>
    <xmltable spacing="5"/>
    </xsl:template>
     
    bjam, Apr 12, 2005
    #1
    1. Advertising

  2. an xslt stylesheet has to be well formed XML.

    <table border="0" cellpadding="2" cellspacing="{
    /xmltable[@spacing][text()]}" bgcolor="lightblue" width="50%">

    google for "attribute value template" for the {} syntax

    david
     
    David Carlisle, Apr 12, 2005
    #2
    1. Advertising

  3. bjam

    bjam Guest

    Thanks for this david, your the best, this helps a lot. I also found
    another way to do it using xsl:attribute which also works and seems
    very clean.
     
    bjam, Apr 12, 2005
    #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. M?rcia Elias
    Replies:
    4
    Views:
    417
    M?rcia Elias
    Jan 27, 2004
  2. Vic
    Replies:
    5
    Views:
    6,611
    Luke Tulkas
    Jun 28, 2004
  3. Robert Mark Bram

    Paramaters in EL?

    Robert Mark Bram, Mar 20, 2005, in forum: Java
    Replies:
    2
    Views:
    427
    Chris Riesbeck
    Mar 21, 2005
  4. shruds
    Replies:
    1
    Views:
    893
    John C. Bollinger
    Jan 27, 2006
  5. Michael Olea

    Design Problem: "Smart Paramaters"

    Michael Olea, Jun 6, 2005, in forum: C++
    Replies:
    5
    Views:
    397
    Michael Olea
    Jun 10, 2005
Loading...

Share This Page