variable and attribut

Discussion in 'XML' started by hp_, Sep 13, 2004.

  1. hp_

    hp_ Guest

    hello,

    i need some help, i'm writing an xsl script and want to write a
    variable in an attribute. is there any possibility to do so?


    my code looks like this
    <xsl:variable name="format" select="@format"/>
    <zaehler format="$format">

    the result is:
    <zaehler format="$format">

    obviously the variable isn't recognized...

    but what can i do?

    thank you very much
    hp_, Sep 13, 2004
    #1
    1. Advertising

  2. hp_ wrote:
    > hello,
    >
    > i need some help, i'm writing an xsl script and want to write a
    > variable in an attribute. is there any possibility to do so?
    >
    >
    > my code looks like this
    > <xsl:variable name="format" select="@format"/>
    > <zaehler format="$format">
    >
    > the result is:
    > <zaehler format="$format">
    >

    Hi,

    Try <zaehler format="{$format}">

    Regards,
    Kenneth
    Kenneth Stephen, Sep 13, 2004
    #2
    1. Advertising

  3. hp_

    KemperR Guest

    Hi hp_,

    I think you should code it like this:
    <xsl:variable name="format" select="@format"/>
    <zaehler format="{$format}">


    Hope that helps
    Rolf

    (hp_) wrote in message news:<>...
    > hello,
    >
    > i need some help, i'm writing an xsl script and want to write a
    > variable in an attribute. is there any possibility to do so?
    >
    >
    > my code looks like this
    > <xsl:variable name="format" select="@format"/>
    > <zaehler format="$format">
    >
    > the result is:
    > <zaehler format="$format">
    >
    > obviously the variable isn't recognized...
    >
    > but what can i do?
    >
    > thank you very much
    KemperR, Sep 13, 2004
    #3
  4. hp_

    hp_ Guest

    thank you!

    it works
    hp_, Sep 14, 2004
    #4
    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. khaled Hajjar
    Replies:
    5
    Views:
    398
    Patrick TJ McPhee
    Oct 19, 2003
  2. Replies:
    9
    Views:
    409
  3. pcouas

    JOX and attribut problem

    pcouas, Jan 22, 2007, in forum: Java
    Replies:
    4
    Views:
    1,114
    pcouas
    Jan 23, 2007
  4. Tony Johansson

    reference attribut

    Tony Johansson, Aug 12, 2005, in forum: C++
    Replies:
    4
    Views:
    341
    Adrian
    Aug 12, 2005
  5. mfglinux
    Replies:
    11
    Views:
    670
    Roberto Bonvallet
    Sep 12, 2007
Loading...

Share This Page