TreevIew having hyperlinks in the submenu

N

naija naija

Hi Guys,
I want my Submenu in TreeView to have hyperlinks and 'm populating my
TreeView from a Xml file and formatting it with XSL.
I want to have hyperlinks on elements authors,year,business etc..
Any idea and help!

XML,XSL file below:-

XML file
--------------
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book price="34.95">
<title>Corporate</title>
<authors>
<author>Mitchell</author>
<author>Atkinson</author>
</authors>
<year>1999</year>
<business>1</business>
</book>
</books>


XSL File:-
-----------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'>
<xsl:template match="/books">
<TREENODES>

<xsl:for-each select="book">

<treenode>
<xsl:attribute name="text">
<xsl:value-of select="title" />
</xsl:attribute>

<treenode>
<xsl:attribute name="text">
Price - $<xsl:value-of select="@price" />
</xsl:attribute>
</treenode>

<treenode text="Authors">
<xsl:for-each select="authors/author">
<treenode>
<xsl:attribute name="text">
<xsl:value-of select="text()" />
</xsl:attribute>
</treenode>
</xsl:for-each>
</treenode>

<treenode>
<xsl:attribute name="text">
Year Published - <xsl:value-of select="year" />
</xsl:attribute>
</treenode>

<treenode>
<xsl:attribute name="text">
<xsl:value-of select="business"/>
</xsl:attribute>
</treenode>
</treenode>
</xsl:for-each>
</TREENODES>
</xsl:template>
</xsl:stylesheet>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top