POV-Ray : Newsgroups : povray.off-topic : Random question of the day : Re: Random question of the day Server Time
4 Sep 2024 05:20:15 EDT (-0400)
  Re: Random question of the day  
From: Warp
Date: 22 Apr 2010 09:08:23
Message: <4bd04a47@news.povray.org>
Invisible <voi### [at] devnull> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.