Click to See Complete Forum and Search --> : 3 easy XML theory questions


hertshelp
May 9th, 2008, 02:51 PM
Hi guys, slightly confused with understanding the concept of XML.

1. As I understand it, XML is used to describe and define data, right?

Now, for a simple XML file to be displayed on a webpage, I need to use a style sheet language, such as CSS or XSL or XSLT. Now, I know what CSS is and what it can do, but how does it differ to XSL and XSLT?

XSLT can transform the document into a readable HTML/XHTML page?? But I thought only XHTML pages could integrate XML? And what is XSL without Transofmration? Just CSS?


2. Sort of what I said up there - How come in the examples here (http://www.w3schools.com/xml/xml_xsl.asp), that XML file is able to be displayed as an actual .xml file in the browser? If that is the case, what is the purpose of HTML/XHTML? Does XSLT and XML completely obsolete XHTML/HTML?


3. Where does the DTD and/or XML schema come into play in this easy demonstration?


Thanks guys, hopefully I can understand this a little easier with your help..

PeejAvery
May 9th, 2008, 05:31 PM
Now, for a simple XML file to be displayed on a webpage, I need to use a style sheet language, such as CSS or XSL or XSLT. Now, I know what CSS is and what it can do, but how does it differ to XSL and XSLT?

XSLT can transform the document into a readable HTML/XHTML page?? But I thought only XHTML pages could integrate XML? And what is XSL without Transofmration? Just CSS?
I think you misunderstand XML. It would be good for you to look at this Wikipedia article (http://en.wikipedia.org/wiki/XML) about XML. It also will answer your questions about DTD.

CSS is stylesheets for HTML/XHTML only. It has nothing to do with XML. XSL styles XML.

In order to display XML, you must have a parser. HTML doesn't just parse it by itself.

TheCPUWizard
May 9th, 2008, 06:39 PM
In order to display XML, you must have a parser.


Strange......

I display it all the time from the command line prompt. create/modify/view using edlin....

Why would you need a parser to DISPLAY it????

hertshelp
May 9th, 2008, 06:46 PM
I think you misunderstand XML. It would be good for you to look at this Wikipedia article (http://en.wikipedia.org/wiki/XML) about XML. It also will answer your questions about DTD.

CSS is stylesheets for HTML/XHTML only. It has nothing to do with XML. XSL styles XML.

In order to display XML, you must have a parser. HTML doesn't just parse it by itself.
I can easily create an XML document styled in CSS...I don't know what you're talking about...

Can anyone actually answer my question? Would be so very grateful!

PeejAvery
May 9th, 2008, 10:08 PM
Why would you need a parser to DISPLAY it????
Yes, it is true you can view the raw data, but if you are viewing it online, why would you not want to see it parsed? Think about making tables with it. Those are always parsed.

I can easily create an XML document styled in CSS...I don't know what you're talking about...
CSS can be used, but it is not industry standard...nor the recommended method by anyone.

Formatting XML with CSS is not the most common method.

W3C recommend using XSLT instead.

Can anyone actually answer my question? Would be so very grateful!
Sorry for trying to help. I won't waste my time to bother you anymore.

hertshelp
May 10th, 2008, 06:07 AM
Can anyone else help to answer the questions in my original post?