XML Client/server side

Discussion in 'XML' started by Stop Bsod, Dec 16, 2003.

  1. Stop Bsod

    Stop Bsod Guest

    Hello,

    I'm quite a newbie in XML. What I wanted to do is just a simple web page
    (html or xhtml) that use XML. The point of the page is to show all my
    links/bookmarks, wherever I want to see them through a browser.

    So, I wrote a simple XML file and a simple XSL-T file that process the XML.

    I like it : really easy to maintain, change the layout. So far, so
    good.... BUT :

    On the client side :
    ====================

    My default browser is firebird 0.7 (on Fedora Linux) and it works just
    perfectly (http://marcfrei.net/links.xml to have an idea of my goal).
    Problem, all the other tested browsers (IE 5.5 - 6, Safari, Netscape
    etc...) are not able to "render" my page correctly (or at all).... Again,
    the goal is to have access to this page from anywhere, including where
    "they" don't use the excellent firebird.

    So, I looked....

    On the server side :
    ====================

    I installed/tested cocoon. OK but too powerfull/complex just to render an
    XML through an XSL-T.... Also, it's integration with apache2 is not clear
    and I don't want to use cocoon as a standalone, for security reasons and
    ease of maintenance of the server. (mainly).

    So, I had a look to sablotron with mod_xslt.... Unfortunately, I couldn't
    compile/use it with apache2.... That's quite bad because it looked as the
    perfect solution for my needs.... Also, mod_xslt seems "old" and not
    really maintained.

    ------

    Maybe it's "too hearly" to use XML this way ? Ok maybe I just missed
    something... (I'm a newbie....)

    Any comments/suggestions to help me go further with XML are really
    welcomed !!

    Thanks.

    M.
     
    Stop Bsod, Dec 16, 2003
    #1
    1. Advertising

  2. Stop Bsod

    Sean Bright Guest

    Stop Bsod wrote:

    > Problem, all the other tested browsers (IE 5.5 - 6, Safari, Netscape
    > etc...) are not able to "render" my page correctly (or at all).... Again,
    > the goal is to have access to this page from anywhere, including where
    > "they" don't use the excellent firebird.


    The HTML that you are generating is not well formed. For example:

    <xsl:for-each select="/page/link[categ=$myid]">
    <xsl:sort select="title" />
    <tr>
    <a href="{URL}" target="_blank"><xsl:value-of select="title" /></a>
    </tr>
    </xsl:for-each>

    You are using an <a> tag inside a <tr> tag, which isn't valid. You
    should have the <a> tag in a <td> tag, so something like this:

    <xsl:for-each select="/page/link[categ=$myid]">
    <xsl:sort select="title" />
    <tr>
    <td> <!-- Here -->
    <a href="{URL}" target="_blank">
    <xsl:value-of select="title" />
    </a>
    </td> <!-- ... and here -->
    </tr>
    </xsl:for-each>

    Just a small example, I haven't looked at your XSL exhaustively. Make
    sure you are generating well formed (or relatively well-formed) HTML.

    Hope that helps a bit,
    Sean
     
    Sean Bright, Dec 16, 2003
    #2
    1. Advertising

  3. Stop Bsod

    Stop Bsod Guest

    Le Tue, 16 Dec 2003 14:07:40 -0500, Sean Bright a
    écrit :

    > Just a small example, I haven't looked at your XSL exhaustively. Make
    > sure you are generating well formed (or relatively well-formed) HTML.
    >
    > Hope that helps a bit,


    Thanks Sean,

    It helps a bit ! But after correction, Internet Explorer (5.5) is still
    unable to display it.

    All the "static" side is correct, but the "dynamic" ("for each") side id
    not shown. The table looks like empty.

    M.
     
    Stop Bsod, Dec 17, 2003
    #3
  4. Stop Bsod

    Sean Bright Guest

    Stop Bsod wrote:


    > It helps a bit ! But after correction, Internet Explorer (5.5) is still
    > unable to display it.


    Change this:

    <th>
    <xsl:value-of select="$mytitle"/>
    </th>

    to:

    <b>
    <xsl:value-of select="$mytitle"/>
    </b>

    Works perfectly for me in IE6.0

    TH isn't valid inside a TD tag as far as I know. If you want to
    continue to use the TH you should generate 2 rows instead of one...
    something like this:

    <tr>
    <th>Linux</th>
    <th>News</th>
    <th>Utilities</th>
    <th>Finance</th>
    <th>Technical</th>
    <th>Mails</th>
    </tr>
    <tr>
    <td>
    <!-- table with links for 'Linux' here -->
    </td>
    <td>
    <!-- table with links for 'News' here -->
    </td>
    ...
    <td>
    <!-- table with links for 'Mails' here -->
    </td>
    </tr>

    Hope that helps!

    Sean
     
    Sean Bright, Dec 18, 2003
    #4
  5. Stop Bsod

    Hugh Sparks Guest

    "Stop Bsod" <> wrote in message
    news:p...

    > I'm quite a newbie in XML. What I wanted to do is just a simple web page
    > (html or xhtml) that use XML.
    > [...]
    > the goal is to have access to this page from anywhere, including where
    > "they" don't use the excellent firebird.
    > [...]
    > On the server side :
    > I installed/tested cocoon. OK but too powerfull/complex ...
    > Any comments/suggestions to help me go further with XML
    > are really welcomed !!


    Here's a way to handle XML on the server so the sources look
    the same as if they were going to be handled on the client. Also,
    you can mix the xml/xsl files in with your other Apache website files:

    http://www.csparks.com/XMLWithoutTears/ServerSideXML.xml
     
    Hugh Sparks, Jan 1, 2004
    #5
    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. =?Utf-8?B?YWRvbGYgZ2FybGlj?=

    How to access client side XML data island from server side?

    =?Utf-8?B?YWRvbGYgZ2FybGlj?=, Nov 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,165
    aa7im
    Nov 23, 2004
  2. Replies:
    0
    Views:
    445
  3. Replies:
    1
    Views:
    6,293
  4. Boss302
    Replies:
    0
    Views:
    1,056
    Boss302
    Nov 21, 2006
  5. Replies:
    0
    Views:
    166
Loading...

Share This Page