XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 14th, 2004, 08:44 AM
tommya tommya is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 tommya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation XML Hyperlink

I am very new to XML and have literally only learned what I needed to do, which was create an xml file with a menu in, pulled in to the main html page with a bit of code

However, when pulled in, works great, except I dont know how to apply a hyperlink to each of the rows in the table?

Is this possible?

This is the XML file I created

<?xml version="1.0" encoding="iso-8859-1" ?>
<LEFTMENU>
<MENUITEM>
<LINE1> Home </LINE1>
</MENUITEM>
<MENUITEM>
<LINE1> Downloads </LINE1>
</MENUITEM>
<MENUITEM>
<LINE1> LearnDirect </LINE1>
</MENUITEM>
<MENUITEM>
<LINE1> Boldon Phonebook </LINE1>
</MENUITEM>
<MENUITEM>
<LINE1> Outlook Web Access </LINE1>
</MENUITEM>
<MENUITEM>
<LINE1> Sales Team Diary </LINE1>
</MENUITEM>
<MENUITEM>
<LINE1> IT Server Status </LINE1>
</MENUITEM>
</LEFTMENU>


and it is then pulled in using the following code

<xml
src="quicklinks.xml"
id="xmldso"
async="false">
</xml>

<table
datasrc="#xmldso"
width="140"
border="0">

<thead>
<th>
<p align="left">
<font face="Verdana" style="font-size: 8pt; text-decoration:underline">Quicklinks</font>
</th>

</thead>

<tr align="left">
<td>
<font face="Verdana" style="font-size: 8pt">
<span datafld="LINE1"></span>
</font>
</td>

</tr>
</table>


Can anybody help me with this

Thanks
Tommy

Reply With Quote
  #2  
Old May 14th, 2004, 09:16 AM
tommya tommya is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 tommya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
just to expand on my initial post.....
I've tried the post that contains the "yada" code, but this relies on an xsl file
Using the code from my first post, I can then pull in the necessary columns from the xml file but it loses its formatting.

I'm working with index.htm page and I want to keep it like that, but still pull in XML information...with Hyperlinks included!

Is this even possible??

Reply With Quote
  #3  
Old May 25th, 2004, 03:04 AM
nihaarika2002 nihaarika2002 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 49 nihaarika2002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
i hope this is what u r looking for

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="html" indent="no" encoding="utf-8"/>

<xsl:template match="/">
<table
datasrc="#xmldso"
width="140"
border="0">

<thead>
<th>
<p align="left">
<font face="Verdana" style="font-size: 8pt; text-decoration:underline">Quicklinks</font>
</p>
</th>

</thead>

<xsl:for-each select="/LEFTMENU/MENUITEM/LINE1">
<xsl:variable name="v_line" select="normalize-space(.)"/>
<tr align="left">
<td>
<font face="Verdana" style="font-size: 8pt">
<!--<xsl:value-of select="$v_line"/>-->
<span datafld="LINE1"><a href="{$v_line}"><xsl:value-of select="."/></a> </span>
</font>
</td>

</tr>
</xsl:for-each>
</table>

</xsl:template>

</xsl:stylesheet>
----------------------
hope this code helps u
regards
niha

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML Hyperlink


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway