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 4 of 4

Thread: linking..

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts

    linking..

    Trying to create a link via xml/xsl

    Code:
    ?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="xslfile.xsl"?>
    
    
    <SITEREVIEW>
    
    <BasicLinkInformation>
    <IDcode>4</IDcode>
    <sitename>site_Name</sitename>
    <sitelink>http://link</sitelink>
    <contact>email@somewhere.com</contact>
    <type>Informational</type>
    </BasicLinkInformation>
    </SITEREVIEW>
    How can make a link come out in xsl from "sitelink"??

    Thanks
    Duniyadnd

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this in your template

    <a>
    <xsl:attribute name="href"><xsl:value-of select="sitelink" /></xsl:attribute>
    <xsl:value-of select="sitelink" />
    </a>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That worked.. thanks..

    How can I write it so the end result would be:

    <a href="link.html" target="_body">something</a>

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use the <xsl:attribute></xsl:attribute> tags to make an attribute with the name ot "target" - but where in your xml is it going to get its value from?

    patrick


  •  

    Posting Permissions

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