Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-07-2003, 03:21 AM   PM User | #1
SDP2006
Regular Coder

 
Join Date: May 2003
Location: 34° 54' N 82° 13' W
Posts: 996
Thanks: 0
Thanked 0 Times in 0 Posts
SDP2006 is an unknown quantity at this point
Difference?? XTML -- XML

Whats the difference between XHTML and XML??
__________________
Stevie Peele
Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
#dev - any programming,etc. question
#design - design discussion and critque
#central - general chat
Come join us!
SDP2006 is offline  
Old 09-07-2003, 03:39 AM   PM User | #2
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline  
Old 09-07-2003, 01:57 PM   PM User | #3
SDP2006
Regular Coder

 
Join Date: May 2003
Location: 34° 54' N 82° 13' W
Posts: 996
Thanks: 0
Thanked 0 Times in 0 Posts
SDP2006 is an unknown quantity at this point
Okay, made an XML file, saved it, opened it, all it showed was my source. How do I make it display like a webpage?
__________________
Stevie Peele
Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
#dev - any programming,etc. question
#design - design discussion and critque
#central - general chat
Come join us!
SDP2006 is offline  
Old 09-07-2003, 02:22 PM   PM User | #4
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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.

Have alook at the following links:
<Associating Style Sheets with XML documents> (W3C),
<XML Web Pages with Mozilla> (O'Reilly)

You might be interested in having a look at what XSLT can do, as well.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline  
Old 09-07-2003, 03:04 PM   PM User | #5
SDP2006
Regular Coder

 
Join Date: May 2003
Location: 34° 54' N 82° 13' W
Posts: 996
Thanks: 0
Thanked 0 Times in 0 Posts
SDP2006 is an unknown quantity at this point
So, I need to apply a stylesheet for it not to show the source??
__________________
Stevie Peele
Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
#dev - any programming,etc. question
#design - design discussion and critque
#central - general chat
Come join us!
SDP2006 is offline  
Old 09-08-2003, 09:38 PM   PM User | #6
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Yup.
liorean is offline  
Old 09-10-2003, 04:30 AM   PM User | #7
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
Quote:
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 Vincent is offline  
Old 09-10-2003, 11:50 AM   PM User | #8
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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.)
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

Last edited by liorean; 09-10-2003 at 11:52 AM..
liorean is offline  
Old 09-25-2003, 05:27 AM   PM User | #9
StupidRalph
Senior Coder

 
Join Date: Mar 2003
Location: Atlanta
Posts: 1,037
Thanks: 14
Thanked 30 Times in 28 Posts
StupidRalph is on a distinguished road
I may be waaayyy off

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.
StupidRalph is offline  
Old 09-25-2003, 10:42 AM   PM User | #10
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
Well, not exactly spot on. The thing you have to realise is that XML and XHTML isn't the same kind of languages. XHTML is XML but XML is not XHTML.

< What is XML and how do I use it?> (the previous link doesn't work any longer).


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.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline  
Old 10-10-2003, 12:14 AM   PM User | #11
velious
Regular Coder

 
Join Date: Jun 2003
Location: California
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
velious is an unknown quantity at this point
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 .
velious is offline  
Old 10-12-2003, 08:24 PM   PM User | #12
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline  
Old 04-11-2004, 03:21 PM   PM User | #13
lnxusr86
New Coder

 
Join Date: Nov 2003
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
lnxusr86 is an unknown quantity at this point
Post XHTML and XML

XML is a cross-platform, software and hardware independent tool for transmitting information.

XHTML is HTML defined as an XML application.

You may want to look at the following website and read about XHTML and XML

URL: http://www.w3schools.com/

Last edited by lnxusr86; 04-11-2004 at 03:24 PM..
lnxusr86 is offline  
Old 10-08-2004, 06:35 PM   PM User | #14
Battosai
New Coder

 
Join Date: Sep 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Battosai is an unknown quantity at this point
Quote:
Originally Posted by liorean
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...
__________________
.
Welcome to MANGA WORLD
.
Battosai is offline  
Old 10-08-2004, 07:29 PM   PM User | #15
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
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.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:54 PM.


Advertisement
Log in to turn off these ads.