Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML linking

Status
Not open for further replies.

stupotthesecond

Technical User
Joined
Jan 28, 2005
Messages
4
Location
FR
Hi,

I have the following two tags in an XML file:
<Ref_Number>abcdefg</Ref_Number>
<Ref_Number_Link>c:\abcdefg.doc</Ref_Number_Link>

Is it possible with XSL to create an HTML <a> tag where the displayed link text would be equal to <Ref_Number>(ie:abcdefg) and where 'href' would be equal to <Ref_Number_Link>(ie:c:\abcdefg.doc)? In otherwise generate the following HTML code using XSL from the above XML file tags.

<a href="c:\abcdefg.doc">abcdefg</a>
 
Code:
<a>
  <xsl:attribute name="href">
    <xsl:value-of select="Ref_Number_Link" />
  </xsl:attribute>
  <xsl:value-of select="Ref_Number" />
</a>
 
ugh...

I have still yet to have success with <xsl:attribute>...

Try this as well...
Code:
<a href="{Ref_Number_Link}">
  <xsl:value-of select="Ref_Number" />
</a>

Visit My Site
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top