Have a look at the < What is XML and how do I use it?> sticky for a description of what XML is. XHTML is an XML language. So is RDF, MathML, XUL, XSL, SVG and many other markup languages. HTML is an SGML language, while XHTML is the XML equivalent of that language.
In difference to xhtml, pure xml does not have any default rendering. All elements are per default inline, and no elements have any behavior associated with them. Ie and newer moz versions displays the source tree per default, while op and older moz versions simply display the contents according to the style rules I explained above.
If you assign a stylesheet to the xml file, the source will no longer be displayed, and the stylesheet will decide the styling.
Originally posted by SDP2006 So, I need to apply a stylesheet for it not to show the source??
In IE the answer is yes. In Mozilla and Mozilla-based browsers, the answer is no. In Amaya, the answer is no.
Nothing, I believe, stops a user-agent from applying an application-specific styling to elements. HTML itself would be useless without such capabilities...
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary https://alexvincent.us/blog
Alex: Not quite right. Moz displays the source in any of the recent versions, much the same as iew and iem does, if you don't apply a stylesheet. (Unless the doctype/namespace is recognised. In that case, the default rendering for that type will trigger instead.)
I only read maybe an article on XML so this is just a stab in the dark.
I thought the difference between XML and XHTML was that XML does not have any predefined tags. I thought that XML was simply a way to define what data means and the XHTML (much like HTML) is used to show how data looks.
What I mean by that is that is:
Suppose you wanted to describe sandpaper.
You could show everyone the sandpaper using XHTML but you would communicate the sandpapers roughness and other intangibles using XML.
Thus that being the reason why you only get source code when you try to show a XML file. XML is not used to show data. XHTML is.
__________________
Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.
You see, XML is a meta langauge, a language in which you create other languages, in the same way SGML is. XHTML is one of those languages, in the same way HTML is one of the SGML languages.
The thing is, you can use pure XML, of course. You can write a document with home-brewed tags, and present it using XML means. However, even though that document might be well-formed, it is not valid. To make a valid XML document, you have to have a validation scheme of some sort. The validation schemes that I'm aware of for the moment, is XML DTD, Relax NG, TRAX and XML Schema. These four can be used to validate the document, and what they do, is specify the grammar and vocabulary of a language built on the XML syntax.
the difference is that XHTML and XML is that XHTML displays data much like the old html, and xml describes what data is....it takes a little getting used to. You can also think of it as this: XHTML is a mark-up language and XML is a meta language. A meta language is what's used to build other languages. if i'm wrong please tell me .
That's pretty much correct. An analogy I like to draw is to actual human languages - SGML and XML are meta languages, these provide the syntax for the language. The XML or SGML applications (ie HTML, XHTML, DocBook, SVG, XUL, RDF, MathML etc.), on the other hand are the grammar and the vocabularies, that together with the syntax from the meta languages provides a full markup language. Semantics, however, are for the moment conveyed only through human recognition of the element and attribute names, or through namespace recognition.
Have a look at the < What is XML and how do I use it?> sticky for a description of what XML is. XHTML is an XML language. So is RDF, MathML, XUL, XSL, SVG and many other markup languages. HTML is an SGML language, while XHTML is the XML equivalent of that language.
Sorry, the link you gave is no longer available...
Which you would have seen I mentioned later, when I linked to a copy of it.
I would normally correct things like this, but the intention was to write an XML FAQ and an XML documentation thread. I've placed this project on ice along with maintaining the HTML&CSS ones for lack of time.