![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
So way, waaaay back when I was learning about web technologies, it was
suggested that XML is the future, and that one day it would be possible
to do away with HTML and just use XML.
Sure enough, if you write an XML file and attach a CSS style sheet to
it, with enough work you can make it so that the XML contains tags that
represent the actual document structure you want (rather than what HTML
provides you with), and then the CSS renders it in whatever way you fancy.
As an experiment, I tried to see how far I could get with this. I got
quite far, and then I hit a snag: I found two things that HTML can do,
but I can't find CSS properties to achieve the same thing with raw XML.
1. Hyperlinks.
2. Images.
Anybody know how to do this?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible <voi### [at] dev null> wrote:
> As an experiment, I tried to see how far I could get with this. I got
> quite far, and then I hit a snag: I found two things that HTML can do,
> but I can't find CSS properties to achieve the same thing with raw XML.
You are comparing apples to oranges. XML doesn't specify things like
"this should be shown as an image". HTML does.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> As an experiment, I tried to see how far I could get with this. I got
>> quite far, and then I hit a snag: I found two things that HTML can do,
>> but I can't find CSS properties to achieve the same thing with raw XML.
>
> You are comparing apples to oranges. XML doesn't specify things like
> "this should be shown as an image". HTML does.
Ideally, XML just contains your information and describes its structure.
A stylesheet describes how to actually display it. (Much like HTML+CSS
is supposed to.)
Basically everybody in my class ended up writing XML files, but then
writing XSLT to convert this XML back into ordinary HTML. I was
wondering "why not just serve the original XML and give the browser a
stylesheet to tell it how to display it?" The answer being that there
are several HTML features that don't seem to be possible with general XML...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible <voi### [at] dev null> wrote:
> Ideally, XML just contains your information and describes its structure.
> A stylesheet describes how to actually display it.
No, with XML what you can use is a transformation language such as XSLT
which you can use to transform the XML data into something which a program
can display, such as HTML. Then you can use CSS to define the styles of that
HTML.
Not all XML necessarily lends itself to this.
> Basically everybody in my class ended up writing XML files, but then
> writing XSLT to convert this XML back into ordinary HTML. I was
> wondering "why not just serve the original XML and give the browser a
> stylesheet to tell it how to display it?"
Because XML doesn't define how the elements should be displayed. XSLT does
(or more precisely, it's used to convert the XML to something which defines
how it should be displayed). That's just one way of using XML.
> The answer being that there
> are several HTML features that don't seem to be possible with general XML...
And there are several XML features which are not possible with HTML.
So what?
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible wrote:
> are several HTML features that don't seem to be possible with general
> XML...
More specifically, not possible with CSS.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |