Anyone using XML + XSL (or CSS) for pages?

Discussion in 'XML' started by Pat, Jul 7, 2004.

  1. Pat

    Pat Guest

    Is anyone using XML instead of HTML for pages of content? If so is
    there a public site to browse? Can someone point me to a discussion
    of the pros and cons of doing this? I am trying to get a handle on
    how close XML is to replacing HTML for browsing specifically (I am
    aware of its other benefits.) Also I do understand that XML can be
    transformed into HTML but would rather not do this for various
    reasons.
     
    Pat, Jul 7, 2004
    #1
    1. Advertising

  2. Pat wrote:
    > Is anyone using XML instead of HTML for pages of content? If so is
    > there a public site to browse? Can someone point me to a discussion
    > of the pros and cons of doing this? I am trying to get a handle on
    > how close XML is to replacing HTML for browsing specifically


    You could use some kind of XML and CSS for presenting content. But there
    are quite some user agents that don't support XML. And there are even
    more that don't support additional things like XLink (for navigation) or
    XForms (for form applications).
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Jul 8, 2004
    #2
    1. Advertising

  3. Pat

    Andy Dingley Guest

    (Pat) wrote in message news:<>...
    > Is anyone using XML instead of HTML for pages of content?


    Yes and no. Did that about 5 years ago, still can't do it for
    widespread use on a public site, owing to the limited number of user
    agents that can handle it.

    It may have intranet uses, but for public access I think you either
    need to avoid it, do it server-side, or browser-sniff and behave
    accordingly.

    There's also the problem that page load is ugly on a big page. It's a
    white screen until the XML document is down, the XSLT is down, and the
    transform has been run. If you must do this sort of client-side XSLT,
    then use the "data island" approach and client-side JavaScript / DOM
    that shows a plain HTML page with a "Loading..." banner, loads the XML
    & XSLT as either linked or embedded resources, then transforms one
    with the other and writes it into a HTML <div>. Still browser
    dependent, but it's a better implementation.

    These days almost everything I write is server-side XSLT generated. If
    I'm doing some complex data-navigation example (clickable table
    columns to sort, that sort of thing) then I might use XSLT on the
    client.

    Even better is the combined approach. Write your document as _both_
    XML and HTML - write it as XHTML, but in such a way that it also
    contains all the data that the original XML document contained
    (qualified <span>s will be helpful). Now a non-XSLT browser renders it
    as the page you forst wrote, but an XSLT-capable browser has the
    chance to use this as an XML source document, hide it from display,
    and re-create a new display version with whatever processing you wish.

    That said, there are sometimes uses for XML+XSLT directly to the
    browser - when you're writing XML that isn't targetted at a browser or
    human, but you need to view it for debugging. This week I'm writing
    PartnerML for mobile phones. An ugly XML-based metalanguage (the phone
    network stack later transcodes this into either XHTML-MP or WML, as
    needed by the handset). It's a nightmare to debug, because you have to
    run it through the network stack to get it into a viewable fashion.
    Instead, my server does browser-sniffing and if it recognises the user
    as my dev desktop running IE, it sends me an XSLT stylesheet as well
    that emulates the network stack and a phone browser.


    Pure XML + CSS is useless. No ability to generate elements, manipulate
    atrributes, to transform ordering, or to duplicate existing elements.
    Use XSLT instead.
     
    Andy Dingley, Jul 8, 2004
    #3
  4. Pat

    Wired Earp Guest

    Andy Dingley wrote:

    > Pure XML + CSS is useless. No ability to generate elements, manipulate
    > atrributes, to transform ordering, or to duplicate existing elements.
    > Use XSLT instead.


    Mozilla has very strong support for pure XML [and real XHTML], including
    all of the above, check out <utl:http://www.mozilla.org/university/hof.xml>
    for a quick example. Non-standard XML markup should be avoided anyhow, for
    reasons of compatibility and accessability.


    --
    Wired Earp
    Wunderbyte
     
    Wired Earp, Jul 19, 2004
    #4
  5. Pat

    Saqib Ali Guest

    It is certainly possible. But I m not sure how many sites actually use
    it for a wide audience. I have seen some specialized sites that do
    that.

    See http://www.xml-dev.com/blog/#18 for more info. The link has an
    example site as well.

    In Peace,
    Saqib Ali
    http://validate.sf.net

    > Is anyone using XML instead of HTML for pages of content? If so is
    > there a public site to browse? Can someone point me to a discussion
    > of the pros and cons of doing this? I am trying to get a handle on
    > how close XML is to replacing HTML for browsing specifically (I am
    > aware of its other benefits.) Also I do understand that XML can be
    > transformed into HTML but would rather not do this for various
    > reasons.
     
    Saqib Ali, Jul 20, 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. Replies:
    1
    Views:
    3,637
    A. Bolmarcich
    May 27, 2005
  2. Replies:
    2
    Views:
    9,307
    Martin Honnen
    Sep 5, 2006
  3. @do

    XML to XML using XSL

    @do, Sep 27, 2006, in forum: XML
    Replies:
    3
    Views:
    412
  4. confused
    Replies:
    3
    Views:
    405
    David Carlisle
    May 26, 2007
  5. confused
    Replies:
    3
    Views:
    447
    Pavel Lepin
    May 28, 2007
Loading...

Share This Page