Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML with hyperlink

Reply
Thread Tools

XML with hyperlink

 
 
KL
Guest
Posts: n/a
 
      03-17-2005
I am totally new to XML and confused as heck. I have my xml file and want
one of my elements to be a website. Heck I even named the element website
(I know real original), but I can't make the website show as a valid
hyperlink in my html file. Any suggestions on what I am missing??

--

KL

"You don't love someone because they are beautiful, they are beautiful
because you love them." - Anon.



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      03-17-2005
KL wrote:

> I am totally new to XML and confused as heck. I have my xml file and want
> one of my elements to be a website. Heck I even named the element
> website (I know real original), but I can't make the website show as a
> valid hyperlink in my html file. Any suggestions on what I am missing??


Your message is missing any indication as to how you are trying to transform
your XML into (X)HTML.


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
KL
Guest
Posts: n/a
 
      03-17-2005
David Dorward wrote:
> KL wrote:
>
>> I am totally new to XML and confused as heck. I have my xml file
>> and want one of my elements to be a website. Heck I even named the
>> element website (I know real original), but I can't make the website
>> show as a valid hyperlink in my html file. Any suggestions on what
>> I am missing??

>
> Your message is missing any indication as to how you are trying to
> transform your XML into (X)HTML.



I am linking to the XML file in my HTML file:

<html>
<head>
<title>RPG's</title>
</head>

<body>
<xml id="rpg" src="games.xml"></xml>

<table border="10" bordercolordark="#330066" bordercolorlight="#9900FF"
cellpadding="3">
<tr><td colspan="3" align="center" width="825" height="325"><img
id="picture" datasrc="#rpg" datafld="pic"></img></td></tr>
<tr><td colspan="3" align="center"><div id="name" datasrc="#rpg"
datafld="name"></div></td></tr>
<tr><td colspan="3" align="center"><span id="website" datasrc="#rpg"
datafld="website"></span></td></tr>
<tr><td align="center"><div id="character" datasrc="#rpg"
datafld="char"></div></td>
<td align="center"><div id="race" datasrc="#rpg" datafld="race"></div></td>
<td align="center"><div id="job" datasrc="#rpg"
datafld="job"></div></td></tr>
</table>
<br>
<br>
<table border="0">
<tr><td align="center" width="825"><button
onClick="rpg.recordset.moveFirst()">&lt;&lt; First Record</button>
<button onClick="rpg.recordset.movePrevious(); if (rpg.recordset.BOF)
rpg.recordset.moveFirst()">&nbsp;&nbsp;&lt; Previous
Record&nbsp;&nbsp;</button>
<button onClick="rpg.recordset.moveNext(); if (rpg.recordset.EOF)
rpg.recordset.moveLast()">&nbsp;&nbsp;Next Record&gt;&nbsp;&nbsp;</button>
<button onClick="rpg.recordset.moveLast()">&nbsp;&nbsp;Las t
Record&gt;&gt;&nbsp;&nbsp;</button></td></tr>
</body>

</html>

Hope this makes sense.
--

KL

"You don't love someone because they are beautiful, they are beautiful
because you love them." - Anon.



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      03-17-2005
It was somewhere outside Barstow when "KL" <(E-Mail Removed)>
wrote:

>I am linking to the XML file in my HTML file:


><xml id="rpg" src="games.xml"></xml>


><tr><td colspan="3" align="center" width="825" height="325"><img
>id="picture" datasrc="#rpg" datafld="pic">


Why do you think this "datasrc" and "datafld" rubbish will help ?

Out of sheer curiosity, which obsolete M$oft textbook were you reading
when you saw this ? It never worked right, it never worked outside
M$oft, and it's a bad idea for all sorts of reasons. I know many
people have been misled down this dead-end before, but you're the
first I've seen in a few years.

Do it with XSLT, on the server. If you need a book (you will, XSLT is
complex), then I'd recommend Michael Kay's.

