XLink within XHTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erik Jälevik

    #1

    XLink within XHTML

    Is it possible to use XLink within an XHTML document?

    I am trying the following in Mozilla Firebird 0.7 (which supposedly supports
    XLink) and I don't get a link:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xl="http://www.w3.org/1999/xlink">
    <body>
    <p xl:type='simple '
    xl:href='http://www.google.com'
    xl:show='replac e'
    xl:actuate='onR equest'>
    Link test
    </p>
    </body>
    </html>

    Am I getting something wrong here? The linking works from a pure xml
    document.

    Btw, the only reason I'm not using <a href>s is that it's for a university
    assignment and we're specifically forbidden to use HTML links...

    Thanks,
    Erik


  • Martin Honnen

    #2
    Re: XLink within XHTML



    Erik Jälevik wrote:
    [color=blue]
    > Is it possible to use XLink within an XHTML document?
    >
    > I am trying the following in Mozilla Firebird 0.7 (which supposedly supports
    > XLink) and I don't get a link:
    >
    > <?xml version="1.0" encoding="iso-8859-1"?>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    > <html xmlns="http://www.w3.org/1999/xhtml"
    > xmlns:xl="http://www.w3.org/1999/xlink">
    > <body>
    > <p xl:type='simple '
    > xl:href='http://www.google.com'
    > xl:show='replac e'
    > xl:actuate='onR equest'>
    > Link test
    > </p>
    > </body>
    > </html>
    >
    > Am I getting something wrong here? The linking works from a pure xml
    > document.[/color]

    How do you serve the document to Mozilla? I guess it can't work if you
    serve it as text/html but if you serve it as text/xml then it could work.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Erik Jälevik

      #3
      Re: XLink within XHTML

      "Martin Honnen" <mahotrash@yaho o.de> wrote in message
      news:3fabe3b3$1 @olaf.komtel.ne t...[color=blue]
      >
      > How do you serve the document to Mozilla? I guess it can't work if you
      > serve it as text/html but if you serve it as text/xml then it could work.[/color]

      Hmm, I'm just trying it out locally at the moment. The file has extension
      xml so Mozilla should assume it's being "served" as text/xml. I'll try and
      upload it to the web server though to see if the link works.

      Thanks,
      Erik


      Comment

      • Erik Jälevik

        #4
        Re: XLink within XHTML

        Nope, even from the web server, "Link test" just shows up as normal text.

        Erik


        Comment

        • Martin Honnen

          #5
          Re: XLink within XHTML



          Erik Jälevik wrote:
          [color=blue]
          > Nope, even from the web server, "Link test" just shows up as normal text.[/color]

          The following XLink works for me with Netscape 7.1:

          <?xml version="1.0" encoding="UTF-8"?>
          <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:myElement s="http://whatever"
          xmlns:xlink="ht tp://www.w3.org/1999/xlink">
          <head>
          <title>simple XLinks</title>
          </head>
          <body>
          <p>
          <myElements:myL ink xlink:type="sim ple"
          xlink:href="htt p://www.kibo.com/"
          xlink:show="rep lace"
          xlink:actuate=" user">Visit GOD</myElements:myLi nk>
          </p>
          </body>
          </html>

          I am not sure applying xlink attributes to standard XHTML elements is
          supposed to work.

          --

          Martin Honnen
          http://JavaScript.FAQTs.com/

          Comment

          • Erik Jälevik

            #6
            Re: XLink within XHTML

            Thanks a lot! That works.

            Erik


            Comment

            Working...