3 easy XML theory questions
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, 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..
Re: 3 easy XML theory questions
Quote:
Originally Posted by hertshelp
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 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.
Re: 3 easy XML theory questions
Quote:
Originally Posted by PeejAvery
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????
Re: 3 easy XML theory questions
Quote:
Originally Posted by PeejAvery
I think you misunderstand XML. It would be good for you to look at
this Wikipedia article 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!
Re: 3 easy XML theory questions
Quote:
Originally Posted by TheCPUWizard
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.
Quote:
Originally Posted by hertshelp
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.
Quote:
Originally Posted by http://www.w3schools.com/Xml/xml_display.asp
Formatting XML with CSS is not the most common method.
W3C recommend using XSLT instead.
Quote:
Originally Posted by hertshelp
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.
Re: 3 easy XML theory questions
Can anyone else help to answer the questions in my original post?