You can also do it client-side, but there are serious portability
issues with that.

 
Reply With Quote
 
KL
Guest
Posts: n/a
 
      03-17-2005
Andy Dingley wrote:
> It was somewhere outside Barstow when "KL" <(E-Mail Removed)>
> wrote:
>
>> I am linking to the XML file in my HTML file:

>
>> <xml id="rpg" src="games.xml"></xml>

>
>> <tr><td colspan="3" align="center" width="825" height="325"><img
>> id="picture" datasrc="#rpg" datafld="pic">

>
> Why do you think this "datasrc" and "datafld" rubbish will help ?
>
> Out of sheer curiosity, which obsolete M$oft textbook were you reading
> when you saw this ? It never worked right, it never worked outside
> M$oft, and it's a bad idea for all sorts of reasons. I know many
> people have been misled down this dead-end before, but you're the
> first I've seen in a few years.
>
> Do it with XSLT, on the server. If you need a book (you will, XSLT is
> complex), then I'd recommend Michael Kay's.
>
> You can also do it client-side, but there are serious portability
> issues with that.



Well, it is part of the college class that I am taking. Needless to say, it
is extremely aggravating that I can't get it to work. But the book on XML
said to use that datasrc and datafld. We are to make the XML database,
which I did fine, and them link it into an HTML file with buttons to go from
previous to last. I can't get it to do the hyperlink. If I could figure
out what I am doing wrong, or how to approach it, I think I could figure it
out.
--

KL

"You don't love someone because they are beautiful, they are beautiful
because you love them." - Anon.



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      03-18-2005
It was somewhere outside Barstow when "KL" <(E-Mail Removed)>
wrote:

>Well, it is part of the college class that I am taking.


Change college ?

>Needless to say, it
>is extremely aggravating that I can't get it to work. But the book on XML
>said to use that datasrc and datafld.


Yeah, well it's wrong.

W R O N G

 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      03-18-2005
It was somewhere outside Barstow when "KL" <(E-Mail Removed)>
wrote:

>I am linking to the XML file in my HTML file:


I appreciate my brief comments in the other post might not be so
helpful.

Google this newsgroup and you'll see past critiques of why DSO is a
poor way to use XML.
<http://groups.google.co.uk/groups?as_q=DSO&safe=images&as_ugroup=comp.text.xm l&as_uauthors=(E-Mail Removed)&lr=&hl=en>


Equally styling XML with CSS alone is a bad idea. It may work, but
it's very inflexible (Google c.i.w.a.h for why)


As an alternative, then for commercial web work you really need to use
a server-side XSLT transform into "plain" HTML. This works on all
client devices and it's the only really practical approach.


For intranets, or as "bells and whistles" teaching exercises, then you
can use IE-specific techniques like data islands. These use XSLT on
the client side.

Use some JavaScript like this, called from the onload event.:
document.all.divDest.innerHTML
= xmlSource.transformNode (xslStylesheet);

and HTML like this :

<html>

[...]

<body>

<div id="divDest" >This gets over-written by the XML transformed
content</div>

<xml id="xmlSource" src="games.xml"></xml>
<xml id="xslStylesheet" src="games_to_html_content.xsl"></xml>

</body>
</html>



You can still use the Next/Prev buttons, just pass an ID into the
stylesheet as a parameter. You'll find the MSXML SDK (downloadable
from M$oft) has a useful help file with code examples.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a hyperlink column to asp.net datagrid - where only one value is a hyperlink davetichenor ASP .Net 1 10-30-2006 02:57 PM
How to add a hyperlink column to asp.net datagrid - where only one value is a hyperlink Dave ASP .Net Datagrid Control 0 10-21-2006 07:48 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
HTML Hyperlink into an XML page? Randi XML 1 05-07-2004 12:33 PM
Dynamically Hyperlink and Event Handler for the Hyperlink ? Ken ASP .Net Datagrid Control 1 08-15-2003 11:38 PM



Advertisments