473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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

Pat
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.
Jul 20 '05 #1
4 1949
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.)
Jul 20 '05 #2
pa********@blarg.net (Pat) wrote in message news:<b8**************************@posting.google. com>...
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.
Jul 20 '05 #3
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
Jul 20 '05 #4
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.

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matt Rushton | last post by:
Has anyone seen the new AOL frontpage? Great its a css tableless design. Crap, its nearly impossible to read some of the text if you increase the text size. It may accessible to screen...
13
by: Mike | last post by:
We are using: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"...
1
by: Stuart | last post by:
I have a two frame page, on one page of which is a text input box and on the other an image. The user types some text in the text box in the first frame, hits the 'Add to Image' button and the...
1
by: Eric | last post by:
I want to do the following using CSS, and I just can't seem to find the solution: There is some text here that describes some research or something that I'm doing. Part of the results of the...
5
by: sp_mclaugh | last post by:
Hi. I've just recently switched to using CSS (rather than tables) to display collections of thumbnails. That way, depending on the user's screen resolution and browser window size, the number of...
5
by: rengaw03 | last post by:
How do I center a HTML login form horizontally on a page? I can't find anything useful on the web -- no shortage of sites offering to sell me three-column layouts with a flexible center column, or...
8
by: otto | last post by:
Hi, all: I have a problem with the inclusion of .js files in mu .aspx pages when using Master Pages. I try to explain it. If I make a web project without master pages I simply put in the head...
2
by: jasonhalpern | last post by:
I'm trying to create a style sheet which will allow me to easily maintain information displayed in the page header which updates with some frequency. I initially created the header inside of a...
11
by: shapper | last post by:
Hello, I am displaying an image on a few pages. The image size is 50 px height and 50 px width. In some pages I need the image to be 30x30 px in others 40x40 px and in others 50x50px. Can I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.