XML with hyperlink

Discussion in 'XML' started by KL, Mar 17, 2005.

  1. KL

    KL Guest

    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 =----
     
    KL, Mar 17, 2005
    #1
    1. Advertising

  2. 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
     
    David Dorward, Mar 17, 2005
    #2
    1. Advertising

  3. KL

    KL Guest

    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;Last
    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 =----
     
    KL, Mar 17, 2005
    #3
  4. KL

    Andy Dingley Guest

    It was somewhere outside Barstow when "KL" <>
    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.
     
    Andy Dingley, Mar 17, 2005
    #4
  5. KL

    KL Guest

    Andy Dingley wrote:
    > It was somewhere outside Barstow when "KL" <>
    > 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 =----
     
    KL, Mar 17, 2005
    #5
  6. KL

    Andy Dingley Guest

    It was somewhere outside Barstow when "KL" <>
    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
     
    Andy Dingley, Mar 18, 2005
    #6
  7. KL

    Andy Dingley Guest

    It was somewhere outside Barstow when "KL" <>
    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.xml&as_uauthors=&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.
     
    Andy Dingley, Mar 18, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Randi
    Replies:
    1
    Views:
    13,116
    Martin Honnen
    May 7, 2004
  2. davetichenor
    Replies:
    1
    Views:
    909
    Eliyahu Goldin
    Oct 30, 2006
  3. Ken
    Replies:
    1
    Views:
    428
    Alvin Bruney
    Aug 16, 2003
  4. Dave
    Replies:
    0
    Views:
    998
  5. Erik Wasser
    Replies:
    5
    Views:
    520
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page