Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Tulsa, OK
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <xsl:value-of> problem in attributes

    Here is what I'm trying to get to work in an XSL stylesheet.

    <element attribute="<xsl:value-of select="whatever">"/>

    it doesn't work but its what I need done. any help would be appreciated.

    -Joshua David

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    <element attribute="{whatever}"/>

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Tulsa, OK
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    thanks i figured it out. here's how I did it if anyone else has this problem.


    <element>
    <xsl:attribute name="attribute">
    <xsl:value-of select=""/>
    </xsl:attribute>
    </element>

    RETURNS:-------------

    <element attribute="">

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    What I showed is a syntactic shortcut for exactly the same thing. Just put the XPath selector in between {} inside the attribute value.

  • #5
    New Coder
    Join Date
    Aug 2002
    Location
    Tulsa, OK
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    okay thanks. that is easier


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •